index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/libalpm/alpm.h | 1 | ||||
-rw-r--r-- | lib/libalpm/deps.c | 4 | ||||
-rw-r--r-- | pactest/tests/sync1000.py | 19 | ||||
-rw-r--r-- | pactest/tests/upgrade058.py | 17 | ||||
-rw-r--r-- | src/pacman/sync.c | 6 |
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 366aeda3..fc4aed59 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -371,7 +371,6 @@ 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 55097ed0..137be645 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_REQUIRED, depend->mod, + miss = _alpm_depmiss_new(p->name, PM_DEP_TYPE_DEPEND, 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_REQUIRED, + miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), PM_DEP_TYPE_DEPEND, PM_DEP_MOD_ANY, j->data, NULL); if(!_alpm_depmiss_isin(miss, baddeps)) { baddeps = alpm_list_add(baddeps, miss); diff --git a/pactest/tests/sync1000.py b/pactest/tests/sync1000.py new file mode 100644 index 00000000..be1254bf --- /dev/null +++ b/pactest/tests/sync1000.py @@ -0,0 +1,19 @@ +# If someone else can come up with a better name, please do so +self.description = "stonecrest's problem" + +sp = pmpkg("dummy", "1.1-1") +sp.requiredby = [ "pkg" ] +self.addpkg2db("sync", sp) + +lp1 = pmpkg("dummy", "1.0-1") +lp1.requiredby = [ "pkg" ] +self.addpkg2db("local", lp1) + +lp2 = pmpkg("pkg") +lp2.depends = [ "dummy=1.0" ] +self.addpkg2db("local", lp2) + +self.args = "-Su" + +self.addrule("!PACMAN_RETCODE=0") +self.addrule("!PKG_VERSION=dummy|1.1-1") diff --git a/pactest/tests/upgrade058.py b/pactest/tests/upgrade058.py new file mode 100644 index 00000000..76416802 --- /dev/null +++ b/pactest/tests/upgrade058.py @@ -0,0 +1,17 @@ +self.description = "Upgrade a package that's older version is required by another package." + +lp1 = pmpkg("pkg1") +lp1.depends = [ "pkg2=1.0" ] +self.addpkg2db("local", lp1) + +lp2 = pmpkg("pkg2", "1.0-1") +lp2.requiredby = [ "pkg1" ] +self.addpkg2db("local", lp2) + +p = pmpkg("pkg2", "1.1-1") +self.addpkg(p) + +self.args = "-U %s" % p.filename() + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_VERSION=pkg2|1.1") diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 4245b964..3d5289a0 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -618,10 +618,8 @@ 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), - alpm_dep_get_type(miss) == PM_DEP_TYPE_DEPEND ? - _("requires") : _("is required by"), - alpm_dep_get_name(miss)); + MSG(NL, ":: %s %s %s", alpm_dep_get_target(miss), _("requires"), + alpm_dep_get_name(miss)); switch(alpm_dep_get_mod(miss)) { case PM_DEP_MOD_ANY: break; |