Skip to content

Commit

Permalink
Merge pull request #535 from auebergang/master
Browse files Browse the repository at this point in the history
patchman-client - Update yum repo config parsing
  • Loading branch information
furlongm authored Dec 7, 2023
2 parents 1f39836 + b80a12e commit d531c30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/patchman-client
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ get_repos() {
releasever=$(rpm -q --qf "%{version}\n" --whatprovides redhat-release | sort -u)
let numrepos=$(ls /etc/yum.repos.d/*.repo | wc -l)
if [ ${numrepos} -gt 0 ] ; then
priorities=$(sed -n -e "/^name/h; /priority *=/{ G; s/\n/ /; s/ity *= *\(.*\)/ity=\1/ ; s/\$releasever/${releasever}/ ; s/name=\(.*\)/'\1 ${host_arch}'/ ; p }" /etc/yum.repos.d/*.repo)
priorities=$(sed -n -e "/^name/h; /priority *=/{ G; s/\n/ /; s/ity *= *\(.*\)/ity=\1/ ; s/\$releasever/${releasever}/ ; s/name *= *\(.*\)/'\1 ${host_arch}'/ ; p }" /etc/yum.repos.d/*.repo)
fi
# replace this with a dedicated awk or simple python script?
yum_repolist=$(yum repolist enabled --verbose 2>/dev/null | sed -e "s/:\? *([0-9]\+ more)$//g" -e "s/ ([0-9]\+$//g" -e "s/:\? more)$//g" -e "s/'//g" -e "s/%/%%/g")
Expand Down

0 comments on commit d531c30

Please sign in to comment.