Skip to content

Commit

Permalink
Add warning messages for existing libs in official debian repos
Browse files Browse the repository at this point in the history
  • Loading branch information
sdepassio committed Dec 31, 2024
1 parent 63eb883 commit a445ef1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,13 @@ jobs:
package_info=$(apt-cache policy ${{ steps.package-infos.outputs.package_name }})
do_not_build="false"
if [[ -n $package_info ]]; then
echo "Package already exists in the repository."
candidate_version=$(echo "$package_info" | grep 'Candidate:' | awk '{print $2}')
if [[ "$candidate_version" == "${{ steps.package-infos.outputs.package_version }}"* ]]; then
echo "Package already exists in the repository with the same version."
echo "::warning::Package ${{ steps.package-infos.outputs.package_name }} already exists in the official ${{ matrix.distrib }} repository with the same version."
do_not_build="true"
else
echo "::warning::Package ${{ steps.package-infos.outputs.package_name }} exists in the official ${{ matrix.distrib }} repository with a different version."
do_not_build="false"
fi
fi
echo "do_not_build=$do_not_build" >> $GITHUB_OUTPUT
Expand All @@ -454,11 +456,9 @@ jobs:
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --depends $PACKAGE_DEPENDENCY"
done
fi
if [ ! -z "${{ matrix.no-auto-depends }}" ]; then
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends"
fi
fpm -a native -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES -v ${{ steps.package-infos.outputs.package_version }} ${{ matrix.name }}
shell: bash

Expand Down

0 comments on commit a445ef1

Please sign in to comment.