[pacman-dev] [PATCH] Add more information in conflicts question

Sebastian Nowicki sebnow at gmail.com
Sun Apr 17 05:08:42 EDT 2011


On Sun, Apr 17, 2011 at 5:03 PM, Sebastian Nowicki <sebnow at gmail.com> wrote:

> In addition to the names of the conflicting packages, the origin and
> versions will be displayed to the user.
>
> This introduces a slight API change in the PM_TRANS_CONV_CONFLICT_PKG
> conversation callback. The format of the first two strings has changed
> from package names to strings of the format "db/name-version".
>
> Fixes FS#12536
> ---
>
> I rewrote the patch to pre-format the package information rather than
> changing the API completely, as per Dan's suggestion. This still
> introduces a bit of an API change as the two string can no longer be
> used as package identifiers, e.g. in alpm_db_get_pkg().
>
> $ sudo ./src/pacman/pacman -S qemu-kvm
> resolving dependencies...
> looking for inter-conflicts...
> :: extra/qemu-kvm-0.14.0-1 and local/qemu-0.14.0-1 are in conflict (qemu).
> Remove local/qemu-0.14.0-1? [y/N] n


Hmm, just noticed this breaks the pkgname == data3 comparison:

> if(strcmp(data1, data3) == 0 || strcmp(data2, data3) == 0) {

So the ".. are in conflict (package_name)" bit will always be shown in the
pacman callback. Not sure how to work around this other than to modify the
reason to have the same formatting as well. It seems odd that the package
name is given in general, but I don't know the reasons why it was done that
way.


More information about the pacman-dev mailing list