FS#7415 - Pacman doesn't check for deps when installing a group
Attached to Project:
Pacman
Opened by Alex Heck (nesl247) - Monday, 11 June 2007, 04:27 GMT
Last edited by Xavier (shining) - Sunday, 27 January 2008, 21:08 GMT
Opened by Alex Heck (nesl247) - Monday, 11 June 2007, 04:27 GMT
Last edited by Xavier (shining) - Sunday, 27 January 2008, 21:08 GMT
|
Details
Summary and Info: I created ebuilds for gnome-2.19. And this
is where the problem started.
In gnome 2.19, control-center is renamed to gnome-control-center. In order to make the group gnome pull gnome-control-center, I put replaces/conflicts/provides control-center in the gnome-control-center PKGBUILD. However, when installing the package (to make sure it is installed instead of control-center), and then running pacman -S gnome, gnome-control-center AND control-center are pulled in. Once gnome-control-center is installed, control-center is attempted to be installed, which then states that there is a conflict and that gnome-control-center should be removed (yes/no to remove). Pacman should see that gnome-control-center is replacing control-center, and not pull in control-center when you run pacman -S. Steps to Reproduce: |
Closed by Xavier (shining)
Sunday, 27 January 2008, 21:08 GMT
Reason for closing: Fixed
Additional comments about closing: pacman should now choose the provider by default. If there is still a problem, use --ignore or IgnorePkg.
Sunday, 27 January 2008, 21:08 GMT
Reason for closing: Fixed
Additional comments about closing: pacman should now choose the provider by default. If there is still a problem, use --ignore or IgnorePkg.
[gnome]
Server = http://arch.nesl247.org/gnome/i686
PKGBUILD and such for gnome-control-center: http://arch.nesl247.org/gnome/i686/gnome-control-center/
Maybe copy/pasting the pacman commands you run and their output would help clearing the confusion.
(Also, the repo didn't work for me, I got a: 500 Internal Server Error)
http://arch.nesl247.org/gnome-devel/i686/gnome-control-center/
The issue was:
pacman -S gnome (with his overlay on top)
would pull in both gnome groups, and would attempt to pull in control-center and gnome-control-center, which was causing a conflict. In the the meantime, he's made it gnome-devel to keep this from happening.
The issue is that in the gnome-control-center PKGBUILD:
replaces=('control-center')
provides=('control-center')
conflicts=('control-center')
control-center shouldn't have been pulled in with pacman -S gnome, since it was defined in the PKGBUILD to be replaced by gnome-control-center.
LANG=C pacman -Si 'gnome-control-center' |grep Conflict
Conflicts With : None
Might be similar to this bug :
http://bugs.archlinux.org/task/7338
but maybe it will choose the wrong one.
If both conflict with each other, and both belongs to the gnome group, when you pacman -S gnome,
it'll apparently ask you to remove the one installed, and install the other.
For example, if you've gnome-control-center installed, pacman -S gnome will ask you
to remove it, because it conflicts with control-center.
If you answer no, it'll fail, saying control-center conflicts with gnome-control-center.
That might not be ideal though, maybe it should keep the package that replaces the other in both case.
I saw this behavior from a pactest, but maybe I didn't manage to reproduce exactly the same situation,
so it would be interesting to fix that repo, and see if that's indeed what happens.
# pacman -S compiz-fusion
:: group compiz-fusion:
ccsm-git compiz-bcop-git compiz-fusion-plugins-extra-git compiz-fusion-plugins-main-git compiz-fusion-plugins-unsupported-git compiz-icon-git compizconfig-python-git
emerald-git emerald-themes-git libcompizconfig-git
:: Install whole content? [Y/n]
resolving dependencies... done.
looking for inter-conflicts...
:: cairo conflicts with cairo-lcd. Remove cairo-lcd? [Y/n] n
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: cairo: conflicts with cairo-lcd
particularly, the package compiz-git depends on cairo.
But cairo-lcd (already installed) provides and conflicts with cairo. So why it still wants to install the original cairo package?
Please report a new bug :)
And pacman should already take care of this case, so more informations would help.
For example, attach output of "pacman -S compiz-fusion --debug" in that new bug report,
and also output of pacman -Si (or -Qi) for the relevant packages (eg compiz-git, cairo and cairo-lcd).
But actually, after running --debug I found out that the reason of this conflict is that not even the compiz-git depends on cairo but also one of its dependencies depends on a cairo>=1.4.6-2, the condicion which was not fulfilled.
So it seems maybe it's not a bug but it's only pacman not being too descriptive on what happens...
1) reject the bug with the following reason :
installing a group containing two conflicting targets -> undefined behavior
Same if trying to install two conflicting targets directly, like :
pacman -S control-center gnome-control-center
2) extend the "replaces" meaning in pacman code, and use it as a hint for resolving package conflicts
3) make pacman more interactive : ask which package should be installed in this case : control-center or gnome-control-center
And this case of having a group present on different repos is going to happen again.
It happened again when gnome 2.19 was in that gnome repo. And still the same now that gnome 2.20 is in testing.
Your sync022.py test above passes with current maint branch. Is there anything else to worry about here that isn't covered in bug 7524?
The problem with that sync022 pactest is that replaces and provides are used together.
And pacman uses "provides" for resolving the conflict, not "replaces".
But well, thinking about it again, I guess provides and replaces are generally used together, so it should
work fine most of the time.
And otherwise, IgnorePkg could always be used.
So maybe we don't really have to worry about this anymore, unless some new reports come in.