From ac9dde072c56b9dbc3fe515dc3702c2c992f492f Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Wed, 20 May 2009 21:46:23 +0200 Subject: Introduce -D, --database The request of FS#12950 is implemented. On the backend side, I introduced a new function, alpm_db_set_pkgreason(), to modify the install reason of a package in the local database. On the front-end side, I introduced a new main operation, -D/--database, which has two options, --asdeps and --asexplicit. I documented this in pacman manual. I've created two pactests to test -D: database001.py and database002.py. Signed-off-by: Nagy Gabor Signed-off-by: Dan McGee --- pactest/tests/database001.py | 11 +++++++++++ pactest/tests/database002.py | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 pactest/tests/database001.py create mode 100644 pactest/tests/database002.py (limited to 'pactest/tests') diff --git a/pactest/tests/database001.py b/pactest/tests/database001.py new file mode 100644 index 00000000..de4c0404 --- /dev/null +++ b/pactest/tests/database001.py @@ -0,0 +1,11 @@ +self.description = "-D --asdeps" + +lp = pmpkg("pkg") +lp.reason = 0 +self.addpkg2db("local", lp) + +self.args = "-D pkg --asdeps" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg") +self.addrule("PKG_REASON=pkg|1") diff --git a/pactest/tests/database002.py b/pactest/tests/database002.py new file mode 100644 index 00000000..05fa7f4b --- /dev/null +++ b/pactest/tests/database002.py @@ -0,0 +1,11 @@ +self.description = "-D --asexplicit" + +lp = pmpkg("pkg") +lp.reason = 1 +self.addpkg2db("local", lp) + +self.args = "-D pkg --asexplicit" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg") +self.addrule("PKG_REASON=pkg|0") -- cgit v1.2.3-70-g09d2