Blame SOURCES/BZ-1528608-updateinfo-preload-pkgsack.patch

92fe97
commit 0ee2b5e245d04e8b376b0191e086c40d0b80e87e
92fe97
Author: Michal Domonkos <mdomonko@redhat.com>
92fe97
Date:   Thu Jun 14 11:38:07 2018 +0200
92fe97
92fe97
    updateinfo: preload pkgSack. BZ 1528608
92fe97
    
92fe97
    This ensures that we honor the skip_if_unavailable option and disable
92fe97
    unavailable repos when initializing the upinfo object (such as when
92fe97
    running "yum updateinfo" or "yum check-update --security").
92fe97
92fe97
diff --git a/yum/__init__.py b/yum/__init__.py
92fe97
index 451b2b81..a156a6a6 100644
92fe97
--- a/yum/__init__.py
92fe97
+++ b/yum/__init__.py
92fe97
@@ -1037,6 +1037,7 @@ class YumBase(depsolve.Depsolve):
92fe97
             self._upinfo = update_md.UpdateMetadata(logger=logger,
92fe97
                                                     vlogger=vlogger)
92fe97
 
92fe97
+            self.pkgSack  # Preload the sack now, to honor skip_if_unavailable
92fe97
             for repo in self.repos.listEnabled():
92fe97
                 if 'updateinfo' not in repo.repoXML.fileTypes():
92fe97
                     continue