Mercurial > treepkg > treepkg
comparison treepkg/packager.py @ 231:7dbf0a3443bb
Use treepkg.subversion.ManualWorkingCopy for the debian directory in a
PackageTrack
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Tue, 13 Jan 2009 14:31:59 +0000 |
parents | 653a45adda50 |
children | e3cda08d2619 |
comparison
equal
deleted
inserted
replaced
230:e387b879fd38 | 231:7dbf0a3443bb |
---|---|
14 import shutil | 14 import shutil |
15 import datetime | 15 import datetime |
16 import new | 16 import new |
17 | 17 |
18 import util | 18 import util |
19 from subversion import SvnRepository, SvnWorkingCopy | 19 from subversion import SvnRepository, SvnWorkingCopy, ManualWorkingCopy |
20 import run | 20 import run |
21 import status | 21 import status |
22 import debian | 22 import debian |
23 from cmdexpand import cmdexpand | 23 from cmdexpand import cmdexpand |
24 from builder import PBuilder | 24 from builder import PBuilder |
337 self.pkg_dir_regex = re.compile(r"(?P<revision>[0-9]+)" | 337 self.pkg_dir_regex = re.compile(r"(?P<revision>[0-9]+)" |
338 r"-(?P<rules_revision>[0-9]+)$") | 338 r"-(?P<rules_revision>[0-9]+)$") |
339 repo = SvnRepository(svn_url, self.svn_external_subdirs) | 339 repo = SvnRepository(svn_url, self.svn_external_subdirs) |
340 self.working_copy = SvnWorkingCopy(repo, self.checkout_dir, | 340 self.working_copy = SvnWorkingCopy(repo, self.checkout_dir, |
341 logger=logging) | 341 logger=logging) |
342 self.rules_working_copy = ManualWorkingCopy(self.debian_dir) | |
342 | 343 |
343 checkout_dir = util.filenameproperty("checkout") | 344 checkout_dir = util.filenameproperty("checkout") |
344 debian_dir = util.filenameproperty("debian") | 345 debian_dir = util.filenameproperty("debian") |
345 pkg_dir = util.filenameproperty("pkg") | 346 pkg_dir = util.filenameproperty("pkg") |
346 | 347 |
417 logging.info("Exporting sources for tarball to %r", to_dir) | 418 logging.info("Exporting sources for tarball to %r", to_dir) |
418 self.working_copy.export(to_dir) | 419 self.working_copy.export(to_dir) |
419 | 420 |
420 def copy_debian_directory(self, to_dir): | 421 def copy_debian_directory(self, to_dir): |
421 logging.info("Copying debian directory to %r", to_dir) | 422 logging.info("Copying debian directory to %r", to_dir) |
422 shutil.copytree(self.debian_dir, to_dir) | 423 self.rules_working_copy.export(to_dir) |
423 | 424 |
424 def debian_environment(self): | 425 def debian_environment(self): |
425 """Returns the environment variables for the debian commands""" | 426 """Returns the environment variables for the debian commands""" |
426 env = os.environ.copy() | 427 env = os.environ.copy() |
427 env["DEBFULLNAME"] = self.deb_fullname | 428 env["DEBFULLNAME"] = self.deb_fullname |