diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 8287c39502..5e344fc625 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -660,31 +660,25 @@ jobs: # List dependencies dependencies=$(dpkg-deb -I $package | grep Depends | sed 's/Depends: //' | sed 's/,//g' | sed 's/(\(.*\)//g') || { echo "$error_output" >> $error_log; echo "Error while listing dependencies of the package $package" >> $error_log; true; } for dependency in $dependencies; do - # Skip non-perl dependencies - if [[ $dependency != lib*-perl ]]; then - continue - fi # If the dependency exists in the Debian repository, don't check the local dependencies dependency_info=$(apt-cache policy $dependency) if [[ -n $dependency_info ]]; then - echo "Dependency exists in debian repository." - continue + echo "Dependency $dependency exists in debian repository." + apt-get install -y $dependency else # If the dependency has been built in the same workflow, install it for dependency_package in $(find . -maxdepth 1 -regex "\.\/${dependency}_[0-9].*all\.deb" -o -regex "\.\/${dependency}_[0-9].*${{ matrix.arch }}\.deb"); do echo "Installing dependency: $dependency_package" - echo $(dpkg-deb --info $package) - error_output=$(apt-get -o Debug::pkgProblemResolver=true -o Debug::dpkg=true -o Debug::pkgDepCache::Marker=true install -y ./$dependency_package 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of the dependency $dependency" >> $error_log; true; } + error_output=$(apt-get install -y ./$dependency_package 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of the dependency $dependency" >> $error_log; true; } done fi done # Install package, then uninstall it with all his dependencies echo "Package installation..." - echo $(dpkg-deb --info $package) - error_output=$(apt-get -o Debug::pkgProblemResolver=true -o Debug::dpkg=true -o Debug::pkgDepCache::Marker=true install -y $package 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of the package $package" >> $error_log; true; } + error_output=$(dpkg -i $package 2>&1) || { echo "$error_output" >> $error_log; echo "Error during installation of the package $package" >> $error_log; true; } echo "Package installation done." echo "Package uninstallation..." - 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; } + error_output=$(dpkg --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; } echo "Package uninstallation done." done # If the file error_log exists and is not empty, the workflow is in error