[Pkg-bazaar-commits] ./bzr-builddeb/trunk.old r249: Make moving a source result work.

James Westby jw+debian at jameswestby.net
Wed Dec 10 08:32:53 UTC 2008


------------------------------------------------------------
revno: 249
committer: James Westby <jw+debian at jameswestby.net>
branch nick: 2.0
timestamp: Tue 2008-08-26 18:41:31 +0100
message:
  Make moving a source result work.
  
  The result moving code assumed that the resulting changes file
  would be $arch.changes, but in -S mode it is source.changes.
  
  This will fail if the user sets a source builder as the main or
  quick builders.
modified:
  TODO
  __init__.py
  builder.py
-------------- next part --------------
=== modified file 'TODO'
--- a/TODO	2008-08-26 15:50:05 +0000
+++ b/TODO	2008-08-26 17:41:31 +0000
@@ -23,4 +23,5 @@
   - default result dir not being used if the builder puts the files
     somewhere else so that the build doesn't fail.
   - Falling back to ../tarballs if .. doesn't have what we need.
+  - Moving a source result.
 

=== modified file '__init__.py'
--- a/__init__.py	2008-08-26 15:41:59 +0000
+++ b/__init__.py	2008-08-26 17:41:31 +0000
@@ -301,10 +301,13 @@
       run_hook('post-build', config, wd=properties.source_dir())
       if not dont_purge:
         build.clean()
+      arch = None
+      if source:
+        arch = "source"
       if result is not None:
-        build.move_result(result)
+        build.move_result(result, arch=arch)
       else:
-        build.move_result(default_result_dir, allow_missing=True)
+        build.move_result(default_result_dir, allow_missing=True, arch=arch)
 
 
 register_command(cmd_builddeb)

=== modified file 'builder.py'
--- a/builder.py	2008-08-26 15:50:05 +0000
+++ b/builder.py	2008-08-26 17:41:31 +0000
@@ -317,7 +317,7 @@
     info("Cleaning build dir: %s", source_dir)
     shutil.rmtree(source_dir)
 
-  def move_result(self, result, allow_missing=False):
+  def move_result(self, result, allow_missing=False, arch=None):
     """Moves the files that resulted from the build to the given dir.
 
     The files are found by reading the changes file.
@@ -326,7 +326,7 @@
     version = self._properties.full_version()
     try:
         changes = DebianChanges(package, version,
-                self._properties.build_dir())
+                self._properties.build_dir(), arch=arch)
     except MissingChanges:
         if allow_missing:
             return



More information about the Pkg-bazaar-commits mailing list