[PATCH 2/7] Don't log a package installation when a pretrans script is run.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/packaging/yumpayload.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 2ab4cc7..0f904e5 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -885,7 +885,7 @@ class RPMCallback(object):
         self.package_file = None    # file instance (package file management)
 
         self.total_actions = 0
-        self.completed_actions = 0
+        self.completed_actions = None   # will be set to 0 when starting tx
 
     def _get_txmbr(self, key):
         """ Return a (name, TransactionMember) tuple from cb key. """
@@ -918,7 +918,11 @@ class RPMCallback(object):
             # return an open fd to the file
             txmbr = self._get_txmbr(key)[1]
 
-            if not amount:
+            # If self.completed_actions is still None, that means this package
+            # is being opened to retrieve a %pretrans script. Don't log that
+            # we're installing the package unless we've been called with a
+            # TRANS_START event.
+            if self.completed_actions is not None:
                 if self.upgrade:
                     mode = _("Upgrading")
                 else:
-- 
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux