From 04e8048725441465788a6c76a326ff252c2fd815 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 4 Jul 2014 23:12:01 +0200 Subject: Add --assume-installed option This allows to ignore specific dependencies. Signed-off-by: Florian Pritz --- test/pacman/tests/TESTS | 3 +++ test/pacman/tests/remove-assumeinstalled.py | 14 ++++++++++++++ test/pacman/tests/sync-install-assumeinstalled.py | 11 +++++++++++ test/pacman/tests/sync-update-assumeinstalled.py | 19 +++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 test/pacman/tests/remove-assumeinstalled.py create mode 100644 test/pacman/tests/sync-install-assumeinstalled.py create mode 100644 test/pacman/tests/sync-update-assumeinstalled.py (limited to 'test') diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS index 1b5a81f9..052cf4b2 100644 --- a/test/pacman/tests/TESTS +++ b/test/pacman/tests/TESTS @@ -92,6 +92,7 @@ TESTS += test/pacman/tests/querycheck001.py TESTS += test/pacman/tests/querycheck002.py TESTS += test/pacman/tests/querycheck_fast_file_type.py TESTS += test/pacman/tests/reason001.py +TESTS += test/pacman/tests/remove-assumeinstalled.py TESTS += test/pacman/tests/remove001.py TESTS += test/pacman/tests/remove002.py TESTS += test/pacman/tests/remove010.py @@ -135,12 +136,14 @@ TESTS += test/pacman/tests/symlink010.py TESTS += test/pacman/tests/symlink011.py TESTS += test/pacman/tests/symlink012.py TESTS += test/pacman/tests/symlink020.py +TESTS += test/pacman/tests/sync-install-assumeinstalled.py TESTS += test/pacman/tests/sync-nodepversion01.py TESTS += test/pacman/tests/sync-nodepversion02.py TESTS += test/pacman/tests/sync-nodepversion03.py TESTS += test/pacman/tests/sync-nodepversion04.py TESTS += test/pacman/tests/sync-nodepversion05.py TESTS += test/pacman/tests/sync-nodepversion06.py +TESTS += test/pacman/tests/sync-update-assumeinstalled.py TESTS += test/pacman/tests/sync-update-package-removing-required-provides.py TESTS += test/pacman/tests/sync001.py TESTS += test/pacman/tests/sync002.py diff --git a/test/pacman/tests/remove-assumeinstalled.py b/test/pacman/tests/remove-assumeinstalled.py new file mode 100644 index 00000000..4f3630ce --- /dev/null +++ b/test/pacman/tests/remove-assumeinstalled.py @@ -0,0 +1,14 @@ +self.description = "Remove a package using --assume-installed" + +lp1 = pmpkg("pkg1", "1.0-1") + +lp2 = pmpkg("pkg2", "1.0-1") +lp2.depends = ["pkg1=1.0"] +for p in lp1, lp2: + self.addpkg2db("local", p); + +self.args = "-R pkg1 --assume-installed pkg1=1.0" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg2") +self.addrule("!PKG_EXIST=pkg1") diff --git a/test/pacman/tests/sync-install-assumeinstalled.py b/test/pacman/tests/sync-install-assumeinstalled.py new file mode 100644 index 00000000..6744dc87 --- /dev/null +++ b/test/pacman/tests/sync-install-assumeinstalled.py @@ -0,0 +1,11 @@ +self.description = "Install a package using --assume-installed" + +sp1 = pmpkg("pkg2", "2.0-1") +sp1.depends = ["pkg1"] + +self.addpkg2db("sync", sp1); + +self.args = "-S pkg2 --assume-installed pkg1" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg2") diff --git a/test/pacman/tests/sync-update-assumeinstalled.py b/test/pacman/tests/sync-update-assumeinstalled.py new file mode 100644 index 00000000..c22a20e1 --- /dev/null +++ b/test/pacman/tests/sync-update-assumeinstalled.py @@ -0,0 +1,19 @@ +self.description = "Update a package using --assume-installed" + +lp1 = pmpkg("pkg1", "1.0-1") + +lp2 = pmpkg("pkg2", "1.0-1") +lp2.depends = ["pkg1=1.0"] + +sp1 = pmpkg("pkg1", "2.0-1") + +for p in lp1, lp2: + self.addpkg2db("local", p); + +self.addpkg2db("sync", sp1); + +self.args = "-Su --assume-installed pkg1=1.0" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_VERSION=pkg1|2.0-1") +self.addrule("PKG_EXIST=pkg2") -- cgit v1.2.3-70-g09d2