From 3179db108a83104d9de6d1d607f55f8118e92160 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 21 Apr 2021 22:47:13 +1000 Subject: Add support for multiple 'Architecture' values This allows architecture to be multivalued. On x86-64 machines, this could be something like: Architecture = x86-64-v3 x86-64 We use the first specified Architecture value in mirrorlist $arch variable replacement, as this is backwards-compatible and sane. Original-patch-by: Dan McGee Patch-updated-by: Allan McRae Signed-off-by: Allan McRae --- test/pacman/meson.build | 2 ++ test/pacman/tests/multiple-architectures01.py | 14 ++++++++++++++ test/pacman/tests/multiple-architectures02.py | 16 ++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 test/pacman/tests/multiple-architectures01.py create mode 100644 test/pacman/tests/multiple-architectures02.py (limited to 'test') diff --git a/test/pacman/meson.build b/test/pacman/meson.build index 52ff9b9a..6c28bd7d 100644 --- a/test/pacman/meson.build +++ b/test/pacman/meson.build @@ -85,6 +85,8 @@ pacman_tests = [ 'tests/mode001.py', 'tests/mode002.py', 'tests/mode003.py', + 'tests/multiple-architectures01.py', + 'tests/multiple-architectures02.py', 'tests/noupgrade-inverted.py', 'tests/overwrite-files-match-negated.py', 'tests/overwrite-files-match.py', diff --git a/test/pacman/tests/multiple-architectures01.py b/test/pacman/tests/multiple-architectures01.py new file mode 100644 index 00000000..39f3e1f7 --- /dev/null +++ b/test/pacman/tests/multiple-architectures01.py @@ -0,0 +1,14 @@ +self.description = "Install a package (multiple Architecture options, wrong)" + +p = pmpkg("dummy") +p.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +p.arch = 'i686' +self.addpkg(p) + +self.option["Architecture"] = ['i586', 'i486', 'i386'] + +self.args = "-U %s" % p.filename() + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=dummy") diff --git a/test/pacman/tests/multiple-architectures02.py b/test/pacman/tests/multiple-architectures02.py new file mode 100644 index 00000000..18625ec6 --- /dev/null +++ b/test/pacman/tests/multiple-architectures02.py @@ -0,0 +1,16 @@ +self.description = "Install a package (multiple Architecture options)" + +p = pmpkg("dummy") +p.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +p.arch = 'i486' +self.addpkg(p) + +self.option["Architecture"] = ['i586', 'i486', 'i386'] + +self.args = "-U %s" % p.filename() + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=dummy") +for f in p.files: + self.addrule("FILE_EXIST=%s" % f) \ No newline at end of file -- cgit v1.2.3-70-g09d2