Skip to content

Commit

Permalink
Fix OpenSuse makecache
Browse files Browse the repository at this point in the history
  • Loading branch information
RazvanLiviuVarzaru committed Oct 17, 2024
1 parent 30a9189 commit 739cd61
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/bash_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,12 @@ rpm_pkg_makecache() {
# Try several times, to avoid sporadic "The requested URL returned error: 404"
made_cache=0
for i in {1..5}; do
sudo rm -rf "/var/cache/$pkg_cmd/*"
sudo "$pkg_cmd" clean all
if [[ $ID_LIKE =~ ^suse* ]]; then
sudo rm -rf "/var/cache/zypp/*"
sudo "$pkg_cmd" clean --all
else
sudo rm -rf "/var/cache/$pkg_cmd/*"
sudo "$pkg_cmd" clean all
source /etc/os-release
if [[ $ID == "rhel" ]]; then
sudo subscription-manager refresh
Expand Down

0 comments on commit 739cd61

Please sign in to comment.