]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Fix wrong distribution list for feature/* builds on wheezy.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Tue, 11 Feb 2014 18:15:11 +0000 (19:15 +0100)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Tue, 11 Feb 2014 18:15:11 +0000 (19:15 +0100)
.pbuilderrc
debian_build.py

index 965db7bc3c61f35b806a0317e93da330f81fa33d..6b977bc1e67b14adccf80dd162055ae299f68cd9 100644 (file)
@@ -74,10 +74,16 @@ if [ "$DIST" == "wheezy" ] ; then
         then
             OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST pre-staging main contrib non-free |"
         fi
-        if echo ${PB_SUITE} | grep -qE "^experimental-.*"
+        if echo ${PB_SUITE} | grep -qE "^wheezy-dev-.*"
         then
+            BASETGZ="/var/cache/pbuilder/$NAME-experimental-wheezy-base.tgz"
+            BASEPATH="/var/cache/pbuilder/$NAME-experimental-wheezy-base.cow"
             OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST pre-staging main contrib non-free |"
-            OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST $PB_SUITE main contrib non-free |"
+            if wget -q --spider "http://alexandria.pb.local/pb-$DIST/dists/$PB_SUITE/Release"; then
+                # Only add the wheezy-dev-* repository if it already exist
+                # It will not exist for the first package that targets this repository.
+                OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST $PB_SUITE main contrib non-free |"
+            fi
         fi
 else
         OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-squeeze production main contrib non-free |"
index 402f67fcb558f0312af2389f4ffa341d39b6443b..3d7d7664be87646dae6ce760a1f50dec8f0991cf 100755 (executable)
@@ -252,7 +252,12 @@ if __name__ == '__main__':
             ))
             exit_error()
 
-        new_dist = 'dev-{0}'.format(local_branch.replace("/", "-"))
+        if curr_dist == "wheezy":
+            new_dist = "wheezy-dev-{0}".format(local_branch.replace("/", "-"))
+            pb_suite = new_dist
+        else:
+            new_dist = 'dev-{0}'.format(local_branch.replace("/", "-"))
+            pb_suite = 'experimental-{dist}'.format(dist=curr_dist)
         new_version = '{version}~experimental{date}+{build}+{commit}{suffix}'.format(
             version=curr_version,
             date=daily_date,
@@ -260,7 +265,6 @@ if __name__ == '__main__':
             commit=curr_commit_id[0:7],
             suffix=options.version_suffix,
         )
-        pb_suite = 'experimental-{dist}'.format(dist=curr_dist)
         reprepro_base = '/srv/dev-{dist}'.format(dist=curr_dist)
 
     else: