Skip to content

Commit

Permalink
Try making cache with sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
RazvanLiviuVarzaru committed Oct 17, 2024
1 parent 39df53f commit 359411e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions scripts/bash_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ rpm_repoquery() {
set +u
# return full package list from repository
if [[ $ID_LIKE =~ ^suse* ]]; then
sudo rpm --import https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB >/dev/null
zypper packages -r "${repo_name}" | grep "MariaDB" | awk '{print $4}'
sudo zypper packages -r "${repo_name}" | grep "MariaDB" | awk '{print $4}'
else
repoquery --disablerepo=* --enablerepo="${repo_name}" -a -q |
cut -d ":" -f1 | sort -u | sed 's/-0//'
Expand Down
6 changes: 5 additions & 1 deletion scripts/rpm-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ bb_log_info "Package_list: $package_list"
# sudo rm -rf
# /etc/zypp/repos.d/SUSE_Linux_Enterprise_Server_12_SP3_x86_64:SLES12-SP3-Updates.repo
# /etc/zypp/repos.d/SUSE_Linux_Enterprise_Server_12_SP3_x86_64:SLES12-SP3-Pool.repo
sudo "$pkg_cmd" clean all
if [[ $ID_LIKE =~ ^suse* ]]; then
sudo "$pkg_cmd" clean --all
else
sudo "$pkg_cmd" clean all
fi

if [[ $ID_LIKE =~ ^suse* ]]; then
pkg_cmd_nonint="-n"
Expand Down

0 comments on commit 359411e

Please sign in to comment.