Bugfix: fix detection of already generated Python deb/rpm packages.
authorWard Vandewege <ward@curii.com>
Fri, 16 Oct 2020 01:04:55 +0000 (21:04 -0400)
committerWard Vandewege <ward@curii.com>
Fri, 16 Oct 2020 01:04:55 +0000 (21:04 -0400)
refs #16982

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

build/run-library.sh

index 47e3861a9578f162fc8e602633c84d366fbbc4a5..74475c24218c54e17d38262c7614370555d9e203 100755 (executable)
@@ -529,8 +529,8 @@ fpm_build_virtualenv () {
       UNFILTERED_PYTHON_VERSION=$ARVADOS_BUILDING_VERSION
       PYTHON_VERSION=$(echo -n $ARVADOS_BUILDING_VERSION | sed s/~dev/.dev/g | sed s/~rc/rc/g)
   else
-      UNFILTERED_PYTHON_VERSION=$(awk '($1 == "Version:"){print $2}' *.egg-info/PKG-INFO)
-      PYTHON_VERSION=$UNFILTERED_PYTHON_VERSION
+      PYTHON_VERSION=$(awk '($1 == "Version:"){print $2}' *.egg-info/PKG-INFO)
+      UNFILTERED_PYTHON_VERSION=$(echo -n $PYTHON_VERSION | sed s/\.dev/~dev/g |sed 's/\([0-9]\)rc/\1~rc/g')
   fi
 
   # See if we actually need to build this package; does it exist already?