summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/pacman.conf.5.txt9
-rw-r--r--etc/pacman.conf.in2
-rw-r--r--src/pacman/conf.c3
-rw-r--r--src/pacman/conf.h1
-rw-r--r--src/pacman/sync.c53
-rw-r--r--test/pacman/README1
-rw-r--r--test/pacman/tests/sync301.py27
-rw-r--r--test/pacman/tests/sync302.py49
-rw-r--r--test/pacman/tests/sync303.py35
-rw-r--r--test/pacman/tests/sync304.py25
-rw-r--r--test/pacman/tests/sync305.py64
11 files changed, 1 insertions, 268 deletions
diff --git a/doc/pacman.conf.5.txt b/doc/pacman.conf.5.txt
index 39132925..a9c5db36 100644
--- a/doc/pacman.conf.5.txt
+++ b/doc/pacman.conf.5.txt
@@ -93,15 +93,6 @@ Options
Instructs pacman to ignore any upgrades for this package when performing
a '\--sysupgrade'. Shell-style glob patterns are allowed.
-*SyncFirst =* package ...::
- Instructs pacman to check for newer version of these packages before any
- sync operation. The user will have the choice to either cancel the current
- operation and upgrade these packages first or go on with the current
- operation. This option is typically used with the 'pacman' package.
- *NOTE*: when a `SyncFirst` transaction takes place, no command line flags
- (e.g. '\--force') are honored. If this is not ideal, disabling `SyncFirst`
- and performing a manual sync of the involved packages may be required.
-
*IgnoreGroup =* group ...::
Instructs pacman to ignore any upgrades for all packages in this
group when performing a '\--sysupgrade'. Shell-style glob patterns are
diff --git a/etc/pacman.conf.in b/etc/pacman.conf.in
index 7f9db1b5..4c727240 100644
--- a/etc/pacman.conf.in
+++ b/etc/pacman.conf.in
@@ -15,8 +15,6 @@
#LogFile = @localstatedir@/log/pacman.log
#GPGDir = @sysconfdir@/pacman.d/gnupg/
HoldPkg = pacman glibc
-# If upgrades are available for these packages they will be asked for first
-SyncFirst = pacman
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 2632d18f..4aaacb54 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -71,7 +71,6 @@ int config_free(config_t *oldconfig)
alpm_list_free(oldconfig->explicit_removes);
FREELIST(oldconfig->holdpkg);
- FREELIST(oldconfig->syncfirst);
FREELIST(oldconfig->ignorepkg);
FREELIST(oldconfig->ignoregrp);
FREELIST(oldconfig->noupgrade);
@@ -422,8 +421,6 @@ static int _parse_options(const char *key, char *value,
setrepeatingoption(value, "IgnoreGroup", &(config->ignoregrp));
} else if(strcmp(key, "HoldPkg") == 0) {
setrepeatingoption(value, "HoldPkg", &(config->holdpkg));
- } else if(strcmp(key, "SyncFirst") == 0) {
- setrepeatingoption(value, "SyncFirst", &(config->syncfirst));
} else if(strcmp(key, "CacheDir") == 0) {
setrepeatingoption(value, "CacheDir", &(config->cachedirs));
} else if(strcmp(key, "Architecture") == 0) {
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index d3494c75..69c955ed 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -84,7 +84,6 @@ typedef struct __config_t {
/* select -Sc behavior */
unsigned short cleanmethod;
alpm_list_t *holdpkg;
- alpm_list_t *syncfirst;
alpm_list_t *ignorepkg;
alpm_list_t *ignoregrp;
alpm_list_t *noupgrade;
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 9c17f45f..3b094854 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -591,26 +591,6 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
return 0;
}
-static alpm_list_t *syncfirst(void) {
- alpm_list_t *i, *res = NULL;
- alpm_db_t *db_local = alpm_get_localdb(config->handle);
- alpm_list_t *syncdbs = alpm_get_syncdbs(config->handle);
-
- for(i = config->syncfirst; i; i = alpm_list_next(i)) {
- const char *pkgname = i->data;
- alpm_pkg_t *pkg = alpm_db_get_pkg(db_local, pkgname);
- if(pkg == NULL) {
- continue;
- }
-
- if(alpm_sync_newversion(pkg, syncdbs)) {
- res = alpm_list_add(res, strdup(pkgname));
- }
- }
-
- return res;
-}
-
static alpm_db_t *get_db(const char *dbname)
{
alpm_list_t *i;
@@ -1001,38 +981,7 @@ int pacman_sync(alpm_list_t *targets)
}
}
- alpm_list_t *targs = alpm_list_strdup(targets);
- if(!config->op_s_downloadonly && !config->print) {
- /* check for newer versions of packages to be upgraded first */
- alpm_list_t *packages = syncfirst();
- if(packages) {
- /* Do not ask user if all the -S targets are SyncFirst packages, see FS#15810 */
- alpm_list_t *tmp = NULL;
- if(config->op_s_upgrade || (tmp = alpm_list_diff(targets, packages, (alpm_list_fn_cmp)strcmp))) {
- alpm_list_free(tmp);
- printf(_(":: The following packages should be upgraded first :\n"));
- list_display(" ", packages, getcols(fileno(stdout)));
- if(yesno(_(":: Do you want to cancel the current operation\n"
- ":: and upgrade these packages now?"))) {
- FREELIST(targs);
- targs = packages;
- config->flags = 0;
- config->op_s_upgrade = 0;
- } else {
- FREELIST(packages);
- }
- printf("\n");
- } else {
- pm_printf(ALPM_LOG_DEBUG, "skipping SyncFirst dialog\n");
- FREELIST(packages);
- }
- }
- }
-
- int ret = sync_trans(targs);
- FREELIST(targs);
-
- return ret;
+ return sync_trans(targets);
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/test/pacman/README b/test/pacman/README
index a3c36fc9..ae3303a3 100644
--- a/test/pacman/README
+++ b/test/pacman/README
@@ -108,7 +108,6 @@ is not necessarily complete:
- HoldPkg
- IgnorePkg
- IgnoreGroup
- - SyncFirst
- NoExtract
- NoUpgrade
- XferCommand
diff --git a/test/pacman/tests/sync301.py b/test/pacman/tests/sync301.py
deleted file mode 100644
index 96402fc3..00000000
--- a/test/pacman/tests/sync301.py
+++ /dev/null
@@ -1,27 +0,0 @@
-self.description = "Sysupgrade : pacman needs to be upgraded and has new deps"
-
-sp = pmpkg("pacman", "1.0-2")
-sp.depends = ["dep"]
-self.addpkg2db("sync", sp)
-
-spdep = pmpkg("dep")
-self.addpkg2db("sync", spdep)
-
-sp1 = pmpkg("pkg1", "1.0-2")
-self.addpkg2db("sync", sp1)
-
-lp = pmpkg("pacman", "1.0-1")
-self.addpkg2db("local", lp)
-
-lp1 = pmpkg("pkg1", "1.0-1")
-self.addpkg2db("local", lp1)
-
-self.option["SyncFirst"] = ["pacman"]
-
-self.args = "-Su"
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pacman")
-self.addrule("PKG_VERSION=pacman|1.0-2")
-self.addrule("PKG_VERSION=pkg1|1.0-1")
-self.addrule("PKG_EXIST=dep")
diff --git a/test/pacman/tests/sync302.py b/test/pacman/tests/sync302.py
deleted file mode 100644
index 78e45c33..00000000
--- a/test/pacman/tests/sync302.py
+++ /dev/null
@@ -1,49 +0,0 @@
-self.description = "Sysupgrade : pacman needs to be upgraded and has updated deps"
-
-sp = pmpkg("pacman", "1.0-2")
-sp.depends = ["zlib", "curl", "libarchive"]
-self.addpkg2db("sync", sp)
-
-libcdep = pmpkg("glibc", "2.15-1")
-self.addpkg2db("sync", libcdep)
-
-curldep = pmpkg("curl", "7.22-1")
-self.addpkg2db("sync", curldep)
-
-libadep = pmpkg("libarchive", "2.8.5-1")
-self.addpkg2db("sync", libadep)
-
-zlibdep = pmpkg("zlib", "1.2.5-3")
-zlibdep.depends = ["glibc"]
-self.addpkg2db("sync", zlibdep)
-
-
-lp = pmpkg("pacman", "1.0-1")
-self.addpkg2db("local", lp)
-
-lp1 = pmpkg("curl", "7.21.7-1")
-self.addpkg2db("local", lp1)
-
-lp2 = pmpkg("glibc", "2.13-1")
-self.addpkg2db("local", lp2)
-
-lp3 = pmpkg("libarchive", "2.8.4-1")
-self.addpkg2db("local", lp3)
-
-lp4 = pmpkg("zlib", "1.2.5-3")
-self.addpkg2db("local", lp4)
-
-self.option["SyncFirst"] = ["pacman"]
-
-self.args = "-Su"
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_VERSION=pacman|1.0-2")
-self.addrule("PKG_EXIST=glibc")
-self.addrule("PKG_EXIST=curl")
-self.addrule("PKG_EXIST=libarchive")
-# TODO: when SyncFirst recursive comes back, re-enable these
-#self.addrule("PKG_VERSION=glibc|2.15-1")
-#self.addrule("PKG_VERSION=curl|7.22-1")
-#self.addrule("PKG_VERSION=libarchive|2.8.5-1")
-self.addrule("PKG_EXIST=zlib")
diff --git a/test/pacman/tests/sync303.py b/test/pacman/tests/sync303.py
deleted file mode 100644
index 9d7bab58..00000000
--- a/test/pacman/tests/sync303.py
+++ /dev/null
@@ -1,35 +0,0 @@
-self.description = "Sysupgrade: upgrade pacman with deps as provisions"
-
-sp = pmpkg("pacman", "1.0-2")
-sp.depends = ["zlib"]
-self.addpkg2db("sync", sp)
-
-glibcdep = pmpkg("glibc", "2.13-1")
-self.addpkg2db("sync", glibcdep)
-
-zlibdep = pmpkg("zlib", "1.2.5-3")
-zlibdep.depends = ["glibc"]
-self.addpkg2db("sync", zlibdep)
-
-
-lp = pmpkg("pacman", "1.0-1")
-lp.depends = ["zlib"]
-self.addpkg2db("local", lp)
-
-lp2 = pmpkg("glibc-awesome", "2.13-2")
-lp2.provides = ["glibc=2.13"]
-lp2.conflicts = ["glibc"]
-self.addpkg2db("local", lp2)
-
-lp3 = pmpkg("zlib", "1.2.5-3")
-self.addpkg2db("local", lp3)
-
-self.option["SyncFirst"] = ["pacman"]
-
-self.args = "-Su"
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_VERSION=pacman|1.0-2")
-self.addrule("PKG_EXIST=glibc-awesome")
-self.addrule("PKG_VERSION=glibc-awesome|2.13-2")
-self.addrule("PKG_EXIST=zlib")
diff --git a/test/pacman/tests/sync304.py b/test/pacman/tests/sync304.py
deleted file mode 100644
index 18058c99..00000000
--- a/test/pacman/tests/sync304.py
+++ /dev/null
@@ -1,25 +0,0 @@
-self.description = "Sysupgrade: upgrade pacman being depended on"
-
-sp = pmpkg("pacman", "4.0.1-1")
-self.addpkg2db("sync", sp)
-
-sp2 = pmpkg("pyalpm", "2-1")
-sp2.depends = ["pacman>=4.0", "pacman<4.1"]
-self.addpkg2db("sync", sp2)
-
-lp = pmpkg("pacman", "3.5.4-1")
-self.addpkg2db("local", lp)
-
-lp2 = pmpkg("pyalpm", "1-1")
-lp2.depends = ["pacman>=3.5", "pacman<3.6"]
-self.addpkg2db("local", lp2)
-
-self.option["SyncFirst"] = ["pacman"]
-
-self.args = "-Su"
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_VERSION=pacman|4.0.1-1")
-self.addrule("PKG_VERSION=pyalpm|2-1")
-
-self.expectfailure = True
diff --git a/test/pacman/tests/sync305.py b/test/pacman/tests/sync305.py
deleted file mode 100644
index 62005b58..00000000
--- a/test/pacman/tests/sync305.py
+++ /dev/null
@@ -1,64 +0,0 @@
-self.description = "Sysupgrade: syncfirst with recursive/cascading deps"
-
-sp = pmpkg("pacman", "4.0.1-2")
-sp.depends = ["glibc>=2.15", "curl"]
-self.addpkg2db("sync", sp)
-
-glibcdep = pmpkg("glibc", "2.15-1")
-self.addpkg2db("sync", glibcdep)
-
-gcldep = pmpkg("gcc-libs", "4.6.2-5")
-gcldep.depends = ["glibc>=2.14"]
-self.addpkg2db("sync", gcldep)
-
-curldep = pmpkg("curl", "7.23.1-2")
-curldep.depends = ["openssl"]
-self.addpkg2db("sync", curldep)
-
-openssldep = pmpkg("openssl", "1.0.0.e-1")
-openssldep.depends = ["perl"]
-self.addpkg2db("sync", openssldep)
-
-gccdep = pmpkg("gcc", "4.6.2-5")
-gccdep.depends = ["gcc-libs=4.6.2-5"]
-self.addpkg2db("sync", gccdep)
-
-perldep = pmpkg("perl", "5.14.2-5")
-perldep.depends = ["db"]
-self.addpkg2db("sync", perldep)
-
-dbdep = pmpkg("db", "5.2.36-2")
-dbdep.depends = ["gcc-libs"]
-self.addpkg2db("sync", dbdep)
-
-
-lp = pmpkg("pacman", "4.0.1-1")
-lp.depends = ["glibc>=2.14", "curl"]
-self.addpkg2db("local", lp)
-
-lp2 = pmpkg("glibc", "2.14-2")
-self.addpkg2db("local", lp2)
-
-lp3 = pmpkg("curl", "7.23.1-2")
-self.addpkg2db("local", lp3)
-
-lp4 = pmpkg("gcc-libs", "4.6.2-3")
-self.addpkg2db("local", lp4)
-
-lp5 = pmpkg("gcc", "4.6.2-3")
-lp5.depends = ["gcc-libs=4.6.2-3"]
-self.addpkg2db("local", lp5)
-
-lp6 = pmpkg("perl", "5.14.2-5")
-lp6.depends = ["db"]
-self.addpkg2db("local", lp6)
-
-lp7 = pmpkg("db", "5.2.36-2")
-lp7.depends = ["gcc-libs"]
-self.addpkg2db("local", lp7)
-
-self.option["SyncFirst"] = ["pacman"]
-
-self.args = "-Su"
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_VERSION=pacman|4.0.1-2")