9309: Look for fpm-info in backports/$PACKAGE_NAME.
authorBrett Smith <brett@curoverse.com>
Tue, 31 May 2016 21:37:02 +0000 (17:37 -0400)
committerBrett Smith <brett@curoverse.com>
Tue, 31 May 2016 21:37:02 +0000 (17:37 -0400)
This lets us define additional fpm flags when we build a non-dir
package from a source directory.

build/run-build-packages.sh
build/run-library.sh

index 52fe399b9049061dc6acd0944fcda48af36651e7..bd49c4dedce491c2896d0bbece83198323ae1871 100755 (executable)
@@ -432,17 +432,17 @@ fpm_build $WORKSPACE/sdk/cwl "${PYTHON2_PKG_PREFIX}-arvados-cwl-runner" 'Curover
 # So we build this thing separately.
 #
 # Ward, 2016-03-17
-fpm_build schema_salad schema_salad "" python 1.11.20160506154702
+fpm_build schema_salad "" "" python 1.11.20160506154702
 
 # And schema_salad now depends on ruamel-yaml, which apparently has a braindead setup.py that requires special arguments to build (otherwise, it aborts with 'error: you have to install with "pip install ."'). Sigh.
 # Ward, 2016-05-26
-fpm_build ruamel.yaml ruamel.yaml "" python "" --python-setup-py-arguments "--single-version-externally-managed"
+fpm_build ruamel.yaml "" "" python "" --python-setup-py-arguments "--single-version-externally-managed"
 
 # And for cwltool we have the same problem as for schema_salad. Ward, 2016-03-17
-fpm_build cwltool cwltool "" python 1.0.20160519182434
+fpm_build cwltool "" "" python 1.0.20160519182434
 
 # FPM eats the trailing .0 in the python-rdflib-jsonld package when built with 'rdflib-jsonld>=0.3.0'. Force the version. Ward, 2016-03-25
-fpm_build rdflib-jsonld rdflib-jsonld "" python 0.3.0
+fpm_build rdflib-jsonld "" "" python 0.3.0
 
 # The PAM module
 if [[ $TARGET =~ debian|ubuntu ]]; then
index c7bc9538d1c7a54432a0fe840952acfdcea67c6b..58a177ec60b0bad3f6e7e36ecbadd7e4b4bcf5ce 100755 (executable)
@@ -178,8 +178,8 @@ fpm_build () {
   # pip).
   PACKAGE=$1
   shift
-  # The name of the package to build.  Defaults to $PACKAGE.
-  PACKAGE_NAME=${1:-$PACKAGE}
+  # The name of the package to build.
+  PACKAGE_NAME=$1
   shift
   # Optional: the vendor of the package.  Should be "Curoverse, Inc." for
   # packages of our own software.  Passed to fpm --vendor.
@@ -238,7 +238,7 @@ fpm_build () {
     COMMAND_ARR+=('--verbose' '--log' 'info')
   fi
 
-  if [[ "$PACKAGE_NAME" != "$PACKAGE" ]]; then
+  if [[ -n "$PACKAGE_NAME" ]]; then
     COMMAND_ARR+=('-n' "$PACKAGE_NAME")
   fi
 
@@ -265,6 +265,9 @@ fpm_build () {
       "${PACKAGE%%=/*}"
       # backports ("llfuse==0.41.1" => "backports/python-llfuse")
       "${WORKSPACE}/backports/${PACKAGE_TYPE}-${PACKAGE%%[<=>]*}")
+  if [[ -n "$PACKAGE_NAME" ]]; then
+      fpm_dirs+=("${WORKSPACE}/backports/${PACKAGE_NAME}")
+  fi
   for pkgdir in "${fpm_dirs[@]}"; do
       fpminfo="$pkgdir/fpm-info.sh"
       if [[ -e "$fpminfo" ]]; then
@@ -391,4 +394,3 @@ report_outcomes() {
         done
     fi
 }
-