Skip to content

Commit

Permalink
Auto Import keys
Browse files Browse the repository at this point in the history
  • Loading branch information
RazvanLiviuVarzaru committed Oct 17, 2024
1 parent 6f5324f commit 8d9ab0b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/bash_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ rpm_pkg_makecache() {
# ID_LIKE may not exist
set +u
if [[ $ID_LIKE =~ ^suse* ]]; then
pkg_cache="refresh"
pkg_cache="--gpg-auto-import-keys refresh"
else
pkg_cache="makecache"
fi
Expand Down Expand Up @@ -215,9 +215,8 @@ 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
sudo zypper packages -r >/dev/null #First run returns information about the Cache.
zypper packages -r "${repo_name}" | grep "MariaDB" | awk '{print $4}' #After cache is made, no need for sudo
sudo zypper --gpg-auto-import-keys packages -r "${repo_name}">/dev/null
sudo zypper packages -r "${repo_name}" | grep "MariaDB" | awk '{print $4}' #After cache is made, no need for sudo
else
repoquery --disablerepo=* --enablerepo="${repo_name}" -a -q |
cut -d ":" -f1 | sort -u | sed 's/-0//'
Expand Down

0 comments on commit 8d9ab0b

Please sign in to comment.