Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#19609 - [pkgtools] pkgfile UPDATE_CRON setting broken

Attached to Project: Community Packages
Opened by Tilman Blumenbach (Tblue) - Thursday, 27 May 2010, 14:03 GMT
Last edited by Gavin Bisesi (Daenyth) - Thursday, 03 June 2010, 00:57 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Gavin Bisesi (Daenyth)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
------------
The last pkgtools update introduced a new configuration option in /etc/pkgtools/pkgfile.conf, UPDATE_CRON. When set to 1, the daily cronjob /etc/cron.daily/pkgfile runs pkgfile --update; setting that variable to 0 is supposed to prevent updating.

The bug is that setting UPDATE_CRON=0 does not prevent pkgfile --update from being executed. This is because /etc/cron.daily/pkgfile does not explicitly test whether UPDATE_CRON equals 1; the following test (line 4) is true for both UPDATE_CRON=0 and UPDATE_CRON=1:
> if [[ $UPDATE_CRON ]]; then

Suggested fix:
> if [ $UPDATE_CRON -eq 1 ]; then

Additional info:
----------------
Version: pkgtools 20-1

Steps to reproduce:
-------------------

Set UPDATE_CRON=0 in /etc/pkgtools/pkgfile.conf and wait for /etc/cron.daily/pkgfile to be run (or run it manually). Observe that pkgfile --update is executed.
This task depends upon

Closed by  Gavin Bisesi (Daenyth)
Thursday, 03 June 2010, 00:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in commit 9674483
Comment by Gavin Bisesi (Daenyth) - Thursday, 27 May 2010, 15:24 GMT
/facepalm

Total brain fart. (( UPDATE_CRON )) will do the right thing. Fix tonight
Comment by Tilman Blumenbach (Tblue) - Thursday, 27 May 2010, 15:33 GMT
Ah, I didn't know about Bash's (( ... )) construct. Thanks for fixing!
Comment by Gavin Bisesi (Daenyth) - Tuesday, 01 June 2010, 12:21 GMT
Sorry I've been slow on this. Moving apartments this week. Will get to it when I can.

Loading...