[pacman-dev] [PATCH] libalpm: Fix installing update of a replaced package

Andrew Gregory andrew.gregory.8 at gmail.com
Sun Mar 3 15:26:03 EST 2013


On 03/04/13 at 05:45am, Allan McRae wrote:
> On 04/03/13 05:43, Allan McRae wrote:
> > On 01/03/13 04:06, Olivier Brunel wrote:
> >> During a sysupgrade, if a package is replaced by another, and an update for the
> >> former package is found (on another repo) the replaced package would be
> >> re-installed.
> >>
> >> Signed-off-by: Olivier Brunel <i.am.jack.mail at gmail.com>
> >> ---
> >> I'm not really familiar with inner workings of ALPM, so this is probably not the
> >> best way to do this.
> >>
<snip>
> >> diff --git a/test/pacman/tests/sync1104.py b/test/pacman/tests/sync1104.py
> >> new file mode 100644
> >> index 0000000..5cec98a
> >> --- /dev/null
> >> +++ b/test/pacman/tests/sync1104.py
> >> @@ -0,0 +1,18 @@
> >> +self.description = "Don't update (reinstall) a replaced package"
> >> +
> >> +lp = pmpkg("old", "1-1")
> >> +self.addpkg2db("local", lp)
> >> +
> >> +p1 = pmpkg("new")
> >> +p1.provides = ["old"]
> >> +p1.replaces = ["old"]
> >> +self.addpkg2db("sync1", p1)
> >> +
> >> +p2 = pmpkg("old", "1-2")
> >> +self.addpkg2db("sync2", p2)
> >> +
> >> +self.args = "-Su"
> >> +
> >> +self.addrule("PACMAN_RETCODE=0")
> >> +self.addrule("!PKG_EXIST=old")
> >> +self.addrule("PKG_EXIST=new")
> >>
> > 
> 
> Forgot to add - awesome for adding a pactest here!

Is the test case correct though?  Other than the fact that this one uses two
sync repos, this looks identical to sync132 which has the opposite result.

apg


More information about the pacman-dev mailing list