[pacman-dev] [PATCH] New reason001.py pactest

Nagy Gabor ngaba at bibl.u-szeged.hu
Fri Jan 11 16:11:41 EST 2008


> On Jan 11, 2008 2:53 PM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
> > >From d0caed6bee5fec36f3239d4886db9323ffc64db9 Mon Sep 17 00:00:00
> > >2001
> > From: Nagy Gabor <ngaba at bibl.u-szeged.hu>
> > Date: Fri, 11 Jan 2008 21:51:50 +0100
> > Subject: [PATCH] New reason001.py pactest
> >
> > This pactest demonstrates that we should copy the reason between the
> > to-be-replaced and replaced packages
> 
> Makes sense. Any reason why you wouldn't ever want to do this? I can
> think of one such scenario, not sure if it is handled or not.
> 
> Installed:
> pkg1 (explicit)
> pkg2 (as dep)
> 
> To be installed:
> pkg1 (replaces pkg2 because it includes its functionality)
> 
> pkg1 should stay explicit.
> 
> Along the same lines, if the reasons were reversed, we should still
> stay explicit, no?
> 
> -Dan

Yes, this case is handled properly. Whatever is set by sync.c, add.c
overrides it if the package is already installed (except --asdeps is
added). So in your case pkg1 will be _upgraded_ as explicit.

One more thing (edge case):
In my not-working (:-)) patch I preferred explicit over depend if foo
replaces more than one packages and some of them explicit, some of them
dependency.

Bye




More information about the pacman-dev mailing list