6497: Bugfix distro names for DebianPackageSuites.
authorBrett Smith <brett@curoverse.com>
Thu, 23 Jul 2015 20:59:11 +0000 (16:59 -0400)
committerBrett Smith <brett@curoverse.com>
Thu, 23 Jul 2015 20:59:11 +0000 (16:59 -0400)
freight is expecting a codename like wheezy or jessie, but we've been
using our internal distro+version names there.  This fixes that.

Nico gave a thumbs up to this patch.  Refs #6497.

jenkins/run_upload_packages.py

index 3eac15b2305bcbf2ec940aa51ff0837c7dc76602..fb4defd8f9ae7182a1bb3ae338d22b70fdf7f3ac 100755 (executable)
@@ -144,15 +144,21 @@ class DistroPackageSuite(PackageSuite):
 class DebianPackageSuite(DistroPackageSuite):
     FREIGHT_SCRIPT = """
 cd "$1"; shift
-TARGET=$1; shift
-freight add "$@" "apt/$TARGET"
+DISTNAME=$1; shift
+freight add "$@" "apt/$DISTNAME"
 freight cache
 rm "$@"
 """
+    TARGET_DISTNAMES = {
+        'debian7': 'wheezy',
+        'debian8': 'jessie',
+        'ubuntu1204': 'precise',
+        }
 
     def post_uploads(self, paths):
         self._run_script(self.FREIGHT_SCRIPT, self.REMOTE_DEST_DIR,
-                         self.target, *self._paths_basenames(paths))
+                         self.TARGET_DISTNAMES[self.target],
+                         *self._paths_basenames(paths))
 
 
 class RedHatPackageSuite(DistroPackageSuite):