Skip to content

Commit

Permalink
Keep only packages with error, and update error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
sdepassio committed Dec 11, 2024
1 parent 5831baf commit 0dbcfa0
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/test-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,8 @@ jobs:
image: [packaging-plugins-bullseye, packaging-plugins-bookworm, packaging-plugins-jammy, packaging-plugins-bullseye-arm64]
name:
[
"Crypt::OpenSSL::AES",
"JMX::Jmx4Perl",
"Net::Amazon::Signature::V4",
"Paws",
"ZMQ::LibZMQ4"
"Paws"
]
include:
- runner_name: ubuntu-24.04
Expand Down Expand Up @@ -471,13 +468,13 @@ jobs:
for dependency in $dependencies; do
# If the dependency has been built in the same workflow, install it
if [ -f $dependency*.rpm ]; then
error_output=$(dnf install -y $dependency*.rpm 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of $dependency" >> $error_log; true; }
error_output=$(dnf install -y $dependency*.rpm 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of the dependency $dependency" >> $error_log; true; }
fi
done
# Install package
error_output=$(dnf install -y $package 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of $package" >> $error_log; true; }
error_output=$(dnf install -y $package 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of the package $package" >> $error_log; true; }
# Uninstall package with all his dependencies
error_output=$(dnf autoremove -y $(echo $package | sed 's/_[0-9].*\.rpm//' | sed 's/.\///') 2>&1) || { echo "$error_output" >> $error_log; echo "Error during autoremove of $package" >> $error_log; true; }
error_output=$(dnf autoremove -y $(echo $package | sed 's/_[0-9].*\.rpm//' | sed 's/.\///') 2>&1) || { echo "$error_output" >> $error_log; echo "Error during autoremove of the package $package" >> $error_log; true; }
done
# Si le fichier error_log existe et n'est pas vide, le workflow est en erreur
if [ -s $error_log ]; then
Expand All @@ -499,13 +496,13 @@ jobs:
for dependency in $dependencies; do
# If the dependency has been built in the same workflow, install it
if [ -f $dependency*.deb ]; then
error_output=$(apt-get install -y $dependency*.deb 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of $dependency" >> $error_log; true; }
error_output=$(apt-get install -y $dependency*.deb 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of the dependency $dependency" >> $error_log; true; }
fi
done
# Install package
error_output=$(apt-get install -y $package 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of $package" >> $error_log; true; }
error_output=$(apt-get install -y $package 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of the package $package" >> $error_log; true; }
# Uninstall package with all his dependencies
error_output=$(apt-get autoremove -y --purge $(echo $package | sed 's/_[0-9].*\.deb//' | sed 's/.\///') 2>&1) || { echo "$error_output" >> $error_log; echo "Error during autoremove of $package" >> $error_log; true; }
error_output=$(apt-get autoremove -y --purge $(echo $package | sed 's/_[0-9].*\.deb//' | sed 's/.\///') 2>&1) || { echo "$error_output" >> $error_log; echo "Error during autoremove of the package $package" >> $error_log; true; }
done
# Si le fichier error_log existe et n'est pas vide, le workflow est en erreur
if [ -s $error_log ]; then
Expand Down

0 comments on commit 0dbcfa0

Please sign in to comment.