Bug 429716 - RFE: days of week and check first
Summary: RFE: days of week and check first
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-cron
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Habig, Alec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-22 17:17 UTC by Orion Poplawski
Modified: 2008-03-26 17:16 UTC (History)
1 user (show)

Fixed In Version: 0.8.2-1.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-26 17:11:10 UTC


Attachments (Terms of Use)
patch to add CHECK_FIRST and DAYS_OF_WEEK (1.70 KB, patch)
2008-01-22 17:17 UTC, Orion Poplawski
no flags Details | Diff

Description Orion Poplawski 2008-01-22 17:17:58 UTC
Description of problem:

I've been running a custom version of /etc/cron.daily/yum.cron for a while.  I
just noticed that a lot of nice work has gone into making the default script
configurable.  I'm including here two modifications that would allow me to use
the stock script (which would be nice).  It adds the following:

CHECK_FIRST - this runs yum check-update first, and then only runs yum update if
it succeeds and there are updates to apply.  This avoids error output getting
generated on laptops when they don't have internet connectivity.

DAYS_OF_WEEK - allows you to configure which days of the week you want yum to
update.  I don't like running on the weekend.

Comment 1 Orion Poplawski 2008-01-22 17:17:58 UTC
Created attachment 292537 [details]
patch to add CHECK_FIRST and DAYS_OF_WEEK

Comment 2 Habig, Alec 2008-01-22 23:10:58 UTC
Thanks for the patch!  Am working it into the rpm, will test it myself for a few
days then upload it for you to test on your systems.


Comment 3 Orion Poplawski 2008-01-22 23:23:12 UTC
There is one typo:

+  elif [ "$CHECK_FIRST" == "yes"]; then

should be

+  elif [ "$CHECK_FIRST" == "yes" ]; then


Comment 4 Orion Poplawski 2008-01-28 16:34:18 UTC
Another problem, the loading of the config file needs to be before the
DAYS_OF_WEEK check. 

Comment 5 Fedora Update System 2008-02-21 15:47:59 UTC
yum-cron-0.8-1.fc7 has been submitted as an update for Fedora 7

Comment 6 Fedora Update System 2008-02-21 15:48:52 UTC
yum-cron-0.8-1.fc8 has been submitted as an update for Fedora 8

Comment 7 Fedora Update System 2008-02-26 00:21:54 UTC
yum-cron-0.8-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-cron'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-1916

Comment 8 Fedora Update System 2008-02-28 21:36:41 UTC
yum-cron-0.8-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2008-02-28 21:42:25 UTC
yum-cron-0.8-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Orion Poplawski 2008-03-04 18:11:33 UTC
Sorry, minor fix needed:

--- yum.cron.daily.dow  2008-02-20 08:59:51.000000000 -0700
+++ yum.cron.daily      2008-03-04 11:05:14.000000000 -0700
@@ -24,7 +24,7 @@
 # Only run on certain days of the week
 dow=`date +%w`
 DAYS_OF_WEEK=${DAYS_OF_WEEK:-0123456}
-if [ ${DAYS_OF_WEEK/$dow/} == ${DAYS_OF_WEEK} ]; then
+if [ "${DAYS_OF_WEEK/$dow/}" == "${DAYS_OF_WEEK}" ]; then
   exit 0
 fi

Problem is DAYS_OF_WEEK only has one day in it.

Comment 11 Habig, Alec 2008-03-05 15:39:28 UTC
Oops.  Didn't test throughout the week.  Will patch.


Comment 12 Fedora Update System 2008-03-13 19:21:58 UTC
yum-cron-0.8.2-1.fc7 has been submitted as an update for Fedora 7

Comment 13 Fedora Update System 2008-03-13 19:23:17 UTC
yum-cron-0.8.2-1.fc8 has been submitted as an update for Fedora 8

Comment 14 Fedora Update System 2008-03-16 19:29:05 UTC
yum-cron-0.8.2-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-cron'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F7/FEDORA-2008-2510

Comment 15 Fedora Update System 2008-03-26 17:11:04 UTC
yum-cron-0.8.2-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2008-03-26 17:16:20 UTC
yum-cron-0.8.2-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.