diff options
author | Dan McGee <dan@archlinux.org> | 2012-02-20 17:00:26 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-02-20 17:00:26 -0600 |
commit | 3849c3aec130601572b9e06b42bb6af5938936de (patch) | |
tree | f298f227f4ff591390e55b4f02812f12312dd5c7 /src/pacman | |
parent | 326c6a8eed60bfd6aa0d653dad722d8637022d68 (diff) | |
parent | 78adb71f20ee335dff49e34d33f04817a40002b6 (diff) |
Merge branch 'maint'
Conflicts:
contrib/pacsysclean.in
src/pacman/conf.h
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/conf.h | 1 | ||||
-rw-r--r-- | src/pacman/pacman.c | 8 | ||||
-rw-r--r-- | src/pacman/sync.c | 2 | ||||
-rw-r--r-- | src/pacman/util.c | 10 |
4 files changed, 8 insertions, 13 deletions
diff --git a/src/pacman/conf.h b/src/pacman/conf.h index efd5a99e..d3494c75 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -127,7 +127,6 @@ enum { OP_ARCH, OP_PRINTFORMAT, OP_GPGDIR, - OP_RECURSIVE, OP_DBONLY, OP_FORCE }; diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index bf833269..107aa18c 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -130,7 +130,6 @@ static void usage(int op, const char * const myname) } else if(op == PM_OP_UPGRADE) { printf("%s: %s {-U --upgrade} [%s] <%s>\n", str_usg, myname, str_opt, str_file); addlist(_(" --needed do not reinstall up to date packages\n")); - addlist(_(" --recursive reinstall all dependencies of target packages\n")); printf("%s:\n", str_opt); } else if(op == PM_OP_QUERY) { printf("%s: %s {-Q --query} [%s] [%s]\n", str_usg, myname, str_opt, str_pkg); @@ -162,7 +161,6 @@ static void usage(int op, const char * const myname) addlist(_(" -w, --downloadonly download packages but do not install/upgrade anything\n")); addlist(_(" -y, --refresh download fresh package databases from the server\n")); addlist(_(" --needed do not reinstall up to date packages\n")); - addlist(_(" --recursive reinstall all dependencies of target packages\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); @@ -507,9 +505,6 @@ static int parsearg_remove(int opt) case 'c': config->flags |= ALPM_TRANS_FLAG_CASCADE; break; case 'n': config->flags |= ALPM_TRANS_FLAG_NOSAVE; break; case 's': - case OP_RECURSIVE: - /* 's' is the legacy flag here, but since recursive is used in -S without - * a shortopt, we need to do funky tricks */ if(config->flags & ALPM_TRANS_FLAG_RECURSE) { config->flags |= ALPM_TRANS_FLAG_RECURSEALL; } else { @@ -532,7 +527,6 @@ static int parsearg_upgrade(int opt) case OP_ASDEPS: config->flags |= ALPM_TRANS_FLAG_ALLDEPS; break; case OP_ASEXPLICIT: config->flags |= ALPM_TRANS_FLAG_ALLEXPLICIT; break; case OP_NEEDED: config->flags |= ALPM_TRANS_FLAG_NEEDED; break; - case OP_RECURSIVE: config->flags |= ALPM_TRANS_FLAG_RECURSE; break; case OP_IGNORE: parsearg_util_addlist(&(config->ignorepkg)); break; @@ -606,6 +600,7 @@ static int parseargs(int argc, char *argv[]) {"print", no_argument, 0, 'p'}, {"quiet", no_argument, 0, 'q'}, {"root", required_argument, 0, 'r'}, + {"recursive", no_argument, 0, 's'}, {"search", no_argument, 0, 's'}, {"unrequired", no_argument, 0, 't'}, {"upgrades", no_argument, 0, 'u'}, @@ -632,7 +627,6 @@ static int parseargs(int argc, char *argv[]) {"arch", required_argument, 0, OP_ARCH}, {"print-format", required_argument, 0, OP_PRINTFORMAT}, {"gpgdir", required_argument, 0, OP_GPGDIR}, - {"recursive", no_argument, 0, OP_RECURSIVE}, {"dbonly", no_argument, 0, OP_DBONLY}, {0, 0, 0, 0} }; diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 700bb780..f370f82f 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -975,8 +975,6 @@ int pacman_sync(alpm_list_t *targets) FREELIST(targs); targs = packages; config->flags = 0; - config->flags |= ALPM_TRANS_FLAG_RECURSE; - config->flags |= ALPM_TRANS_FLAG_NEEDED; config->op_s_upgrade = 0; } else { FREELIST(packages); diff --git a/src/pacman/util.c b/src/pacman/util.c index ccdc2079..1d9049ee 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -67,9 +67,13 @@ void trans_init_error(void) pm_printf(ALPM_LOG_ERROR, _("failed to init transaction (%s)\n"), alpm_strerror(err)); if(err == ALPM_ERR_HANDLE_LOCK) { - fprintf(stderr, _(" if you're sure a package manager is not already\n" - " running, you can remove %s\n"), - alpm_option_get_lockfile(config->handle)); + const char *lockfile = alpm_option_get_lockfile(config->handle); + pm_printf(ALPM_LOG_ERROR, _("could not lock database: %s\n"), + strerror(errno)); + if(access(lockfile, F_OK) == 0) { + fprintf(stderr, _(" if you're sure a package manager is not already\n" + " running, you can remove %s\n"), lockfile); + } } } |