FS#41223 - [pacman] checkupdates (or pacman -Qu) ignores IgnorePkg

Attached to Project: Pacman
Opened by Steven Honeyman (stevenhoneyman) - Wednesday, 16 July 2014, 19:28 GMT
Last edited by Allan McRae (Allan) - Thursday, 28 May 2015, 04:43 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I use the "checkupdates" script provided with pacman in a cron job to alert me of new updates.
As there's currently a problem with parcellite, I've had to downgrade, so I added it to pacman.conf as an IgnorePkg until the bug is resolved.

`pacman -Syu` still works as expected, and reminds me that it isn't going to upgrade parcellite.
`checkupdates` after a full upgrade, still says "parcellite" every time it runs. This seems to be because `pacman -Qu` doesn't look at IgnorePkg configuration.

That may be intended behaviour, or it's at least running in the way that is documented (i.e. it doesn't mention --query):

IgnorePkg = package ...
Instructs pacman to ignore any upgrades for this package when
performing a --sysupgrade.


If that is the case, then I think the checkupdates script should filter out any packages that are set to be Ignored in pacman.conf
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 28 May 2015, 04:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in pacman-4.2 by c23ff87893d
Comment by Dave Reisner (falconindy) - Wednesday, 16 July 2014, 19:38 GMT Comment by Steven Honeyman (stevenhoneyman) - Wednesday, 16 July 2014, 19:42 GMT
Wow, they're old! Fix should be as easy as:

sed -i 's/pacman -Qqu/fakeroot pacman -Su --print/' /usr/bin/checkupdates

...I think? There's no updates right now so I can't test it :)
Comment by Steven Honeyman (stevenhoneyman) - Wednesday, 16 July 2014, 19:45 GMT
ah, not quite that easy. still shows ":: Starting full system upgrade..."

and also prints the url not the package name. doh!
Comment by Steven Honeyman (stevenhoneyman) - Wednesday, 16 July 2014, 19:52 GMT
fakeroot pacman -Su --print --print-format=%n --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '^::'

It's messy - I don't like the pipe to grep, but that works
Comment by Allan McRae (Allan) - Wednesday, 16 July 2014, 21:24 GMT
From git:

$ pacman -Qu
curl 7.37.0-1 -> 7.37.1-1 [ignored]
jre7-openjdk 7.u60_2.5.0-3 -> 7.u65_2.5.1-3
jre7-openjdk-headless 7.u60_2.5.0-3 -> 7.u65_2.5.1-3

So I guess checkupdates could filter using that.
Comment by Kyle Keen (keenerd) - Wednesday, 16 July 2014, 21:48 GMT
As a tangential bug, "pacman -Sup" and "pacman -Supq" produce the exact same output. It would be nice if the -q suppressed the non-print status output. Then no grep pipe would be needed.

I would prefer using -Sup to -Qu since it is more in-line with checkupdates's purpose.
Comment by Allan McRae (Allan) - Wednesday, 16 July 2014, 22:17 GMT
Open a new bug.
Comment by Kyle Keen (keenerd) - Wednesday, 16 July 2014, 22:29 GMT
Thanks, just wanted to confirm -Supq was a bug before opening. Its at
https://bugs.archlinux.org/task/41228

Should it be considered a related task?

Loading...