diff -Nru bzr-builddeb-2.0.2~0ubuntu2/builder.py bzr-builddeb-2.0.1ubuntu1~ppa1/builder.py --- bzr-builddeb-2.0.2~0ubuntu2/builder.py 2008-10-20 14:36:30.000000000 +0100 +++ bzr-builddeb-2.0.1ubuntu1~ppa1/builder.py 2008-09-22 12:29:19.000000000 +0100 @@ -117,13 +117,6 @@ return True -def move_file(src, dest): - base = os.path.basename(src) - target = os.path.join(dest, base) - if not (os.path.exists(target) and os.path.samefile(src, target)): - shutil.move(src, dest) - - class DebBuild(object): """The object that does the building work.""" @@ -194,19 +187,26 @@ tmp.close() info("Using uscan to look for the upstream tarball") try: - tarball_dir = self._properties.tarball_dir() - if not os.path.exists(tarball_dir): - os.makedirs(tarball_dir) r = os.system("uscan --upstream-version %s --force-download --rename " - "--package %s --watchfile %s --check-dirname-level 0 " - "--download --repack --destdir %s" % + "--package %s --watchfile %s --check-dirname-level 0" % \ (self._properties.upstream_version(), - self._properties.package(), tempfilename, - tarball_dir)) + self._properties.package(), tempfilename)) if r != 0: raise DebianError("uscan failed to retrieve the upstream tarball") finally: os.unlink(tempfilename) + # Tarball is now renamed in the parent dir, either as .tar.gz or .tar.bz2 + from repack_tarball import repack_tarball + fetched_tarball = os.path.join('..', self._tarball_name()) + desired_tarball = self._tarball_name() + if not os.path.exists(fetched_tarball): + fetched_tarball = fetched_tarball[:-2] + 'bz2' + if not os.path.exists(fetched_tarball): + raise DebianError("Could not find the upstream tarball after uscan " + "downloaded it.") + repack_tarball(fetched_tarball, desired_tarball, + target_dir=self._properties.tarball_dir()) + os.unlink(fetched_tarball) def _get_upstream_from_archive(self): import apt_pkg @@ -221,7 +221,7 @@ tarball_dir = self._properties.tarball_dir() if not os.path.exists(tarball_dir): os.makedirs(tarball_dir) - command = 'apt-get source -y --only-source --tar-only %s=%s' % \ + command = 'apt-get source -y --tar-only %s=%s' % \ (package, sources.Version) proc = subprocess.Popen(command, shell=True, cwd=tarball_dir) proc.wait() @@ -338,18 +338,18 @@ if not os.path.exists(result): os.makedirs(result) dir, base = os.path.split(changes.filename()) - if os.path.abspath(dir) == os.path.abspath(result): + if dir == result: mutter("Not moving result as source and destination locations " "are the same") return mutter("Moving %s to %s", changes.filename(), result) - move_file(changes.filename(), result) + shutil.move(changes.filename(), result) mutter("Moving all files given in %s", changes.filename()) for file in files: filename = os.path.join(self._properties.build_dir(), file['name']) mutter("Moving %s to %s", filename, result) try: - move_file(filename, result) + shutil.move(filename, result) except IOError, e: if e.errno <> 2: raise diff -Nru /tmp/vkbyZPRXu9/bzr-builddeb-2.0.2~0ubuntu2/debian/changelog /tmp/mTgKPT7QxB/bzr-builddeb-2.0.1ubuntu1~ppa1/debian/changelog --- bzr-builddeb-2.0.2~0ubuntu2/debian/changelog 2008-10-20 14:36:30.000000000 +0100 +++ bzr-builddeb-2.0.1ubuntu1~ppa1/debian/changelog 2009-02-02 13:21:35.000000000 +0000 @@ -1,23 +1,8 @@ -bzr-builddeb (2.0.2~0ubuntu2) intrepid; urgency=low +bzr-builddeb (2.0.1ubuntu1~ppa1) intrepid; urgency=low - * Use properties.tarball_dir() instead of .target_dir(), as the latter - doesn't exist. Thanks Laurent Bigonville (LP: #286403) + * Backport from Debian Experimental - -- James Westby Mon, 20 Oct 2008 14:35:19 +0100 - -bzr-builddeb (2.0.2~0ubuntu1) intrepid; urgency=low - - * Pass --only-source to "apt-get source" call, as this will prevent apt - from assuming the package name we pass is a binary package name which - it must look up the source for. This would cause problems when there - are a source package and binary package that are named the same, but - the binary package isn't built from the source package, e.g. firefox, - linux. (bug #275446) - * Add "squeeze" and "jaunty" to the list of known releases. (bug #275448) - * Make source and result dirs being the same work better. - * Simplify use of uscan and make it more robust. - - -- James Westby Sun, 28 Sep 2008 14:53:16 +0100 + -- Jerome Soyer Mon, 02 Feb 2009 14:21:19 +0100 bzr-builddeb (2.0.1) experimental; urgency=low @@ -43,7 +28,7 @@ * Handle remote files in repack check that checksums match when target exists. (bug #263371) * Fix the README to mention bzrtools is required. - * Depend on at least 0.1.11 of python-debian for strict=False support. + * Depend on at least 0.1.11 of python-debian for strict=False support. * Check that versions are in the ancestry of the current branch. (bug #264701) * Fix locking problems with merge_upstream in shared repository. @@ -311,7 +296,7 @@ -- Reinhard Tartler Tue, 1 May 2007 16:17:06 +0200 bzr-builddeb (0.15~rc1) feisty; urgency=low - + * Version designed to work with bzr 0.15. * Bump depends on bzr appropriately. * Install the plugin in .../plugins/builddeb instead of @@ -387,7 +372,7 @@ bzr-builddeb (0.13) unstable; urgency=low - * New release. + * New release. * Comptible with bzr 0.13. -- James Westby Wed, 20 Dec 2006 00:22:18 +0000 diff -Nru /tmp/vkbyZPRXu9/bzr-builddeb-2.0.2~0ubuntu2/setup.py /tmp/mTgKPT7QxB/bzr-builddeb-2.0.1ubuntu1~ppa1/setup.py --- bzr-builddeb-2.0.2~0ubuntu2/setup.py 2008-10-20 14:36:30.000000000 +0100 +++ bzr-builddeb-2.0.1ubuntu1~ppa1/setup.py 2008-09-22 12:29:19.000000000 +0100 @@ -23,7 +23,7 @@ from distutils.core import setup setup(name="bzr-builddeb", - version="2.0.2", + version="2.0.1", description="Build a .deb from a bzr branch", author="James Westby", author_email="jw+debian@jameswestby.net", diff -Nru /tmp/vkbyZPRXu9/bzr-builddeb-2.0.2~0ubuntu2/util.py /tmp/mTgKPT7QxB/bzr-builddeb-2.0.1ubuntu1~ppa1/util.py --- bzr-builddeb-2.0.2~0ubuntu2/util.py 2008-10-20 14:36:31.000000000 +0100 +++ bzr-builddeb-2.0.1ubuntu1~ppa1/util.py 2008-09-22 12:29:19.000000000 +0100 @@ -111,11 +111,11 @@ def lookup_distribution(target_dist): - debian_releases = ('woody', 'sarge', 'etch', 'lenny', 'squeeze', 'stable', + debian_releases = ('woody', 'sarge', 'etch', 'lenny', 'stable', 'testing', 'unstable', 'experimental', 'frozen') debian_targets = ('', '-security', '-proposed-updates', '-backports') ubuntu_releases = ('warty', 'hoary', 'breezy', 'dapper', 'edgy', - 'feisty', 'gutsy', 'hardy', 'intrepid', 'jaunty') + 'feisty', 'gutsy', 'hardy', 'intrepid') ubuntu_targets = ('', '-proposed', '-updates', '-security', '-backports') all_debian = [r + t for r in debian_releases for t in debian_targets] all_ubuntu = [r + t for r in ubuntu_releases for t in ubuntu_targets] diff -Nru /tmp/vkbyZPRXu9/bzr-builddeb-2.0.2~0ubuntu2/version.py /tmp/mTgKPT7QxB/bzr-builddeb-2.0.1ubuntu1~ppa1/version.py --- bzr-builddeb-2.0.2~0ubuntu2/version.py 2008-10-20 14:36:31.000000000 +0100 +++ bzr-builddeb-2.0.1ubuntu1~ppa1/version.py 2008-09-22 12:29:19.000000000 +0100 @@ -26,7 +26,7 @@ # releaselevel of 'dev' for unreleased under-development code. # # Please set this to 'final' before upload. -version_info = (2, 0, 2, 'final', 0) +version_info = (2, 0, 1, 'final', 0) # vim: ts=2 sts=2 sw=2