Arturo Borrero Gonzalez has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404963 )

Change subject: apt: apt-upgrades: dont fail if new packages are being installed
......................................................................

apt: apt-upgrades: dont fail if new packages are being installed

Previous to this patch, if new packages are being installed due to
dependencies, the apt-upgrades script will crash.

Bug: T178717
Change-Id: Ib33e4b71297ec1ae1576266bfeeeeb7cfdd727b6
Signed-off-by: Arturo Borrero Gonzalez <aborr...@wikimedia.org>
---
M modules/apt/files/apt-upgrade.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/404963/1

diff --git a/modules/apt/files/apt-upgrade.py b/modules/apt/files/apt-upgrade.py
index fb3415b..00fd498 100644
--- a/modules/apt/files/apt-upgrade.py
+++ b/modules/apt/files/apt-upgrade.py
@@ -31,7 +31,10 @@
     if not verbose:
         return
     name = pkg.name
-    orig = pkg.installed.version
+    if pkg.is_installed:
+        orig = pkg.installed.version
+    else:
+        orig = "absent"
     if pkg.marked_delete:
         dest = "remove"
     else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib33e4b71297ec1ae1576266bfeeeeb7cfdd727b6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Arturo Borrero Gonzalez <aborr...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to