diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 268f7213..58b42fc5 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -273,6 +273,8 @@ typedef enum _alpm_errno_t { ALPM_ERR_TRANS_NOT_LOCKED, /** A hook failed to run */ ALPM_ERR_TRANS_HOOK_FAILED, + /* The transaction is a partial upgrade */ + ALPM_ERR_TRANS_PARTIAL_UPGRADE, /* Packages */ /** Package not found */ ALPM_ERR_PKG_NOT_FOUND, @@ -1477,6 +1479,19 @@ int alpm_db_set_usage(alpm_db_t *db, int usage); */ int alpm_db_get_usage(alpm_db_t *db, int *usage); +/** Set if a database may perform partial upgrades. + * @param db pointer to the package database + * @param partial 1 to allow, 0 to disallow + * @return 0 on success, or -1 on error + */ +int alpm_db_set_allow_partial_upgrades(alpm_db_t *db, int allow); + +/** Set if a database allows partial upgrades. + * @param db pointer to the package database + * @return 1 if allowed, 0 if not, -1 on error + */ +int alpm_db_get_allow_partial_upgrades(alpm_db_t *db); + /* End of usage accessors */ /** @} */ @@ -2797,7 +2812,8 @@ typedef enum _alpm_transflag_t { ALPM_TRANS_FLAG_NOSCRIPTLET = (1 << 10), /** Ignore dependency conflicts. */ ALPM_TRANS_FLAG_NOCONFLICTS = (1 << 11), - /* (1 << 12) flag can go here */ + /** Allow partial upgrades */ + ALPM_TRANS_FLAG_ALLOWPARTIAL = (1 << 12), /** Do not install a package if it is already installed and up to date. */ ALPM_TRANS_FLAG_NEEDED = (1 << 13), /** Use ALPM_PKG_REASON_EXPLICIT when installing packages. */ diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index d949b645..051b9484 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -368,6 +368,19 @@ int SYMEXPORT alpm_db_get_usage(alpm_db_t *db, int *usage) return 0; } +int SYMEXPORT alpm_db_set_allow_partial_upgrades(alpm_db_t *db, int allow) +{ + ASSERT(db != NULL, return -1); + db->allow_partial = allow ? 1 : 0; + return 0; +} + +int SYMEXPORT alpm_db_get_allow_partial_upgrades(alpm_db_t *db) +{ + ASSERT(db != NULL, return -1); + return db->allow_partial; +} + alpm_db_t *_alpm_db_new(const char *treename, int is_local) { alpm_db_t *db; diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h index ae1f0f74..e53b90fb 100644 --- a/lib/libalpm/db.h +++ b/lib/libalpm/db.h @@ -80,6 +80,8 @@ struct _alpm_db_t { int siglevel; /* alpm_db_usage_t */ int usage; + + int allow_partial; }; diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index 8929fcb9..a0b37898 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -104,6 +104,8 @@ const char SYMEXPORT *alpm_strerror(alpm_errno_t err) return _("transaction commit attempt when database is not locked"); case ALPM_ERR_TRANS_HOOK_FAILED: return _("failed to run transaction hooks"); + case ALPM_ERR_TRANS_PARTIAL_UPGRADE: + return _("partial upgrade"); /* Packages */ case ALPM_ERR_PKG_NOT_FOUND: return _("could not find or read package"); diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index e73b8ffc..b609abbd 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -249,6 +249,8 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade) } } + trans->sysupgrade = enable_downgrade ? 2 : 1; + return 0; } @@ -364,6 +366,111 @@ finish: return ret; } +static int has_replacment(alpm_db_t *sdb, alpm_pkg_t *lpkg) +{ + alpm_list_t *j, *k; + alpm_handle_t *handle = lpkg->handle; + + for(j = _alpm_db_get_pkgcache(sdb); j; j = j->next) { + alpm_pkg_t *spkg = j->data; + + if(alpm_pkg_should_ignore(handle, spkg)) { + continue; + } + + for(k = alpm_pkg_get_replaces(spkg); k; k = k->next) { + alpm_depend_t *replace = k->data; + /* we only want to consider literal matches at this point. */ + if(_alpm_depcmp_literal(lpkg, replace)) { + _alpm_log(handle, ALPM_LOG_DEBUG, "partial upgrade due to %s haivng replacment\n", lpkg->name); + return 1; + } + } + } + + return 0; +} + +static int is_partial_upgrade(alpm_handle_t *handle) +{ + alpm_list_t *i, *j; + alpm_trans_t *trans = handle->trans; + alpm_db_t *localdb = handle->db_local; + int from_sync = 0; + + if(trans->sysupgrade == 2) { + return 0; + } + + for(i = trans->add; i; i = i->next) { + alpm_pkg_t *pkg = i->data; + + if (pkg->origin == ALPM_PKG_FROM_SYNCDB){ + alpm_db_t *db = alpm_pkg_get_db(pkg); + if(!db->allow_partial) { + alpm_pkg_t *lpkg = alpm_db_get_pkg(localdb, pkg->name); + /* let transaction pass if reinstall */ + if(!lpkg || _alpm_pkg_compare_versions(pkg, lpkg) != 0) { + from_sync = 1; + break; + } + } + } + } + + for(i = _alpm_db_get_pkgcache(localdb); i; i = i->next) { + alpm_pkg_t *lpkg = i->data; + + if(alpm_pkg_find(trans->add, lpkg->name) || alpm_pkg_find(trans->remove, lpkg->name) + || alpm_pkg_should_ignore(handle, lpkg)) { + continue; + } + + /* Search for replacers then literal (if no replacer) in each sync database. */ + for(j = handle->dbs_sync; j; j = j->next) { + alpm_db_t *sdb = j->data; + alpm_pkg_t *spkg; + + if(!(sdb->usage & ALPM_DB_USAGE_UPGRADE)) { + /* jump to next db */ + continue; + } + + if(!sdb->allow_partial && !trans->sysupgrade && has_replacment(sdb, lpkg)) { + return 1; + } + + if(!from_sync) { + /* jump to next local package */ + break; + } + + spkg = _alpm_db_get_pkgfromcache(sdb, lpkg->name); + + if(!spkg || alpm_pkg_should_ignore(handle, spkg)) { + /* jump to next db */ + continue; + } + + if(sdb->allow_partial) { + /* jump to next local package */ + break; + } + + /* Check sdb */ + if(_alpm_pkg_compare_versions(spkg, lpkg) != 0) { + _alpm_log(handle, ALPM_LOG_DEBUG, "partial upgrade due to upgrade for %s\n", lpkg->name); + return 1; + } + + /* jump to next local package */ + break; + } + } + + return 0; +} + int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data) { alpm_list_t *i, *j; @@ -682,6 +789,12 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data) } } + if(!(trans->flags & ALPM_TRANS_FLAG_ALLOWPARTIAL) && !(trans->flags & ALPM_TRANS_FLAG_NODEPVERSION) + && is_partial_upgrade(handle)) { + handle->pm_errno = ALPM_ERR_TRANS_PARTIAL_UPGRADE; + ret = -1; + } + cleanup: return ret; } diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h index 9ee7015e..6fe99227 100644 --- a/lib/libalpm/trans.h +++ b/lib/libalpm/trans.h @@ -39,6 +39,7 @@ typedef enum _alpm_transstate_t { typedef struct _alpm_trans_t { /* bitfield of alpm_transflag_t flags */ int flags; + int sysupgrade; alpm_transstate_t state; alpm_list_t *unresolvable; /* list of (alpm_pkg_t *) */ alpm_list_t *add; /* list of (alpm_pkg_t *) */ diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 2823d510..43487fec 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -453,7 +453,8 @@ void cb_question(void *ctx, alpm_question_t *question) case ALPM_QUESTION_REPLACE_PKG: { alpm_question_replace_t *q = &question->replace; - q->replace = yesno(_("Replace %s with %s/%s?"), + q->replace = 1; + colon_printf(_("Replacing %s with %s/%s"), alpm_pkg_get_name(q->oldpkg), alpm_db_get_name(q->newdb), alpm_pkg_get_name(q->newpkg)); diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 2cf56bf1..868bf202 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -827,6 +827,7 @@ static int register_repo(config_repo_t *repo) pm_printf(ALPM_LOG_DEBUG, "setting usage of %d for %s repository\n", repo->usage, repo->name); alpm_db_set_usage(db, repo->usage); + alpm_db_set_allow_partial_upgrades(db, repo->allow_partial); for(i = repo->cache_servers; i; i = alpm_list_next(i)) { const char *value = i->data; @@ -1049,6 +1050,8 @@ static int _parse_repo(const char *key, char *value, const char *file, } FREELIST(values); } + } else if(strcmp(key, "AllowPartialUpgrades") == 0) { + repo->allow_partial = 1; } else { pm_printf(ALPM_LOG_WARNING, _("config file %s, line %d: directive '%s' in section '%s' not recognized.\n"), diff --git a/src/pacman/conf.h b/src/pacman/conf.h index e9f17123..f735fe1b 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -40,6 +40,7 @@ typedef struct __config_repo_t { alpm_list_t *cache_servers; alpm_list_t *servers; int usage; + int allow_partial; int siglevel; int siglevel_mask; } config_repo_t; @@ -212,7 +213,8 @@ enum { OP_DOWNLOADONLY, OP_REFRESH, OP_ASSUMEINSTALLED, - OP_DISABLEDLTIMEOUT + OP_DISABLEDLTIMEOUT, + OP_PARTIAL }; /* clean method */ diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 6b64ffc7..44ff6b74 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -164,6 +164,7 @@ static void usage(int op, const char * const myname) addlist(_(" -y, --refresh download fresh package databases from the server\n" " (-yy to force a refresh even if up to date)\n")); addlist(_(" --needed do not reinstall up to date packages\n")); + addlist(_(" --partial allow partial upgrades\n")); } else if(op == PM_OP_DATABASE) { printf("%s: %s {-D --database} <%s> <%s>\n", str_usg, myname, str_opt, str_pkg); printf("%s:\n", str_opt); @@ -860,6 +861,9 @@ static int parsearg_sync(int opt) case 'y': (config->op_s_sync)++; break; + case OP_PARTIAL: + config->flags |= ALPM_TRANS_FLAG_ALLOWPARTIAL; + break; default: return 1; } @@ -969,6 +973,7 @@ static int parseargs(int argc, char *argv[]) {"logfile", required_argument, 0, OP_LOGFILE}, {"ignoregroup", required_argument, 0, OP_IGNOREGROUP}, {"needed", no_argument, 0, OP_NEEDED}, + {"partial", no_argument, 0, OP_PARTIAL}, {"asexplicit", no_argument, 0, OP_ASEXPLICIT}, {"arch", required_argument, 0, OP_ARCH}, {"print-format", required_argument, 0, OP_PRINTFORMAT}, diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 95340db1..2332d476 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -806,6 +806,9 @@ int sync_prepare_execute(void) alpm_conflict_free(conflict); } break; + case ALPM_ERR_TRANS_PARTIAL_UPGRADE: + colon_printf(_("System is out of date (use -Su to upgrade)\n")); + break; default: break; } diff --git a/test/pacman/meson.build b/test/pacman/meson.build index f223f1f4..84dde220 100644 --- a/test/pacman/meson.build +++ b/test/pacman/meson.build @@ -336,6 +336,16 @@ pacman_tests = [ 'tests/upgrade084.py', 'tests/upgrade090.py', 'tests/upgrade100.py', + 'tests/partial001.py', + 'tests/partial002.py', + 'tests/partial003.py', + 'tests/partial004.py', + 'tests/partial005.py', + 'tests/partial006.py', + 'tests/partial007.py', + 'tests/partial008.py', + 'tests/partial009.py', + 'tests/partial010.py', 'tests/xfercommand001.py', 'tests/upgrade-download-404.py', 'tests/upgrade-download-pkg-and-sig-with-filename.py', diff --git a/test/pacman/tests/epoch005.py b/test/pacman/tests/epoch005.py index 62151703..fc0abe24 100644 --- a/test/pacman/tests/epoch005.py +++ b/test/pacman/tests/epoch005.py @@ -17,7 +17,7 @@ for k, v in pkgvers: lp = pmpkg("pkg_%d" % k, versions[2]) self.addpkg2db("local", lp) -self.args = "-Su" +self.args = "-Su --partial" self.addrule("PACMAN_RETCODE=0") for k, v in pkgvers: diff --git a/test/pacman/tests/ignore005.py b/test/pacman/tests/ignore005.py index 51bcba39..682e34ba 100644 --- a/test/pacman/tests/ignore005.py +++ b/test/pacman/tests/ignore005.py @@ -36,7 +36,7 @@ self.addpkg2db("sync", packageA5up) self.option["IgnorePkg"] = ["packageA3"] -self.args = "-S packageA1 packageA2 --ask=16" +self.args = "-S packageA1 packageA2 --ask=16 --partial" self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_VERSION=packageA1|1.0-1") diff --git a/test/pacman/tests/partial001.py b/test/pacman/tests/partial001.py new file mode 100644 index 00000000..fa667c5a --- /dev/null +++ b/test/pacman/tests/partial001.py @@ -0,0 +1,15 @@ +self.description = "Partial upgrade" + +sp1 = pmpkg("pkg1", "1.0-2") +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("sync", sp2) + +lp2 = pmpkg("pkg2") +self.addpkg2db("local", lp2) + +self.args = "-S %s" % sp1.name + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=pkg1") diff --git a/test/pacman/tests/partial002.py b/test/pacman/tests/partial002.py new file mode 100644 index 00000000..891f3117 --- /dev/null +++ b/test/pacman/tests/partial002.py @@ -0,0 +1,16 @@ +self.description = "Partial upgrade with --partial" + +sp1 = pmpkg("pkg1", "1.0-2") +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("sync", sp2) + +lp2 = pmpkg("pkg2") +self.addpkg2db("local", lp2) + +self.args = "-S --partial %s" % sp1.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") diff --git a/test/pacman/tests/partial003.py b/test/pacman/tests/partial003.py new file mode 100644 index 00000000..b158a3a6 --- /dev/null +++ b/test/pacman/tests/partial003.py @@ -0,0 +1,16 @@ +self.description = "No partial upgrade all needed packages are instaled" + +sp1 = pmpkg("pkg1", "1.0-2") +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("sync", sp2) + +lp2 = pmpkg("pkg2") +self.addpkg2db("local", lp2) + +self.args = "-S %s %s" % (sp1.name, sp2.name) + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") diff --git a/test/pacman/tests/partial004.py b/test/pacman/tests/partial004.py new file mode 100644 index 00000000..2bbaa08b --- /dev/null +++ b/test/pacman/tests/partial004.py @@ -0,0 +1,18 @@ +self.description = "No partial upgrade from ignorepkg" + +sp1 = pmpkg("pkg1", "1.0-2") +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("sync", sp2) + +lp2 = pmpkg("pkg2") +self.addpkg2db("local", lp2) + +self.args = "-S %s --ignore %s" % (sp1.name, sp2.name) + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") +self.addrule("PKG_VERSION=pkg2|1.0-1") + diff --git a/test/pacman/tests/partial005.py b/test/pacman/tests/partial005.py new file mode 100644 index 00000000..35e42abf --- /dev/null +++ b/test/pacman/tests/partial005.py @@ -0,0 +1,18 @@ +self.description = "No partial upgrade from -U" + +p1 = pmpkg("pkg1", "1.0-2") +self.addpkg(p1) + +sp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("sync", sp2) + +lp2 = pmpkg("pkg2") +self.addpkg2db("local", lp2) + +self.args = "-U %s" % p1.filename() + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") +self.addrule("PKG_VERSION=pkg2|1.0-1") + diff --git a/test/pacman/tests/partial006.py b/test/pacman/tests/partial006.py new file mode 100644 index 00000000..b254a8e1 --- /dev/null +++ b/test/pacman/tests/partial006.py @@ -0,0 +1,18 @@ +self.description = "Partial upgrade due to downgrade" + +sp1 = pmpkg("pkg1", "1.0-2") +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("pkg2", "1.0-1") +self.addpkg2db("sync", sp2) + +lp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("local", lp2) + +self.args = "-Su %s" % sp1.name + +self.addrule("!PACMAN_RETCODE=0") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") +self.addrule("PKG_VERSION=pkg2|1.0-2") + diff --git a/test/pacman/tests/partial007.py b/test/pacman/tests/partial007.py new file mode 100644 index 00000000..84e2a68c --- /dev/null +++ b/test/pacman/tests/partial007.py @@ -0,0 +1,20 @@ +self.description = "No partial upgrade for reinstall" + +sp1 = pmpkg("pkg1") +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("sync", sp2) + +lp1 = pmpkg("pkg1") +self.addpkg2db("local", lp1) + +lp2 = pmpkg("pkg2") +self.addpkg2db("local", lp2) + +self.args = "-S %s" % sp1.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") + diff --git a/test/pacman/tests/partial008.py b/test/pacman/tests/partial008.py new file mode 100644 index 00000000..44ff3255 --- /dev/null +++ b/test/pacman/tests/partial008.py @@ -0,0 +1,22 @@ +self.description = "Partial upgrade from replace" + +sp1 = pmpkg("pkg1", "1.0-2") +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("pkg2", "1.0-1") +self.addpkg2db("sync", sp2) + +sp3 = pmpkg("replace") +sp3.replaces = ["pkg2"] +self.addpkg2db("sync", sp3) + +lp2 = pmpkg("pkg2") +self.addpkg2db("local", lp2) + +self.args = "-S %s" % sp1.name + +self.addrule("!PACMAN_RETCODE=0") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") +self.addrule("!PKG_EXIST=replace") + diff --git a/test/pacman/tests/partial009.py b/test/pacman/tests/partial009.py new file mode 100644 index 00000000..fcfde110 --- /dev/null +++ b/test/pacman/tests/partial009.py @@ -0,0 +1,18 @@ +self.description = "Partial upgrade due to unresolvable dependency" + +packageA1 = pmpkg("dep") +self.addpkg2db("local", packageA1) + +packageA1up = pmpkg("dep", "2.0-1") +packageA1up.depends = ["fake"]; +self.addpkg2db("sync", packageA1up) + +packageA2up = pmpkg("package") +packageA2up.depends = ["dep"]; +self.addpkg2db("sync", packageA2up) + +self.args = "-S package dep --ask=16" + +self.addrule("!PACMAN_RETCODE=0") +self.addrule("!PKG_EXIST=package") +self.addrule("PKG_EXIST=dep") diff --git a/test/pacman/tests/partial010.py b/test/pacman/tests/partial010.py new file mode 100644 index 00000000..259e1ff0 --- /dev/null +++ b/test/pacman/tests/partial010.py @@ -0,0 +1,26 @@ +self.description = "Sysupgrade with ignored package prevent other upgrade causes partial upgrade" + +lp1 = pmpkg("glibc", "1.0-1") +lp2 = pmpkg("gcc-libs", "1.0-1") +lp2.depends = ["glibc>=1.0-1"] +lp3 = pmpkg("pcre", "1.0-1") +lp3.depends = ["gcc-libs"] + +for p in lp1, lp2, lp3: + self.addpkg2db("local", p) + +sp1 = pmpkg("glibc", "1.0-2") +sp2 = pmpkg("gcc-libs", "1.0-2") +sp2.depends = ["glibc>=1.0-2"] +sp3 = pmpkg("pcre", "1.0-2") +sp3.depends = ["gcc-libs"] + +for p in sp1, sp2, sp3: + self.addpkg2db("sync", p) + +self.args = "-Su --ignore %s --ask=16" % sp1.name + +self.addrule("!PACMAN_RETCODE=0") +self.addrule("PKG_VERSION=glibc|1.0-1") +self.addrule("PKG_VERSION=gcc-libs|1.0-1") +self.addrule("PKG_VERSION=pcre|1.0-1") diff --git a/test/pacman/tests/sync140.py b/test/pacman/tests/sync140.py index fbe750f2..15e78f74 100644 --- a/test/pacman/tests/sync140.py +++ b/test/pacman/tests/sync140.py @@ -18,7 +18,7 @@ sp3.depends = ["gcc-libs"] for p in sp1, sp2, sp3: self.addpkg2db("sync", p) -self.args = "-Su --ignore %s --ask=16" % sp1.name +self.args = "-Su --ignore %s --ask=16 --partial" % sp1.name self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_VERSION=glibc|1.0-1") diff --git a/test/pacman/tests/sync141.py b/test/pacman/tests/sync141.py index 02f7be81..c0a74ddb 100644 --- a/test/pacman/tests/sync141.py +++ b/test/pacman/tests/sync141.py @@ -18,7 +18,7 @@ sp3.depends = ["b_gcc-libs"] for p in sp1, sp2, sp3: self.addpkg2db("sync", p) -self.args = "-Su --ignore %s --ask=16" % sp1.name +self.args = "-Su --ignore %s --ask=16 --partial" % sp1.name self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_VERSION=c_glibc|1.0-1") diff --git a/test/pacman/tests/sync306.py b/test/pacman/tests/sync306.py index c7401d07..936812d5 100644 --- a/test/pacman/tests/sync306.py +++ b/test/pacman/tests/sync306.py @@ -57,6 +57,6 @@ lp7 = pmpkg("db", "5.2.36-2") lp7.depends = ["gcc-libs"] self.addpkg2db("local", lp7) -self.args = "-S pacman" +self.args = "-S pacman --partial" self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_VERSION=pacman|4.0.1-2") diff --git a/test/pacman/tests/sync992.py b/test/pacman/tests/sync992.py index 3b538933..300afce3 100644 --- a/test/pacman/tests/sync992.py +++ b/test/pacman/tests/sync992.py @@ -15,7 +15,7 @@ for p in sp1, sp2, sp3: lp1 = pmpkg("pkg2", "0.1-1") self.addpkg2db("local", lp1) -self.args = "-S %s --ask=4" % " ".join([p.name for p in (sp1, sp2)]) +self.args = "-S %s --ask=4 --partial" % " ".join([p.name for p in (sp1, sp2)]) self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=pkg1") diff --git a/test/pacman/tests/unresolvable001.py b/test/pacman/tests/unresolvable001.py index 4e5da6f3..95bf981c 100644 --- a/test/pacman/tests/unresolvable001.py +++ b/test/pacman/tests/unresolvable001.py @@ -11,7 +11,7 @@ packageA2up = pmpkg("package") packageA2up.depends = ["dep"]; self.addpkg2db("sync", packageA2up) -self.args = "-S package dep --ask=16" +self.args = "-S package dep --ask=16 --partial" self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=package")