[pacman-dev] [PATCH 3/5] add -dd option
Florian Pritz
bluewind at xssn.at
Wed Jan 19 12:13:27 EST 2011
-dd ignores only the version of a dependency being checked, but not the
package itself.
Signed-off-by: Florian Pritz <bluewind at xssn.at>
Signed-off-by: Xavier Chantry <chantry.xavier at gmail.com>
---
doc/pacman.8.txt | 1 +
src/pacman/pacman.c | 11 ++++++++++-
test/pacman/tests/sync-nodepversion01.py | 2 --
test/pacman/tests/sync-nodepversion04.py | 2 --
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/doc/pacman.8.txt b/doc/pacman.8.txt
index 2b47a88..735bff9 100644
--- a/doc/pacman.8.txt
+++ b/doc/pacman.8.txt
@@ -155,6 +155,7 @@ Transaction Options (apply to '-S', '-R' and '-U')
Skips all dependency checks. Normally, pacman will always check a
package's dependency fields to ensure that all dependencies are
installed and there are no package conflicts in the system.
+ Specify this option twice to skip the version checking only.
*-k, \--dbonly*::
Adds/Removes the database entry only, leaves all files in place.
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index c267060..4074b84 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -552,8 +552,17 @@ static int parsearg_query(int opt)
/* options common to -S -R -U */
static int parsearg_trans(int opt)
{
+ static int nodeps = 0;
switch(opt) {
- case 'd': config->flags |= PM_TRANS_FLAG_NODEPS; break;
+ case 'd':
+ nodeps++;
+ if(nodeps == 1) {
+ config->flags |= PM_TRANS_FLAG_NODEPS;
+ } else if(nodeps == 2) {
+ config->flags ^= PM_TRANS_FLAG_NODEPS;
+ config->flags |= PM_TRANS_FLAG_NODEPVERSION;
+ }
+ break;
case 'k': config->flags |= PM_TRANS_FLAG_DBONLY; break;
case OP_NOPROGRESSBAR: config->noprogressbar = 1; break;
case OP_NOSCRIPTLET: config->flags |= PM_TRANS_FLAG_NOSCRIPTLET; break;
diff --git a/test/pacman/tests/sync-nodepversion01.py b/test/pacman/tests/sync-nodepversion01.py
index 3db445f..734ac98 100644
--- a/test/pacman/tests/sync-nodepversion01.py
+++ b/test/pacman/tests/sync-nodepversion01.py
@@ -14,5 +14,3 @@
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_DEPENDS=pkg1|provision>1.0-1")
-
-self.expectfailure = True
diff --git a/test/pacman/tests/sync-nodepversion04.py b/test/pacman/tests/sync-nodepversion04.py
index f5a091e..fdd3481 100644
--- a/test/pacman/tests/sync-nodepversion04.py
+++ b/test/pacman/tests/sync-nodepversion04.py
@@ -13,5 +13,3 @@
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")
-
-self.expectfailure = True
--
1.7.3.5
More information about the pacman-dev
mailing list