summaryrefslogtreecommitdiffstats
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 326664dd..3e17d905 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
/* special handling of package version for GIT */
#if defined(GIT_VERSION)
#undef PACKAGE_VERSION
@@ -39,9 +37,6 @@
#include <sys/utsname.h> /* uname */
#include <locale.h> /* setlocale */
#include <errno.h>
-#if defined(PACMAN_DEBUG) && defined(HAVE_MCHECK_H)
-#include <mcheck.h> /* debug tracing (mtrace) */
-#endif
/* alpm */
#include <alpm.h>
@@ -180,7 +175,7 @@ static void usage(int op, const char * const myname)
switch(op) {
case PM_OP_SYNC:
case PM_OP_UPGRADE:
- addlist(_(" -f, --force force install, overwrite conflicting files\n"));
+ addlist(_(" --force force install, overwrite conflicting files\n"));
addlist(_(" --asdeps install packages as non-explicitly installed\n"));
addlist(_(" --asexplicit install packages as explicitly installed\n"));
addlist(_(" --ignore <pkg> ignore a package upgrade (can be used more than once)\n"));
@@ -210,8 +205,8 @@ static void usage(int op, const char * const myname)
addlist(_(" --noconfirm do not ask for any confirmation\n"));
}
list = alpm_list_msort(list, alpm_list_count(list), options_cmp);
- for (i = list; i; i = alpm_list_next(i)) {
- printf("%s", (char *)alpm_list_getdata(i));
+ for(i = list; i; i = alpm_list_next(i)) {
+ fputs((const char *)i->data, stdout);
}
alpm_list_free(list);
#undef addlist
@@ -533,7 +528,7 @@ static int parsearg_upgrade(int opt)
if(parsearg_trans(opt) == 0)
return 0;
switch(opt) {
- case 'f': config->flags |= ALPM_TRANS_FLAG_FORCE; break;
+ case OP_FORCE: config->flags |= ALPM_TRANS_FLAG_FORCE; break;
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;
@@ -599,7 +594,6 @@ static int parseargs(int argc, char *argv[])
{"nodeps", no_argument, 0, 'd'},
{"deps", no_argument, 0, 'd'},
{"explicit", no_argument, 0, 'e'},
- {"force", no_argument, 0, 'f'},
{"groups", no_argument, 0, 'g'},
{"help", no_argument, 0, 'h'},
{"info", no_argument, 0, 'i'},
@@ -625,6 +619,7 @@ static int parseargs(int argc, char *argv[])
{"config", required_argument, 0, OP_CONFIG},
{"ignore", required_argument, 0, OP_IGNORE},
{"debug", optional_argument, 0, OP_DEBUG},
+ {"force", no_argument, 0, OP_FORCE},
{"noprogressbar", no_argument, 0, OP_NOPROGRESSBAR},
{"noscriptlet", no_argument, 0, OP_NOSCRIPTLET},
{"ask", required_argument, 0, OP_ASK},
@@ -769,11 +764,6 @@ int main(int argc, char *argv[])
uid_t myuid = geteuid();
#endif
-#if defined(PACMAN_DEBUG) && defined(HAVE_MCHECK_H)
- /*setenv("MALLOC_TRACE","pacman.mtrace", 0);*/
- mtrace();
-#endif
-
/* Set signal handlers */
/* Set up the structure to specify the new action. */
new_action.sa_handler = handler;
@@ -905,7 +895,7 @@ int main(int argc, char *argv[])
printf("DB Path : %s\n", alpm_option_get_dbpath(config->handle));
printf("Cache Dirs: ");
for(i = alpm_option_get_cachedirs(config->handle); i; i = alpm_list_next(i)) {
- printf("%s ", (char *)alpm_list_getdata(i));
+ printf("%s ", (const char *)i->data);
}
printf("\n");
printf("Lock File : %s\n", alpm_option_get_lockfile(config->handle));