[pacman-dev] [PATCH] don't care about a to-be-replaced package's newer version
hi http://frugalware.org/~vmiklos/patches/libpacman-proposed/replace_dont_upgra... old: checking package integrity... done. removing trm... done. error: failed to commit transaction (conflicting files) :: usr/bin/trm: exists in "libtunepimp" (target) and "trm" (target) new: $ sudo pacman -Su :: Starting local database upgrade... :: Replace trm with frugalware-current/libtunepimp? [Y/n] resolving dependencies... done. looking for inter-conflicts... done. Remove: trm Targets: libtunepimp-0.4.0-1 Total Package Size: 0.4 MB Proceed with upgrade? [Y/n] :: Retrieving packages from frugalware-current... libtunepimp-0.4.0-1-i686 [/home/ftp/pub/frugalware/frugalw] 100% LOCAL checking package integrity... done. removing trm... done. (1/1) installing libtunepimp [################] 100% udv / greetings, VMiklos -- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
VMiklos wrote:
http://frugalware.org/~vmiklos/patches/libpacman-proposed/replace_dont_upgra...
Why not immediately check the replace value after the for() iteration added by the patch, and do something like: /* we don't care about a to-be-replaced package's newer version */ for(j = trans->packages; j; j=j->next) { ... } if(replace) { continue; } Or is there a specific reason to pass in the first "if() / else if()" tests? -- Aurelien
On Fri, Jan 13, 2006 at 10:43:52PM +0100, Aurelien Foret <aurelien@archlinux.org> wrote:
Why not immediately check the replace value after the for() iteration added by the patch, and do something like:
/* we don't care about a to-be-replaced package's newer version */ for(j = trans->packages; j; j=j->next) { ... } if(replace) { continue; }
Or is there a specific reason to pass in the first "if() / else if()" tests?
no, there isn't. here is an updated patch: http://frugalware.org/~vmiklos/patches/libpacman-proposed/replace_dont_upgra... udv / greetings, VMiklos -- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
VMiklos wrote:
Or is there a specific reason to pass in the first "if() / else if()" tests?
no, there isn't.
OK.
here is an updated patch: http://frugalware.org/~vmiklos/patches/libpacman-proposed/replace_dont_upgra...
This one won't work: the continue command can only bypass the end of the code from the _current_ loop. As a consequence, it must be called outside the double for() loop. I applied your first patch with the proposed rework. -- Aurelien
On Sat, Jan 14, 2006 at 09:19:02AM +0100, Aurelien Foret <aurelien@archlinux.org> wrote:
I applied your first patch with the proposed rework.
ah, my bad. thanks for the correction! udv / greetings, VMiklos -- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
participants (2)
-
Aurelien Foret
-
VMiklos