[pacman-dev] [PATCH] Remove REQUIREDBY checks from pactest

Dan McGee dpmcgee at gmail.com
Mon Nov 12 21:07:26 EST 2007


From: Dan McGee <dan at archlinux.org>

Remove any checks dealing with requiredby from pactest (but not actually
from the pactests themselves). Of course, we should probably find a new way
to check requiredby values of packages since there is no guarantee our code
is working perfectly.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 pactest/pmdb.py   |    7 +------
 pactest/pmpkg.py  |    1 -
 pactest/pmrule.py |    3 ---
 3 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/pactest/pmdb.py b/pactest/pmdb.py
index ebde324..f927b4b 100755
--- a/pactest/pmdb.py
+++ b/pactest/pmdb.py
@@ -189,8 +189,6 @@ class pmdb:
                 pkg.depends = _getsection(fd)
             elif line == "%OPTDEPENDS%":
                 pkg.optdepends = _getsection(fd)
-            elif line == "%REQUIREDBY%":
-                pkg.requiredby = _getsection(fd)
             elif line == "%CONFLICTS%":
                 pkg.conflicts = _getsection(fd)
             elif line == "%PROVIDES%":
@@ -288,16 +286,13 @@ class pmdb:
             pkg.mtime["files"] = getmtime(filename)
 
         # depends
-        # for local db entries: depends, requiredby, conflicts, provides
+        # for local db entries: depends, conflicts, provides
         # for sync ones: depends, conflicts, provides
         data = []
         if pkg.depends:
             data.append(_mksection("DEPENDS", pkg.depends))
         if pkg.optdepends:
             data.append(_mksection("OPTDEPENDS", pkg.optdepends))
-        if self.treename == "local":
-            if pkg.requiredby:
-                data.append(_mksection("REQUIREDBY", pkg.requiredby))
         if pkg.conflicts:
             data.append(_mksection("CONFLICTS", pkg.conflicts))
         if pkg.provides:
diff --git a/pactest/pmpkg.py b/pactest/pmpkg.py
index 410423d..7b8f81d 100755
--- a/pactest/pmpkg.py
+++ b/pactest/pmpkg.py
@@ -54,7 +54,6 @@ class pmpkg:
         # depends
         self.depends = []
         self.optdepends = []
-        self.requiredby = []  # local only
         self.conflicts = []
         self.provides = []
         # files
diff --git a/pactest/pmrule.py b/pactest/pmrule.py
index c5682dc..8b49f5c 100755
--- a/pactest/pmrule.py
+++ b/pactest/pmrule.py
@@ -86,9 +86,6 @@ class pmrule:
                 elif case == "OPTDEPENDS":
                     if not value in newpkg.optdepends:
                         success = 0
-                elif case == "REQUIREDBY":
-                    if not value in newpkg.requiredby:
-                        success = 0
                 elif case == "REASON":
                     if newpkg.reason != int(value):
                         success = 0
-- 
1.5.3.5





More information about the pacman-dev mailing list