16976: use unfiltered version number when checking for deb/rpm of our
authorWard Vandewege <ward@curii.com>
Thu, 8 Oct 2020 18:23:19 +0000 (14:23 -0400)
committerWard Vandewege <ward@curii.com>
Thu, 8 Oct 2020 18:23:19 +0000 (14:23 -0400)
       Python packages.

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

build/run-library.sh

index 216b5e5b0f16f852cc6aecb2f41a92311bb32ac8..a085843d29de42f621a221fb73faf9edc345e9d1 100755 (executable)
@@ -526,8 +526,10 @@ fpm_build_virtualenv () {
 
   # Determine the package version from the generated sdist archive
   if [[ -n "$ARVADOS_BUILDING_VERSION" ]] ; then
+      UNFILTERED_PYTHON_VERSION=$(echo -n $ARVADOS_BUILDING_VERSION)
       PYTHON_VERSION=$(echo -n $ARVADOS_BUILDING_VERSION | sed s/~rc/rc/g)
   else
+      UNFILTERED_PYTHON_VERSION=$(awk '($1 == "Version:"){print $2}' *.egg-info/PKG-INFO)
       PYTHON_VERSION=$(awk '($1 == "Version:"){print $2}' *.egg-info/PKG-INFO)
   fi
 
@@ -535,7 +537,7 @@ fpm_build_virtualenv () {
   # We can't do this earlier than here, because we need PYTHON_VERSION...
   # This isn't so bad; the sdist call above is pretty quick compared to
   # the invocation of virtualenv and fpm, below.
-  if ! test_package_presence "$PYTHON_PKG" $PYTHON_VERSION $PACKAGE_TYPE $ARVADOS_BUILDING_ITERATION; then
+  if ! test_package_presence "$PYTHON_PKG" $UNFILTERED_PYTHON_VERSION $PACKAGE_TYPE $ARVADOS_BUILDING_ITERATION; then
     return 0
   fi