Muehlenhoff has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/281669

Change subject: Ignore packages in deinstalled status
......................................................................

Ignore packages in deinstalled status

Change-Id: I0a2a1abe2cb550c7db7102465fdb85d68468f04c
---
M debian/changelog
M docs/TODO
M minion/debdeploy-minion.py
3 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/debdeploy 
refs/changes/69/281669/1

diff --git a/debian/changelog b/debian/changelog
index 2b6bfaa..eca6019 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@
     dict, but a free-form string error message. Log these as well.
     Also, fix local minion apt logging in that case.
   * Detect outdated package versions and flag an error
+  * Packages in deinstalled status ("rc" in dpkg) are now ignored by
+    the minion
 
  -- Moritz Muehlenhoff <[email protected]>  Fri, 20 Nov 2015 12:50:01 
+0100
 
diff --git a/docs/TODO b/docs/TODO
index cc26e81..10a44b7 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -1,8 +1,6 @@
 
 Bugs:
 - Double-checking pinning to a specific version to update to (on precise)
-- The minion chokes on packages which are in status "rc", but which don't
-  contain any files, they should be ignored entirely
 
 Refinements to existing functionality:
 - Bash completion for commands and options
diff --git a/minion/debdeploy-minion.py b/minion/debdeploy-minion.py
index 318b5f4..397dc0e 100644
--- a/minion/debdeploy-minion.py
+++ b/minion/debdeploy-minion.py
@@ -211,6 +211,14 @@
     installed_binary_packages = []
     for pkg in deb822.Packages.iter_paragraphs(file('/var/lib/dpkg/status')):
 
+        # skip packages in deinstalled status ("rc" in dpkg). These are not 
relevant for
+        # upgrades and cause problems when binary package names have changed 
(since package
+        # installations are forced with a specific version which is not 
available for those
+        # outdated binary package names)
+        installation_status = pkg['Status'].split()[0]
+        if installation_status == "deinstall":
+            continue
+
         # Source packages which have had a binNMU have a Source: entry with 
the source
         # package version in brackets, so strip these
         # If no Source: entry is present in /var/lib/dpkg/status, then the 
source package

-- 
To view, visit https://gerrit.wikimedia.org/r/281669
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a2a1abe2cb550c7db7102465fdb85d68468f04c
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/debdeploy
Gerrit-Branch: master
Gerrit-Owner: Muehlenhoff <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to