lib/autobuild/importer.rb in autobuild-1.6.2.b3 vs lib/autobuild/importer.rb in autobuild-1.6.2.b4

- old
+ new

@@ -103,14 +103,13 @@ if kept_patches != cur_patches patch(package, kept_patches) end retry_count = 0 + package.progress_start "updating %s" begin - package.progress_start "updating %s" do - update(package) - end + update(package) rescue Interrupt raise rescue ::Exception => original_error # If the package is patched, it might be that the update # failed because we needed to unpatch first. Try it out @@ -119,10 +118,11 @@ # make the import fail, but not make the patch # un-appliable. Importers that do not follow this rule # will have to unpatch by themselves. cur_patches = currently_applied_patches(package) if !cur_patches.empty? + package.progress_done package.message "update failed and some patches are applied, retrying after removing all patches first" begin patch(package, []) return perform_update(package) rescue Interrupt @@ -136,10 +136,12 @@ if retry_count > self.retry_count raise end package.message "update failed in #{package.srcdir}, retrying (#{retry_count}/#{self.retry_count})" retry + ensure + package.progress_done end patch(package) package.updated = true rescue Interrupt @@ -259,10 +261,10 @@ unapply_count = (cur_patches - patches).size if apply_count > 0 && unapply_count > 0 package.message "patching %s: applying #{apply_count} and unapplying #{unapply_count} patch(es)" elsif apply_count > 0 package.message "patching %s: applying #{apply_count} patch(es)" - else + elsif unapply_count > 0 package.message "patching %s: unapplying #{unapply_count} patch(es)" end while p = cur_patches.last unapply(package, p)