diff --git a/SOURCES/BZ-1476701-handle-md-fetch-errors.patch b/SOURCES/BZ-1476701-handle-md-fetch-errors.patch new file mode 100644 index 0000000..652b89c --- /dev/null +++ b/SOURCES/BZ-1476701-handle-md-fetch-errors.patch @@ -0,0 +1,32 @@ +diff -up yum-utils-1.1.31/reposync.py.orig yum-utils-1.1.31/reposync.py +--- yum-utils-1.1.31/reposync.py.orig 2019-04-26 12:44:55.323812328 +0200 ++++ yum-utils-1.1.31/reposync.py 2019-04-26 12:45:36.235545079 +0200 +@@ -182,7 +182,11 @@ def main(): + # and package files ... needs to be setup before .repos (ie. RHN/etc.). + if not opts.quiet: + my.repos.setProgressBar(TextMeter(fo=sys.stdout), TextMultiFileMeter(fo=sys.stdout)) +- my.doRepoSetup() ++ try: ++ my.doRepoSetup() ++ except yum.Errors.RepoError, e: ++ print >> sys.stderr, "Error setting up repositories: %s" % e ++ sys.exit(1) + + if len(opts.repoid) > 0: + myrepos = [] +diff -up yum-utils-1.1.31/repotrack.py.orig yum-utils-1.1.31/repotrack.py +--- yum-utils-1.1.31/repotrack.py.orig 2019-04-26 12:44:55.319812255 +0200 ++++ yum-utils-1.1.31/repotrack.py 2019-04-26 12:45:01.929933148 +0200 +@@ -169,7 +169,11 @@ def main(): + # enable the ones we like + for repo in myrepos: + repo.enable() +- my._getSacks(archlist=archlist, thisrepo=repo.id) ++ try: ++ my._getSacks(archlist=archlist, thisrepo=repo.id) ++ except yum.Errors.RepoError, e: ++ my.logger.error(e) ++ sys.exit(1) + + if opts.repofrompath: + for repo in opts.repofrompath: diff --git a/SPECS/yum-utils.spec b/SPECS/yum-utils.spec index 37cc210..7e8dba5 100644 --- a/SPECS/yum-utils.spec +++ b/SPECS/yum-utils.spec @@ -12,7 +12,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.31 -Release: 50%{?dist} +Release: 52%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -79,6 +79,9 @@ Patch181: BZ-1506205-repotrack-add-repofrompath-opt.patch Patch182: BZ-1600618-reposync-prevent-path-traversal.patch Patch183: BZ-1493489-yum-config-manager-fix-add-repo-2.patch +#rhel-7.7 +Patch200: BZ-1476701-handle-md-fetch-errors.patch + URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -524,6 +527,9 @@ This plugin touches rpmdb files to work around overlayfs issues. %patch182 -p1 %patch183 -p1 +#rhel-7.7 +%patch200 -p1 + %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -854,6 +860,14 @@ fi %{_mandir}/man1/yum-ovl.1.* %changelog +* Fri Apr 26 2019 Michal Domonkos - 1.1.31-52 +- reposync: fix up the previous patch +- Related: bug#1476701 + +* Wed Mar 27 2019 Michal Domonkos - 1.1.31-51 +- reposync: repotrack: handle metadata fetch exceptions +- Related: bug#1476701 + * Fri Aug 24 2018 Michal Domonkos - 1.1.31-50 - yum-config-manager: additional fixes for --add-repo - Related: bug#1493489