[pacman-dev] handling of provides/conflicts packages
So here's the scenario: mplayer is in current, mplayer-svn is in unstable. mplayer-svn provides and conflicts with mplayer. As is typically the case with packages in current, mplayer has no provides or conflicts for packages outside of current/extra (mplayer-svn in this case). If you have mplayer-svn installed and try to install mplayer, you get the following: $ pacman -S mplayer resolving dependencies... done. looking for inter-conflicts... :: mplayer conflicts with mplayer-svn. Remove mplayer-svn? [Y/n] y done. error: failed to prepare transaction (could not satisfy dependencies) :: mplayer-svn requires acidrip :: mplayer-svn requires mplayer-plugin First off, I think that "done" is probably a bug - mplayer-svn wasn't removed ;-) And secondly, it seems like pacman should be able to handle this swap of mplayer-svn->mplayer even when the mplayer pkgbuild doesn't have the provided/conflicts array set. I mean, if mplayer-svn provides mplayer, doesn't it imply the reverse? I obviously don't understand the technical details, but this behavior seems "broken" to me. Scott
On 3/29/07, Scott Horowitz <stonecrest@gmail.com> wrote:
$ pacman -S mplayer resolving dependencies... done. looking for inter-conflicts... :: mplayer conflicts with mplayer-svn. Remove mplayer-svn? [Y/n] y done. error: failed to prepare transaction (could not satisfy dependencies) :: mplayer-svn requires acidrip :: mplayer-svn requires mplayer-plugin
First off, I think that "done" is probably a bug - mplayer-svn wasn't removed ;-)
I'll take the easy part- that done is from "looking for inter-conflicts..." and just gets bumped because of the question in the middle of it. -Dan
Hi! A new pactest script would be helpful, or at least plz list the dependencies of mplayer and mplayer-svn, and let us know if acidrip & mplayer-plugin is installed or not. Thx, Nagy Gabor
On 3/29/07, Nagy Gabor <ngaba@petra.hos.u-szeged.hu> wrote:
Hi! A new pactest script would be helpful, or at least plz list the dependencies of mplayer and mplayer-svn, and let us know if acidrip & mplayer-plugin is installed or not. Thx, Nagy Gabor
Yes, both acidrip and mplayer-plugin are installed. $ pacman -Qi mplayer-svn Name : mplayer-svn Version : 22796-1 URL : http://www.mplayerhq.hu/ License : GPL Groups : None Provides : mplayer Depends On : libmad libungif cdparanoia gtk2 codecs sdl xvidcore libjpeg lame libtheora esd faad2 faac ttf-bitstream-vera libxxf86dga fontconfig libxinerama libxv libpng libxxf86vm libgl Removes : None Required By : acidrip mplayer-plugin Conflicts With : mplayer Installed Size : 16326.89 K Packager : Tom K <tomk@runbox.com> Architecture : i686 Build Date : Sat Mar 24 13:26:02 2007 UTC Build Type : Unknown Install Date : Thu Mar 29 21:18:14 2007 UTC Install Reason : Explicitly installed Install Script : No Description : A movie player for linux $ pacman -Si mplayer Repository : extra Name : mplayer Version : 1.0rc1-4 Groups : None Provides : None Depends On : libxxf86dga libxv libmad libungif cdparanoia gtk2 codecs sdl lame libtheora ttf-bitstream-vera xvidcore libgl smbclient aalib dbus-glib jack-audio-connection-kit Removes : None Conflicts With : None Replaces : None Download Size : 7933.20 K Installed Size : 0.00 K Description : A movie player for linux MD5 Sum : 10066d6697df59a7109d50a50e31b775 Hope that helps. Scott
Thx again for finding the bug. To the developers: Without looking into the source, I can bet that alpm_depcmp should be used again instead of just checking package names and version. I think it's time to fix this problem in all cases (even if I went wrong.) Some earlier cases: http://archlinux.org/pipermail/pacman-dev/2007-March/002155.html http://archlinux.org/pipermail/pacman-dev/2007-February/001836.html <- fixed Bye, Nagy Gabor
2007/3/30, Nagy Gabor <ngaba@petra.hos.u-szeged.hu>:
Thx again for finding the bug. To the developers: Without looking into the source, I can bet that alpm_depcmp should be used again instead of just checking package names and version. I think it's time to fix this problem in all cases (even if I went wrong.) Some earlier cases: http://archlinux.org/pipermail/pacman-dev/2007-March/002155.html http://archlinux.org/pipermail/pacman-dev/2007-February/001836.html <- fixed
Already reported here: http://bugs.archlinux.org/task/6057#comment13216 The bug exists since pacman2. P.S.: sorry for my previous reply to duplicate of original message. -- Roman Kyrylych (Роман Кирилич)
This should fix the wording problem. If it doesn't please smack me 'cause this is the second time I've gone about "fixing" it. Patch is below (git style :P). ~ Jamie / yankees26
From 646ad0429121a4b37033e43ac713d07bdedf6e60 Mon Sep 17 00:00:00 2001 From: James Rosten <seinfeld90@gmail.com> Date: Thu, 29 Mar 2007 19:23:46 -0400 Subject: [PATCH] Fixing a wording problem describing dependencies.
Signed-off-by: James Rosten <seinfeld90@gmail.com> --- lib/libalpm/alpm.h | 1 + lib/libalpm/deps.c | 4 ++-- src/pacman/sync.c | 9 +++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 954cf96..20f7366 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -372,6 +372,7 @@ typedef enum _pmdepmod_t { typedef enum _pmdeptype_t { PM_DEP_TYPE_DEPEND = 1, + PM_DEP_TYPE_REQUIRED, PM_DEP_TYPE_CONFLICT } pmdeptype_t; diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 137be64..55097ed 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -288,7 +288,7 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op, if(!satisfied) { _alpm_log(PM_LOG_DEBUG, _("checkdeps: updated '%s' won't satisfy a dependency of '%s'"), alpm_pkg_get_name(oldpkg), alpm_pkg_get_name(p)); - miss = _alpm_depmiss_new(p->name, PM_DEP_TYPE_DEPEND, depend->mod, + miss = _alpm_depmiss_new(p->name, PM_DEP_TYPE_REQUIRED, depend->mod, depend->name, depend->version); if(!_alpm_depmiss_isin(miss, baddeps)) { baddeps = alpm_list_add(baddeps, miss); @@ -408,7 +408,7 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op, if(!found) { _alpm_log(PM_LOG_DEBUG, _("checkdeps: found %s as required by %s"), reqname, alpm_pkg_get_name(tp)); - miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), PM_DEP_TYPE_DEPEND, + miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), PM_DEP_TYPE_REQUIRED, PM_DEP_MOD_ANY, j->data, NULL); if(!_alpm_depmiss_isin(miss, baddeps)) { baddeps = alpm_list_add(baddeps, miss); diff --git a/src/pacman/sync.c b/src/pacman/sync.c index ca95fe6..d65be25 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -618,8 +618,13 @@ int pacman_sync(alpm_list_t *targets) case PM_ERR_UNSATISFIED_DEPS: for(i = data; i; i = alpm_list_next(i)) { pmdepmissing_t *miss = alpm_list_getdata(i); - MSG(NL, ":: %s %s %s", alpm_dep_get_target(miss), _("requires"), - alpm_dep_get_name(miss)); + if ( alpm_dep_get_type(miss) == PM_DEP_TYPE_DEPEND ) { + MSG(NL, ":: %s %s %s", alpm_dep_get_target(miss), _("requires"), + alpm_dep_get_name(miss)); + } else { + MSG(NL, ":: %s %s %s", alpm_dep_get_name(miss), _("requires"), + alpm_dep_get_target(miss)); + } switch(alpm_dep_get_mod(miss)) { case PM_DEP_MOD_ANY: break; -- 1.5.0.3
participants (5)
-
Dan McGee
-
James Rosten
-
Nagy Gabor
-
Roman Kyrylych
-
Scott Horowitz