Add PGP signature support to pactest

Allow pkg.pgpsig to end up in the created sync databases.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2008-06-03 21:22:49 -05:00
parent 60159c2e77
commit 39da0198cd
2 changed files with 5 additions and 0 deletions

View file

@ -150,6 +150,8 @@ class pmdb(object):
pkg.size = int(fd.readline().strip("\n"))
elif line == "%MD5SUM%":
pkg.md5sum = fd.readline().strip("\n")
elif line == "%PGPSIG%":
pkg.pgpsig = fd.readline().strip("\n")
elif line == "%REPLACES%":
pkg.replaces = _getsection(fd)
elif line == "%DEPENDS%":
@ -241,6 +243,8 @@ class pmdb(object):
data.append(_mksection("CSIZE", pkg.csize))
if pkg.md5sum:
data.append(_mksection("MD5SUM", pkg.md5sum))
if pkg.pgpsig:
data.append(_mksection("PGPSIG", pkg.pgpsig))
if data:
data.append("")
filename = os.path.join(path, "desc")

View file

@ -47,6 +47,7 @@ class pmpkg(object):
self.csize = 0
self.reason = 0
self.md5sum = "" # sync only
self.pgpsig = "" # sync only
self.replaces = []
self.depends = []
self.optdepends = []