[yum-commits] etc/yum-cron.conf yum-cron/yum-cron.py

zpavlas at osuosl.org zpavlas at osuosl.org
Wed Oct 23 07:47:02 UTC 2013


 etc/yum-cron.conf    |    9 ++++-----
 yum-cron/yum-cron.py |    9 +++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 587288e13575b6f3f6c8cdc1a13abe9117444636
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Fri Oct 11 09:28:57 2013 +0200

    yum-cron: support download/install with update_messages==False. BZ 1018068
    
    (download_updates or apply_updates) now implies that yum-cron should
    do the updates processing, too.  The update_messages==False case is
    then used to make yum-cron less chatty.

diff --git a/etc/yum-cron.conf b/etc/yum-cron.conf
index aa7cbfc..a97d881 100644
--- a/etc/yum-cron.conf
+++ b/etc/yum-cron.conf
@@ -8,16 +8,15 @@
 # minimal-security-severity:Critical =  --sec-severity=Critical upgrade-minimal
 update_cmd = default
 
-# Whether a message should emitted when updates are available.
+# Whether a message should be emitted when updates are available,
+# were downloaded, or applied.
 update_messages = yes
 
-# Whether updates should be downloaded when they are available. Note
-# that updates_messages must also be yes for updates to be downloaded.
+# Whether updates should be downloaded when they are available.
 download_updates = yes
 
 # Whether updates should be applied when they are available.  Note
-# that both update_messages and download_updates must also be yes for
-# the update to be applied
+# that download_updates must also be yes for the update to be applied.
 apply_updates = no
 
 # Maximum amout of time to randomly sleep, in minutes.  The program
diff --git a/yum-cron/yum-cron.py b/yum-cron/yum-cron.py
index 9f985f9..79c1907 100755
--- a/yum-cron/yum-cron.py
+++ b/yum-cron/yum-cron.py
@@ -998,7 +998,8 @@ class YumCronBase(yum.YumBase):
             self.emitUpdateFailed([str(err)])
             sys.exit(1)
 
-        self.emitInstalled()
+        if emit :
+            self.emitInstalled()
         self.emitMessages()
 
     def updatesCheck(self):
@@ -1019,8 +1020,8 @@ class YumCronBase(yum.YumBase):
         # Update the metadata
         self.populateUpdateMetadata()
 
-        # Exit if we don't need to send messages
-        if not self.opts.update_messages:
+        # Exit if we don't need to check for updates
+        if not (self.opts.update_messages or self.opts.download_updates or self.opts.apply_updates):
             sys.exit(0)
 
         # Check for updates in packages, or groups ... need to run both.
@@ -1048,7 +1049,7 @@ class YumCronBase(yum.YumBase):
             self.releaseLocks()
             sys.exit(0)
 
-        self.installUpdates(True)
+        self.installUpdates(self.opts.update_messages)
 
         self.releaseLocks()
         sys.exit(0)


More information about the Yum-commits mailing list