summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/alpm.h3
-rw-r--r--lib/libalpm/conflict.c3
-rw-r--r--src/pacman/pacman.c5
-rw-r--r--src/pacman/sync.c3
-rw-r--r--test/pacman/tests/TESTS5
-rw-r--r--test/pacman/tests/upgrade012.py14
-rw-r--r--test/pacman/tests/upgrade014.py23
-rw-r--r--test/pacman/tests/upgrade015.py14
-rw-r--r--test/pacman/tests/upgrade016.py15
-rw-r--r--test/pacman/tests/upgrade046.py31
10 files changed, 2 insertions, 114 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 57226ebd..2d3d198a 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -1461,8 +1461,7 @@ alpm_pkg_t *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_sync);
typedef enum _alpm_transflag_t {
/** Ignore dependency checks. */
ALPM_TRANS_FLAG_NODEPS = 1,
- /** Ignore file conflicts and overwrite files. */
- ALPM_TRANS_FLAG_FORCE = (1 << 1),
+ /* (1 << 1) flag can go here */
/** Delete files even if they are tagged as backup. */
ALPM_TRANS_FLAG_NOSAVE = (1 << 2),
/** Ignore version numbers when checking dependencies. */
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 716d0088..9385be9e 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -401,8 +401,7 @@ static alpm_pkg_t *_alpm_find_file_owner(alpm_handle_t *handle, const char *path
static int _alpm_can_overwrite_file(alpm_handle_t *handle, const char *path, const char *rootedpath)
{
- return handle->trans->flags & ALPM_TRANS_FLAG_FORCE
- || _alpm_fnmatch_patterns(handle->overwrite_files, path) == 0
+ return _alpm_fnmatch_patterns(handle->overwrite_files, path) == 0
|| _alpm_fnmatch_patterns(handle->overwrite_files, rootedpath) == 0;
}
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index e0178da8..a2a420b6 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -716,11 +716,6 @@ static int parsearg_upgrade(int opt)
return 0;
}
switch(opt) {
- case OP_FORCE:
- pm_printf(ALPM_LOG_WARNING,
- _("option --force is deprecated; use --overwrite instead\n"));
- config->flags |= ALPM_TRANS_FLAG_FORCE;
- break;
case OP_OVERWRITE_FILES:
parsearg_util_addlist(&(config->overwrite_files));
break;
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 3c6be89d..ef8faedf 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -813,9 +813,6 @@ int sync_prepare_execute(void)
alpm_strerror(err));
switch(err) {
case ALPM_ERR_FILE_CONFLICTS:
- if(config->flags & ALPM_TRANS_FLAG_FORCE) {
- printf(_("unable to %s directory-file conflicts\n"), "--force");
- }
for(i = data; i; i = alpm_list_next(i)) {
alpm_fileconflict_t *conflict = i->data;
switch(conflict->type) {
diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
index a9b4288c..b11cb511 100644
--- a/test/pacman/tests/TESTS
+++ b/test/pacman/tests/TESTS
@@ -276,11 +276,7 @@ TESTS += test/pacman/tests/upgrade005.py
TESTS += test/pacman/tests/upgrade006.py
TESTS += test/pacman/tests/upgrade010.py
TESTS += test/pacman/tests/upgrade011.py
-TESTS += test/pacman/tests/upgrade012.py
TESTS += test/pacman/tests/upgrade013.py
-TESTS += test/pacman/tests/upgrade014.py
-TESTS += test/pacman/tests/upgrade015.py
-TESTS += test/pacman/tests/upgrade016.py
TESTS += test/pacman/tests/upgrade020.py
TESTS += test/pacman/tests/upgrade021.py
TESTS += test/pacman/tests/upgrade022.py
@@ -299,7 +295,6 @@ TESTS += test/pacman/tests/upgrade041.py
TESTS += test/pacman/tests/upgrade042.py
TESTS += test/pacman/tests/upgrade043.py
TESTS += test/pacman/tests/upgrade045.py
-TESTS += test/pacman/tests/upgrade046.py
TESTS += test/pacman/tests/upgrade050.py
TESTS += test/pacman/tests/upgrade051.py
TESTS += test/pacman/tests/upgrade052.py
diff --git a/test/pacman/tests/upgrade012.py b/test/pacman/tests/upgrade012.py
deleted file mode 100644
index 4d9f0cd1..00000000
--- a/test/pacman/tests/upgrade012.py
+++ /dev/null
@@ -1,14 +0,0 @@
-self.description = "Install a package with a filesystem conflict (--force)"
-
-p = pmpkg("dummy")
-p.files = ["bin/dummy", "usr/man/man1/dummy.1"]
-self.addpkg(p)
-
-self.filesystem = ["bin/dummy"]
-
-self.args = "-U --force %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=dummy")
-self.addrule("FILE_MODIFIED=bin/dummy")
-self.addrule("FILE_EXIST=usr/man/man1/dummy.1")
diff --git a/test/pacman/tests/upgrade014.py b/test/pacman/tests/upgrade014.py
deleted file mode 100644
index 2ef759d1..00000000
--- a/test/pacman/tests/upgrade014.py
+++ /dev/null
@@ -1,23 +0,0 @@
-self.description = "Install two packages with a conflicting file (--force)"
-
-p1 = pmpkg("dummy")
-p1.files = ["bin/dummy",
- "usr/man/man1/dummy.1",
- "usr/common"]
-
-p2 = pmpkg("foobar")
-p2.files = ["bin/foobar",
- "usr/man/man1/foobar.1",
- "usr/common"]
-
-for p in p1, p2:
- self.addpkg(p)
-
-self.args = "-U --force %s" % " ".join([p.filename() for p in (p1, p2)])
-
-self.addrule("PACMAN_RETCODE=0")
-for p in p1, p2:
- self.addrule("PKG_EXIST=%s" % p.name)
- self.addrule("PKG_FILES=%s|usr/common" % p.name)
- for f in p.files:
- self.addrule("FILE_EXIST=%s" % f)
diff --git a/test/pacman/tests/upgrade015.py b/test/pacman/tests/upgrade015.py
deleted file mode 100644
index 64fe2813..00000000
--- a/test/pacman/tests/upgrade015.py
+++ /dev/null
@@ -1,14 +0,0 @@
-self.description = "Install a package with an existing file (--force)"
-
-p = pmpkg("dummy")
-p.files = ["etc/dummy.conf"]
-self.addpkg(p)
-
-self.filesystem = ["etc/dummy.conf"]
-
-self.args = "-U --force %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=dummy")
-self.addrule("FILE_MODIFIED=etc/dummy.conf")
-self.addrule("!FILE_PACNEW=etc/dummy.conf")
diff --git a/test/pacman/tests/upgrade016.py b/test/pacman/tests/upgrade016.py
deleted file mode 100644
index ddf57e8c..00000000
--- a/test/pacman/tests/upgrade016.py
+++ /dev/null
@@ -1,15 +0,0 @@
-self.description = "Install a package with an existing file (--force, new modified)"
-
-p = pmpkg("dummy")
-p.files = ["etc/dummy.conf*"]
-p.backup = ["etc/dummy.conf"]
-self.addpkg(p)
-
-self.filesystem = ["etc/dummy.conf"]
-
-self.args = "-U --force %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=dummy")
-self.addrule("!FILE_MODIFIED=etc/dummy.conf")
-self.addrule("FILE_PACNEW=etc/dummy.conf")
diff --git a/test/pacman/tests/upgrade046.py b/test/pacman/tests/upgrade046.py
deleted file mode 100644
index 0b59ca66..00000000
--- a/test/pacman/tests/upgrade046.py
+++ /dev/null
@@ -1,31 +0,0 @@
-self.description = "File relocation between two packages (reverse order, --force)"
-
-lp1 = pmpkg("dummy")
-lp1.files = ["bin/dummy"]
-
-lp2 = pmpkg("foobar")
-lp2.files = ["bin/foobar",
- "usr/share/file"]
-
-for p in lp1, lp2:
- self.addpkg2db("local", p)
-
-p1 = pmpkg("dummy")
-p1.files = ["bin/dummy",
- "usr/share/file"]
-
-p2 = pmpkg("foobar")
-p2.files = ["bin/foobar"]
-
-for p in p1, p2:
- self.addpkg(p)
-
-self.args = "-U --force %s" % " ".join([p.filename() for p in (p1, p2)])
-
-self.addrule("PACMAN_RETCODE=0")
-for p in p1, p2:
- self.addrule("PKG_EXIST=%s" % p.name)
-self.addrule("FILE_MODIFIED=bin/dummy")
-self.addrule("FILE_MODIFIED=bin/foobar")
-self.addrule("FILE_EXIST=usr/share/file")
-self.addrule("FILE_MODIFIED=usr/share/file")