summaryrefslogtreecommitdiffstats
path: root/pactest/pmdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'pactest/pmdb.py')
-rwxr-xr-xpactest/pmdb.py32
1 files changed, 17 insertions, 15 deletions
diff --git a/pactest/pmdb.py b/pactest/pmdb.py
index fb0e10bb..ed552dbf 100755
--- a/pactest/pmdb.py
+++ b/pactest/pmdb.py
@@ -187,8 +187,8 @@ class pmdb:
line = line.strip("\n")
if line == "%DEPENDS%":
pkg.depends = _getsection(fd)
- elif line == "%REQUIREDBY%":
- pkg.requiredby = _getsection(fd)
+ elif line == "%OPTDEPENDS%":
+ pkg.optdepends = _getsection(fd)
elif line == "%CONFLICTS%":
pkg.conflicts = _getsection(fd)
elif line == "%PROVIDES%":
@@ -218,7 +218,10 @@ class pmdb:
"""
"""
- path = os.path.join(self.dbdir, self.treename, pkg.fullname())
+ if self.treename == "local":
+ path = os.path.join(self.dbdir, self.treename, pkg.fullname())
+ else:
+ path = os.path.join(self.dbdir, "sync", self.treename, pkg.fullname())
mkdir(path)
# desc
@@ -233,19 +236,19 @@ class pmdb:
data.append(_mksection("DESC", pkg.desc))
if pkg.groups:
data.append(_mksection("GROUPS", pkg.groups))
+ if pkg.license:
+ data.append(_mksection("LICENSE", pkg.license))
+ if pkg.arch:
+ data.append(_mksection("ARCH", pkg.arch))
+ if pkg.builddate:
+ data.append(_mksection("BUILDDATE", pkg.builddate))
+ if pkg.packager:
+ data.append(_mksection("PACKAGER", pkg.packager))
if self.treename == "local":
if pkg.url:
data.append(_mksection("URL", pkg.url))
- if pkg.license:
- data.append(_mksection("LICENSE", pkg.license))
- if pkg.arch:
- data.append(_mksection("ARCH", pkg.arch))
- if pkg.builddate:
- data.append(_mksection("BUILDDATE", pkg.builddate))
if pkg.installdate:
data.append(_mksection("INSTALLDATE", pkg.installdate))
- if pkg.packager:
- data.append(_mksection("PACKAGER", pkg.packager))
if pkg.size:
data.append(_mksection("SIZE", pkg.size))
if pkg.reason:
@@ -283,14 +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 self.treename == "local":
- if pkg.requiredby:
- data.append(_mksection("REQUIREDBY", pkg.requiredby))
+ if pkg.optdepends:
+ data.append(_mksection("OPTDEPENDS", pkg.optdepends))
if pkg.conflicts:
data.append(_mksection("CONFLICTS", pkg.conflicts))
if pkg.provides: