[SCM] ci-tooling packaging branch, master, updated. c12122d0c27642497342a8869ce239685164ab26

Harald Sitter apachelogger-guest at moszumanska.debian.org
Thu Feb 26 13:04:22 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=c12122d

The following commit has been merged in the master branch:
commit c12122d0c27642497342a8869ce239685164ab26
Author: Harald Sitter <sitter at kde.org>
Date:   Thu Feb 26 14:04:19 2015 +0100

    if apt-get update fails after add-apt-repo remove the repo and abort
    
    if a ppa is not populated it will fail to apt-get update and cause
    subsequent failure for the live ppa checks. to avoid this when trying to
    add we check the return value of the update and if it fails revert the
    addition and report back accordingly.
    
    if daily couldn't be added don't bother with any of the additional foo
---
 kci/install_check.rb | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/kci/install_check.rb b/kci/install_check.rb
index 494c162..22238bf 100755
--- a/kci/install_check.rb
+++ b/kci/install_check.rb
@@ -142,7 +142,12 @@ class CiPPA
     args << "ppa:kubuntu-ci/#{@type}"
     LOG.info "apt-add-repository #{args.join(' ')}"
     system('apt-add-repository', *args)
-    apt(:update)
+    updated = apt(:update)
+    unless to_remove && !updated
+      # Updated failed. Rip the PPA out again.
+      LOG.error "#{@type} caused an apt update fail, removing it again..."
+      return software_properties(:remove)
+    end
     !to_remove # Return whether or not this ppa is now added.
   end
 
@@ -162,13 +167,14 @@ live_ppa.remove # remove live before attempting to use daily.
 
 # Add the present daily snapshot, install everything.
 # If this fails then the current snapshot is kaputsies....
-daily_ppa.add
-unless daily_ppa.install
-  LOG.info 'daily failed to install.'
-  daily_purged = daily_ppa.purge
-  unless daily_purged
-    LOG.info 'daily failed to install and then failed to purge. Maybe check' \
-             ' maintscripts?'
+if daily_ppa.add
+  unless daily_ppa.install
+    LOG.info 'daily failed to install.'
+    daily_purged = daily_ppa.purge
+    unless daily_purged
+      LOG.info 'daily failed to install and then failed to purge. Maybe check' \
+               ' maintscripts?'
+    end
   end
 end
 LOG.unknown 'done with daily'

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list