Merge lp:~jameinel/bzr-builddeb/noinfo into lp:bzr-builddeb

Proposed by John A Meinel
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jameinel/bzr-builddeb/noinfo
Merge into: lp:bzr-builddeb
Diff against target: 132 lines (+16/-16)
1 file modified
upstream.py (+16/-16)
To merge this branch: bzr merge lp:~jameinel/bzr-builddeb/noinfo
Reviewer Review Type Date Requested Status
Bzr-builddeb-hackers Pending
Review via email: mp+18617@code.launchpad.net
To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

trace.info was recently deprecated, so this just changes all calls to call trace.note instead.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'upstream.py'
--- upstream.py 2010-02-01 17:37:17 +0000
+++ upstream.py 2010-02-04 17:19:14 +0000
@@ -28,7 +28,7 @@
2828
29from bzrlib.export import export29from bzrlib.export import export
30from bzrlib.revisionspec import RevisionSpec30from bzrlib.revisionspec import RevisionSpec
31from bzrlib.trace import info31from bzrlib.trace import note
3232
33from bzrlib.plugins.builddeb.errors import (33from bzrlib.plugins.builddeb.errors import (
34 MissingUpstreamTarball,34 MissingUpstreamTarball,
@@ -86,7 +86,7 @@
86 revid = db.revid_of_upstream_version_from_branch(version)86 revid = db.revid_of_upstream_version_from_branch(version)
87 if not db.has_pristine_tar_delta(revid):87 if not db.has_pristine_tar_delta(revid):
88 raise PackageVersionNotPresent(package, version, self)88 raise PackageVersionNotPresent(package, version, self)
89 info("Using pristine-tar to reconstruct the needed tarball.")89 note("Using pristine-tar to reconstruct the needed tarball.")
90 try:90 try:
91 db.reconstruct_pristine_tar(revid, package, version, target_filename)91 db.reconstruct_pristine_tar(revid, package, version, target_filename)
92 except PristineTarError:92 except PristineTarError:
@@ -112,14 +112,14 @@
112 raise PackageVersionNotPresent(package, upstream_version, self)112 raise PackageVersionNotPresent(package, upstream_version, self)
113113
114 sources.Restart()114 sources.Restart()
115 info("Using apt to look for the upstream tarball.")115 note("Using apt to look for the upstream tarball.")
116 while sources.Lookup(package):116 while sources.Lookup(package):
117 if upstream_version \117 if upstream_version \
118 == Version(sources.Version).upstream_version:118 == Version(sources.Version).upstream_version:
119 if self._run_apt_source(package, sources.Version, target_dir):119 if self._run_apt_source(package, sources.Version, target_dir):
120 return120 return
121 break121 break
122 info("apt could not find the needed tarball.")122 note("apt could not find the needed tarball.")
123 raise PackageVersionNotPresent(package, upstream_version, self)123 raise PackageVersionNotPresent(package, upstream_version, self)
124124
125 def _get_command(self, package, version_str):125 def _get_command(self, package, version_str):
@@ -160,7 +160,7 @@
160 self.upstream_branch.lock_read()160 self.upstream_branch.lock_read()
161 try:161 try:
162 revid = self._get_revision_id(version)162 revid = self._get_revision_id(version)
163 info("Exporting upstream branch revision %s to create the tarball",163 note("Exporting upstream branch revision %s to create the tarball",
164 revid)164 revid)
165 target_filename = self._tarball_path(package, version, target_dir)165 target_filename = self._tarball_path(package, version, target_dir)
166 tarball_base = "%s-%s" % (package, version)166 tarball_base = "%s-%s" % (package, version)
@@ -179,16 +179,16 @@
179179
180 def _get_orig_source(self, source_dir, desired_tarball_name,180 def _get_orig_source(self, source_dir, desired_tarball_name,
181 target_dir):181 target_dir):
182 info("Trying to use get-orig-source to retrieve needed tarball.")182 note("Trying to use get-orig-source to retrieve needed tarball.")
183 command = ["make", "-f", "debian/rules", "get-orig-source"]183 command = ["make", "-f", "debian/rules", "get-orig-source"]
184 proc = subprocess.Popen(command, cwd=source_dir)184 proc = subprocess.Popen(command, cwd=source_dir)
185 ret = proc.wait()185 ret = proc.wait()
186 if ret != 0:186 if ret != 0:
187 info("Trying to run get-orig-source rule failed")187 note("Trying to run get-orig-source rule failed")
188 return False188 return False
189 fetched_tarball = os.path.join(source_dir, desired_tarball_name)189 fetched_tarball = os.path.join(source_dir, desired_tarball_name)
190 if not os.path.exists(fetched_tarball):190 if not os.path.exists(fetched_tarball):
191 info("get-orig-source did not create %s", desired_tarball_name)191 note("get-orig-source did not create %s", desired_tarball_name)
192 return False192 return False
193 repack_tarball(fetched_tarball, desired_tarball_name, 193 repack_tarball(fetched_tarball, desired_tarball_name,
194 target_dir=target_dir)194 target_dir=target_dir)
@@ -216,7 +216,7 @@
216 return216 return
217 finally:217 finally:
218 shutil.rmtree(tmpdir)218 shutil.rmtree(tmpdir)
219 info("No debian/rules file to try and use for a get-orig-source rule")219 note("No debian/rules file to try and use for a get-orig-source rule")
220 raise PackageVersionNotPresent(package, version, self)220 raise PackageVersionNotPresent(package, version, self)
221221
222222
@@ -228,14 +228,14 @@
228 self.larstiq = larstiq228 self.larstiq = larstiq
229229
230 def _uscan(self, package, upstream_version, watch_file, target_dir):230 def _uscan(self, package, upstream_version, watch_file, target_dir):
231 info("Using uscan to look for the upstream tarball.")231 note("Using uscan to look for the upstream tarball.")
232 r = os.system("uscan --upstream-version %s --force-download --rename "232 r = os.system("uscan --upstream-version %s --force-download --rename "
233 "--package %s --watchfile %s --check-dirname-level 0 " 233 "--package %s --watchfile %s --check-dirname-level 0 "
234 "--download --repack --destdir %s --download-version %s" %234 "--download --repack --destdir %s --download-version %s" %
235 (upstream_version, package, watch_file, target_dir,235 (upstream_version, package, watch_file, target_dir,
236 upstream_version))236 upstream_version))
237 if r != 0:237 if r != 0:
238 info("uscan could not find the needed tarball.")238 note("uscan could not find the needed tarball.")
239 return False239 return False
240 return True240 return True
241241
@@ -246,7 +246,7 @@
246 watchfile = 'debian/watch'246 watchfile = 'debian/watch'
247 watch_id = self.tree.path2id(watchfile)247 watch_id = self.tree.path2id(watchfile)
248 if watch_id is None:248 if watch_id is None:
249 info("No watch file to use to retrieve upstream tarball.")249 note("No watch file to use to retrieve upstream tarball.")
250 return None250 return None
251 (tmp, tempfilename) = tempfile.mkstemp()251 (tmp, tempfilename) = tempfile.mkstemp()
252 try:252 try:
@@ -293,7 +293,7 @@
293 shutil.rmtree(tmpdir)293 shutil.rmtree(tmpdir)
294294
295 def get_specific_version(self, package, version, target_dir):295 def get_specific_version(self, package, version, target_dir):
296 info("Using the current branch without the 'debian' directory "296 note("Using the current branch without the 'debian' directory "
297 "to create the tarball")297 "to create the tarball")
298 self._split(package, version, 298 self._split(package, version,
299 self._tarball_path(package, version, target_dir))299 self._tarball_path(package, version, target_dir))
@@ -403,9 +403,9 @@
403 :param target_dir: The directory to place the tarball in.403 :param target_dir: The directory to place the tarball in.
404 :return: The path to the tarball.404 :return: The path to the tarball.
405 """405 """
406 info("Looking for a way to retrieve the upstream tarball")406 note("Looking for a way to retrieve the upstream tarball")
407 if self.already_exists_in_target(target_dir):407 if self.already_exists_in_target(target_dir):
408 info("Upstream tarball already exists in build directory, "408 note("Upstream tarball already exists in build directory, "
409 "using that")409 "using that")
410 return os.path.join(target_dir, self._tarball_name())410 return os.path.join(target_dir, self._tarball_name())
411 if not self.already_exists_in_store():411 if not self.already_exists_in_store():
@@ -417,7 +417,7 @@
417 except PackageVersionNotPresent:417 except PackageVersionNotPresent:
418 raise MissingUpstreamTarball(self._tarball_name())418 raise MissingUpstreamTarball(self._tarball_name())
419 else:419 else:
420 info("Using the upstream tarball that is present in "420 note("Using the upstream tarball that is present in "
421 "%s" % self.store_dir)421 "%s" % self.store_dir)
422 assert self.provide_from_store_dir(target_dir)422 assert self.provide_from_store_dir(target_dir)
423 return os.path.join(target_dir, self._tarball_name())423 return os.path.join(target_dir, self._tarball_name())

Subscribers

People subscribed via source and target branches