[Treepkg-commits] r101 - in trunk: test treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jun 24 17:10:41 CEST 2008
Author: bh
Date: 2008-06-24 17:10:39 +0200 (Tue, 24 Jun 2008)
New Revision: 101
Modified:
trunk/test/test_builder.py
trunk/treepkg/builder.py
trunk/treepkg/packager.py
Log:
Make PBuilder.update_extra_pkg_dir create Release and Release.gpg files
Modified: trunk/test/test_builder.py
===================================================================
--- trunk/test/test_builder.py 2008-06-24 10:20:12 UTC (rev 100)
+++ trunk/test/test_builder.py 2008-06-24 15:10:39 UTC (rev 101)
@@ -339,6 +339,6 @@
builder.add_binaries_to_extra_pkg([self.minimal_package_deb])
self.assertEquals(sorted(os.listdir(self.extra_pkg_dir)),
- ["Packages", "minimal_1.0-1_i386.deb"])
+ ["Packages", "Release", "minimal_1.0-1_i386.deb"])
self.check_command_line(['/usr/sbin/pbuilder', 'update',
'--configfile', self.pbuilderrc])
Modified: trunk/treepkg/builder.py
===================================================================
--- trunk/treepkg/builder.py 2008-06-24 10:20:12 UTC (rev 100)
+++ trunk/treepkg/builder.py 2008-06-24 15:10:39 UTC (rev 101)
@@ -46,7 +46,7 @@
aptcache_dir = util.filenameproperty("aptcache")
extra_pkg_dir = util.filenameproperty("extra-pkg")
- def __init__(self, pbuilderrc, root_cmd):
+ def __init__(self, pbuilderrc, root_cmd, release_signing_keyid=None):
"""Initialize the PBuilder instance with the configuration file.
The root_cmd parameter should be a list with a command that can
be used to get root permissions to run pbuilder. It may be an
@@ -56,6 +56,7 @@
"""
self.pbuilderrc = pbuilderrc
self.root_cmd = root_cmd
+ self.release_signing_keyid = release_signing_keyid
self.base_dir = os.path.dirname(self.pbuilderrc)
def init_pbuilder(self, distribution, mirrorsite, extramirrors):
@@ -106,6 +107,15 @@
run.call(cmdexpand("apt-ftparchive packages ."),
stdout=open(os.path.join(self.extra_pkg_dir, "Packages"), "w"),
cwd=self.extra_pkg_dir)
+ release_filename = os.path.join(self.extra_pkg_dir, "Release")
+ run.call(cmdexpand("apt-ftparchive release ."),
+ stdout=open(release_filename, "w"), cwd=self.extra_pkg_dir)
+ if self.release_signing_keyid:
+ run.call(cmdexpand("gpg --detach-sign --armor --local-user=$keyid"
+ " -o $sig $release",
+ keyid=self.release_signing_keyid,
+ sig=release_filename + ".gpg",
+ release=release_filename)),
def build(self, dsc_file, binary_dir, logfile, bindmounts=(),
extra_packages=(), extra_env=None):
Modified: trunk/treepkg/packager.py
===================================================================
--- trunk/treepkg/packager.py 2008-06-24 10:20:12 UTC (rev 100)
+++ trunk/treepkg/packager.py 2008-06-24 15:10:39 UTC (rev 101)
@@ -300,7 +300,8 @@
self.name = name
self.base_dir = base_dir
self.svn_url = svn_url
- self.builder = PBuilder(pbuilderrc, root_cmd)
+ self.builder = PBuilder(pbuilderrc, root_cmd,
+ release_signing_keyid=signing_key_id)
self.deb_email = deb_email
self.deb_fullname = deb_fullname
self.debrevision_prefix = debrevision_prefix
More information about the Treepkg-commits
mailing list