[pacman-dev] Little problem with -Qm option (for foreign packages)
As stated here : http://bbs.archlinux.org/viewtopic.php?t=21311 There is a little problem with the -Qm option. The string comparison is not strict enough. For example, if xarchive isn't in any repos, and xarchiver is in community, then pacman won't show xarchive as being a foreign package. I was thinking about comparing the length of the strings first, before strstr. What about the conversion to uppercase? is it really needed?
On Tue, May 16, 2006 at 10:17:28PM +0200, x.chantry@wanadoo.fr wrote:
I was thinking about comparing the length of the strings first, before strstr.
i don't remember why i've used strstr(), strcmp() would solve the issue imho
What about the conversion to uppercase? is it really needed?
since the packages are lowercase, it makes no sense. probably not needed just i've borrowed the ide from the old -Ss/Qs code udv / greetings, VMiklos -- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
On Tue, 16 May 2006 22:48:42 +0200 VMiklos <vmiklos@frugalware.org> wrote:
On Tue, May 16, 2006 at 10:17:28PM +0200, x.chantry@wanadoo.fr wrote:
I was thinking about comparing the length of the strings first, before strstr.
i don't remember why i've used strstr(), strcmp() would solve the issue imho
What about the conversion to uppercase? is it really needed?
since the packages are lowercase, it makes no sense. probably not needed just i've borrowed the ide from the old -Ss/Qs code
Ha yes, silly me, here is the new patch with strcmp. It still removes the conversion to uppercase since you confirm what I thought. Thanks. XC
participants (2)
-
VMiklos
-
x.chantry@wanadoo.fr