Merge branch 'master' into 8345-llfuse-unpin
[arvados.git] / jenkins / run-library.sh
index 7198345b117590e974dd5287ff0dfd95a6102898..bec5279cef254a631cc84517ab4750197ae70a16 100755 (executable)
@@ -148,9 +148,8 @@ handle_rails_package() {
     local -a pos_args=("$srcdir/=$railsdir" "$pkgname" "Curoverse, Inc." dir
                        "$(cat "$version_file")")
     local license_arg="$license_path=$railsdir/$(basename "$license_path")"
-    # --iteration=3 accommodates the package scripts change from #8014.
-    # --iteration=4 accommodates the packaging changes (inclusion of vendor/cache) from #8008.
-    local -a switches=(--iteration=4
+    # --iteration=5 accommodates the package script bugfixes #8371 and #8413.
+    local -a switches=(--iteration=5
                        --after-install "$scripts_dir/postinst"
                        --before-remove "$scripts_dir/prerm"
                        --after-remove "$scripts_dir/postrm")
@@ -218,6 +217,12 @@ fpm_build () {
   declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "-s" "$PACKAGE_TYPE" "-t" "$FORMAT")
   if [ python = "$PACKAGE_TYPE" ]; then
     COMMAND_ARR+=(--exclude=\*/{dist,site}-packages/tests/\*)
+    if [ deb = "$FORMAT" ]; then
+        # Dependencies are built from setup.py.  Since setup.py will never
+        # refer to Debian package iterations, it doesn't make sense to
+        # enforce those in the .deb dependencies.
+        COMMAND_ARR+=(--deb-ignore-iteration-in-dependencies)
+    fi
   fi
 
   if [[ "$PACKAGE_NAME" != "$PACKAGE" ]]; then
@@ -269,8 +274,9 @@ fpm_build () {
               echo "Attemping to install build_dep $pkg using apt-get"
               apt-get install -y "$pkg"
           fi
+          apt-get -y -f install
       else
-          pkg_rpm=$(ls $WORKSPACE/packages/$TARGET/$pkg*.rpm | sort -rg | awk 'NR==1')
+          pkg_rpm=$(ls "$WORKSPACE/packages/$TARGET/$pkg"-[0-9]*.rpm | sort -rg | awk 'NR==1')
           if [[ -e $pkg_rpm ]]; then
               echo "Installing build_dep $pkg from $pkg_rpm"
               rpm -i "$pkg_rpm"