Skip to content

Commit 7d05ffc

Browse files
committed
Remove the last traces of the pacman --force option
Signed-off-by: Allan McRae <[email protected]>
1 parent e4be26b commit 7d05ffc

File tree

10 files changed

+2
-114
lines changed

10 files changed

+2
-114
lines changed

lib/libalpm/alpm.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -1461,8 +1461,7 @@ alpm_pkg_t *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_sync);
14611461
typedef enum _alpm_transflag_t {
14621462
/** Ignore dependency checks. */
14631463
ALPM_TRANS_FLAG_NODEPS = 1,
1464-
/** Ignore file conflicts and overwrite files. */
1465-
ALPM_TRANS_FLAG_FORCE = (1 << 1),
1464+
/* (1 << 1) flag can go here */
14661465
/** Delete files even if they are tagged as backup. */
14671466
ALPM_TRANS_FLAG_NOSAVE = (1 << 2),
14681467
/** Ignore version numbers when checking dependencies. */

lib/libalpm/conflict.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,7 @@ static alpm_pkg_t *_alpm_find_file_owner(alpm_handle_t *handle, const char *path
401401

402402
static int _alpm_can_overwrite_file(alpm_handle_t *handle, const char *path, const char *rootedpath)
403403
{
404-
return handle->trans->flags & ALPM_TRANS_FLAG_FORCE
405-
|| _alpm_fnmatch_patterns(handle->overwrite_files, path) == 0
404+
return _alpm_fnmatch_patterns(handle->overwrite_files, path) == 0
406405
|| _alpm_fnmatch_patterns(handle->overwrite_files, rootedpath) == 0;
407406
}
408407

src/pacman/pacman.c

-5
Original file line numberDiff line numberDiff line change
@@ -716,11 +716,6 @@ static int parsearg_upgrade(int opt)
716716
return 0;
717717
}
718718
switch(opt) {
719-
case OP_FORCE:
720-
pm_printf(ALPM_LOG_WARNING,
721-
_("option --force is deprecated; use --overwrite instead\n"));
722-
config->flags |= ALPM_TRANS_FLAG_FORCE;
723-
break;
724719
case OP_OVERWRITE_FILES:
725720
parsearg_util_addlist(&(config->overwrite_files));
726721
break;

src/pacman/sync.c

-3
Original file line numberDiff line numberDiff line change
@@ -813,9 +813,6 @@ int sync_prepare_execute(void)
813813
alpm_strerror(err));
814814
switch(err) {
815815
case ALPM_ERR_FILE_CONFLICTS:
816-
if(config->flags & ALPM_TRANS_FLAG_FORCE) {
817-
printf(_("unable to %s directory-file conflicts\n"), "--force");
818-
}
819816
for(i = data; i; i = alpm_list_next(i)) {
820817
alpm_fileconflict_t *conflict = i->data;
821818
switch(conflict->type) {

test/pacman/tests/TESTS

-5
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,7 @@ TESTS += test/pacman/tests/upgrade005.py
276276
TESTS += test/pacman/tests/upgrade006.py
277277
TESTS += test/pacman/tests/upgrade010.py
278278
TESTS += test/pacman/tests/upgrade011.py
279-
TESTS += test/pacman/tests/upgrade012.py
280279
TESTS += test/pacman/tests/upgrade013.py
281-
TESTS += test/pacman/tests/upgrade014.py
282-
TESTS += test/pacman/tests/upgrade015.py
283-
TESTS += test/pacman/tests/upgrade016.py
284280
TESTS += test/pacman/tests/upgrade020.py
285281
TESTS += test/pacman/tests/upgrade021.py
286282
TESTS += test/pacman/tests/upgrade022.py
@@ -299,7 +295,6 @@ TESTS += test/pacman/tests/upgrade041.py
299295
TESTS += test/pacman/tests/upgrade042.py
300296
TESTS += test/pacman/tests/upgrade043.py
301297
TESTS += test/pacman/tests/upgrade045.py
302-
TESTS += test/pacman/tests/upgrade046.py
303298
TESTS += test/pacman/tests/upgrade050.py
304299
TESTS += test/pacman/tests/upgrade051.py
305300
TESTS += test/pacman/tests/upgrade052.py

test/pacman/tests/upgrade012.py

-14
This file was deleted.

test/pacman/tests/upgrade014.py

-23
This file was deleted.

test/pacman/tests/upgrade015.py

-14
This file was deleted.

test/pacman/tests/upgrade016.py

-15
This file was deleted.

test/pacman/tests/upgrade046.py

-31
This file was deleted.

0 commit comments

Comments
 (0)