Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#8496 - Foreign finding (-Qm) ignore package versions

Attached to Project: Pacman
Opened by Artyom (urandom) - Saturday, 03 November 2007, 17:13 GMT
Last edited by Dan McGee (toofishes) - Thursday, 24 July 2008, 03:23 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Aaron Griffin (phrakture)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 3.0.6
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Example: I have package kernel26 2.6.23.1-6
[ 07-11-03 20:04 ] [ artem@m16 ] [ /var/lib/pacman/local ]
% pacman -Q kernel26
kernel26 2.6.23.1-6

All internet repositories with kernel26-2.6.23.1-6 was turned off:
[ 07-11-03 20:04 ] [ artem@m16 ] [ /var/lib/pacman/local ]
% pacman -Ss "^kernel26$"
current-cd/kernel26 2.6.22.9-1 (base)
The Linux Kernel and modules
pacman-cached/kernel26 2.6.23.1-4 (base)
The Linux Kernel and modules

But foreign list don't contain kernel26-2.6.23.1-6 (and many other packages from inet repositories)
[ 07-11-03 20:04 ] [ artem@m16 ] [ /var/lib/pacman/local ]
% pacman -Qm
flamerobin 0.8.1-1
gmail-notify 1.6.1-5
rapidsvn-svn 7686-1
sonata-svn 578-1
wxformbuilder-svn 3.x-1
This task depends upon

Closed by  Dan McGee (toofishes)
Thursday, 24 July 2008, 03:23 GMT
Reason for closing:  Won't implement
Additional comments about closing:  See comments.
Comment by Dan McGee (toofishes) - Wednesday, 07 November 2007, 23:49 GMT
This doesn't look too hard to implement at all- just add some foo version check magic to is_foreign() in pacman/query.c (OR do it the right way and implement a get_pkg function that takes a version). Any downsides to changing the behavior to this?
Comment by Roman Kyrylych (Romashka) - Thursday, 08 November 2007, 09:46 GMT
Maybe I don't understand something, but how pacman -Qm will know if package is foreign or outdated/downgraded?
Comment by Dan McGee (toofishes) - Thursday, 08 November 2007, 13:12 GMT
-Qm currently uses the simple heuristic of looking in the DBs for each locally-installed package name- if it can't find the name in any DB, then it assumes it is foreign.

What this feature request proposes is that we add version to the comparison operation.
Comment by Roman Kyrylych (Romashka) - Thursday, 08 November 2007, 13:46 GMT
The problem with adding version to is_foreign() check is that -Qm would not see a difference between foreign files (as they are defined now) and packages that are in synced DB but not upgraded yet or were downgraded.

Artyom's example may seem easy because it seems logical that when kernel26 2.6.23.1-6 is newer than any of other kernel26 packages - it is foreign (either compiled by user of installed from some other repo) - and such version check ("when local package is newer than any others - it's foreigh") could seem like a good idea.
(Artyom didn't say about this but I assume his idea was exactly this, because another variant when versioned checks are regardless of which package is newer is just plain stupid).
But there are not so easy cases:
1) how such modified -Qm would know that kernel26 2.6.23.1-6 was not installed from [current-cd] and then pacman26 in that repo was downgraded to kernel26 2.6.22.9-1?
2) confusing versioning issue comes here again (e.g. which is newer - 3.0b or 3.0? b could mean beta or update) - they are solved on -Su by specifying options=('force') in PKGVUILD, but how to handle them in -Qm?

So IMO changing -Qm behaviour will produce confusing results.
Comment by Scott H (stonecrest) - Tuesday, 20 November 2007, 03:08 GMT
Instead of checking for the existence of packages in the local db, why not simply look at the repo for each installed package and output those that are in repos not currently defined in the pacman.conf? That seems like it would cover all cases and give logical results.
Comment by Scott H (stonecrest) - Tuesday, 20 November 2007, 03:09 GMT
Eh right, because pacman -Q doesn't know about repos.. nevermind.
Comment by Nagy Gabor (combo) - Thursday, 13 March 2008, 18:58 GMT
my vote: close as "won't implement".
Comment by Xavier (shining) - Thursday, 13 March 2008, 20:04 GMT
With -Qu and -Su, you can see the locally installed packages that are outdated, but also the ones that are newer than packages in repos.

Loading...