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

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