← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad-buildd:fix-version-checks into launchpad-buildd:master

 

Colin Watson has proposed merging ~cjwatson/launchpad-buildd:fix-version-checks into launchpad-buildd:master.

Commit message:
Fix version checks for deployments using Python 3

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/389595
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:fix-version-checks into launchpad-buildd:master.
diff --git a/.gitignore b/.gitignore
index b47264e..66b9784 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ debian/debhelper-build-stamp
 debian/files
 debian/launchpad-buildd
 debian/python-lpbuildd
+debian/python3-lpbuildd
 debian/tmp
 debian/*.debhelper.log
 debian/*.debhelper
diff --git a/bin/builder-prep b/bin/builder-prep
index cb8ff90..0a75e9a 100755
--- a/bin/builder-prep
+++ b/bin/builder-prep
@@ -9,7 +9,7 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin:${PATH}
 
 NTPDATE=ntpdate
 SUDO=sudo
-PACKAGES="launchpad-buildd python-lpbuildd sbuild bzr-builder bzr git-build-recipe git dpkg-dev python-debian"
+PACKAGES="launchpad-buildd python-lpbuildd python3-lpbuildd sbuild bzr-builder bzr git-build-recipe git dpkg-dev python-debian python3-debian"
 KERNEL=$(uname -snrvm)
 
 echo "Kernel version: $KERNEL"
diff --git a/debian/changelog b/debian/changelog
index f998389..70d64cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+launchpad-buildd (191) UNRELEASED; urgency=medium
+
+  * Fix version checks for deployments using Python 3.
+
+ -- Colin Watson <cjwatson@xxxxxxxxxx>  Thu, 20 Aug 2020 12:21:28 +0100
+
 launchpad-buildd (190) bionic; urgency=medium
 
   [ Colin Watson ]
diff --git a/lpbuildd/builder.py b/lpbuildd/builder.py
index ee3364b..4c4135a 100644
--- a/lpbuildd/builder.py
+++ b/lpbuildd/builder.py
@@ -705,7 +705,7 @@ class XMLRPCBuilder(xmlrpc.XMLRPC):
         self._managers = {}
         cache = apt.Cache()
         try:
-            installed = cache["python-lpbuildd"].installed
+            installed = cache["launchpad-buildd"].installed
             self._version = installed.version if installed else None
         except KeyError:
             self._version = None