Skip to content

Commit

Permalink
Fix candidate version retrieval for python pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Oct 17, 2024
1 parent 2fa8605 commit a334cba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ function get_release_version {

function pkg_exists {
local pkg_version="${2%"$DEB_DISTRO"}"
local available; available=$(LANG=C apt-cache policy "$1" | sed -n "s#^\s*Candidate:\s\(.*\)$DEB_DISTRO\..*#\1#p")
local available
available=$(LANG=C apt-cache policy "$1" | sed -n "s#^\s*Candidate:\s\(.*\)$DEB_DISTRO\..*#\1#p") # for ros pkgs
test -z "$available" && available=$(LANG=C apt-cache policy "$1" | sed -n "s#^\s*Candidate:\s\(.*\)#\1#p") # for python pkgs
if [ "$SKIP_EXISTING" == "true" ] && [ -n "$available" ] && [ "$available" != "(none)" ] && \
dpkg --compare-versions "$available" ">=" "$pkg_version" && ! "$SRC_PATH/scripts/upstream_rebuilds.py" "$DEBS_PATH"; then
echo "Skipped (existing version $available >= $pkg_version)"
Expand Down

0 comments on commit a334cba

Please sign in to comment.