[Frugalware-darcs] pacman: sync with upstream
VMiklos
vmiklos at frugalware.org
Thu Oct 19 15:16:52 CEST 2006
Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman;a=darcs_commitdiff;h=20061019131532-e2957-8134395ed7ff3f17706d124443c95e1d76fb89e5.gz;
[sync with upstream
VMiklos <vmiklos at frugalware.org>**20061019131532
java detection fix
updated download progressbar
a few minor fixes
] {
hunk ./Makefile.am 1
-SUBDIRS = lib/libftp lib/libalpm src/util src/pacman scripts doc etc
+SUBDIRS = lib/libftp lib/libalpm src/util src/pacman scripts doc doc/hu etc
+
hunk ./configure.ac 259
- AC_CHECK_PROGS([SWIG], [swig])
- AC_CHECK_PROGS([JAVAC], [javac])
- AM_CONDITIONAL(HAS_JAVA, test $SWIG)
- AM_CONDITIONAL(HAS_JAVA, test $JAVAC)
- if test $JAVAC ; then
- if test $SWIG ; then
- AC_DEFINE([HAS_JAVA], [TRUE], [Enabled Java Support (javac=ok swig=ok)])
- AC_MSG_RESULT(yes)
- JAVASTATUS="yes, path: `which $JAVAC`"
- else
- AC_DEFINE([HAS_JAVA], [FALSE], [Java support disabled because swig not found (javac=ok swig=missing)])
- AC_MSG_RESULT(no, swig not found and that is need for java)
- JAVASTATUS="java compiler found, swig not found"
- fi
- else
- if test $SWIG ; then
- AC_DEFINE([HAS_JAVA], [FALSE], [Disabled Java support (javac=missing swig=ok])
- AC_MSG_RESULT(no, javac missing, swig ok)
- JAVASTATUS="java compiler not found, swig found"
- else
- AC_DEFINE([HAS_JAVA], [FALSE], [Disabled Java support (javac=missing swig=missing])
- AC_MSG_RESULT(no, javac missing, swig missing)
- JAVASTATUS="java compiler not found, swig not found"
- fi
- fi
+ AC_CHECK_PROGS([SWIG], [swig])
+ AC_CHECK_PROGS([JAVAC], [javac])
+ AM_CONDITIONAL(HAS_JAVA, test $SWIG)
+ AM_CONDITIONAL(HAS_JAVA, test $JAVAC)
+ if test $JAVAC ; then
+ if test $SWIG ; then
+ AC_DEFINE([HAS_JAVA], [TRUE], [Enabled Java Support (javac=ok swig=ok)])
+ AC_MSG_RESULT(yes)
+ JAVASTATUS="yes, path: `which $JAVAC`"
+ else
+ AC_DEFINE([HAS_JAVA], [FALSE], [Java support disabled because swig not found (javac=ok swig=missing)])
+ AC_MSG_RESULT(no, swig not found and that is need for java)
+ JAVASTATUS="java compiler found, swig not found"
+ fi
+ else
+ if test $SWIG ; then
+ AC_DEFINE([HAS_JAVA], [FALSE], [Disabled Java support (javac=missing swig=ok])
+ AC_MSG_RESULT(no, javac missing, swig ok)
+ JAVASTATUS="java compiler not found, swig found"
+ else
+ AC_DEFINE([HAS_JAVA], [FALSE], [Disabled Java support (javac=missing swig=missing])
+ AC_MSG_RESULT(no, javac missing, swig missing)
+ JAVASTATUS="java compiler not found, swig not found"
+ fi
+ fi
hunk ./lib/libalpm/Makefile.am 32
- alpm.c
-TARGETS += be_files.c
+ alpm.c \
+ be_files.c
hunk ./lib/libalpm/add.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/add.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/alpm.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/alpm.c 175
- int found = 0;
hunk ./lib/libalpm/alpm.c 185
- found = 1;
+ _alpm_log(PM_LOG_WARNING, _("attempt to re-register the 'local' DB\n"));
+ RET_ERR(PM_ERR_DB_NOT_NULL, NULL);
hunk ./lib/libalpm/alpm.c 190
- for(i = handle->dbs_sync; i && !found; i = i->next) {
+ for(i = handle->dbs_sync; i; i = i->next) {
hunk ./lib/libalpm/alpm.c 193
- found = 1;
+ _alpm_log(PM_LOG_DEBUG, _("attempt to re-register the '%s' databse, using existing\n"), sdb->treename);
+ return sdb;
hunk ./lib/libalpm/alpm.c 198
- if(found) {
- RET_ERR(PM_ERR_DB_NOT_NULL, NULL);
- }
-
+
hunk ./lib/libalpm/alpm.c 212
- return(NULL);
+ RET_ERR(PM_ERR_DB_CREATE, NULL);
hunk ./lib/libalpm/alpm.c 396
+ _alpm_log(PM_LOG_DEBUG, _("failed to sync db: %s [%d]\n"), alpm_strerror(ret), ret);
hunk ./lib/libalpm/alpm.c 508
-/** Searches a database
- * @param db pointer to the package database to search in
- * @return the list of packages on success, NULL on error
- */
-PMList *alpm_db_search(pmdb_t *db)
-{
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(handle->needles != NULL, return(NULL));
- ASSERT(handle->needles->data != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
-
- return(_alpm_db_search(db, handle->needles));
-}
hunk ./lib/libalpm/alpm.c 816
+
+/** Searches a database
+ * @param db pointer to the package database to search in
+ * @return the list of packages on success, NULL on error
+ */
+PMList *alpm_db_search(pmdb_t *db)
+{
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(handle->needles != NULL, return(NULL));
+ ASSERT(handle->needles->data != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+
+ return(_alpm_db_search(db, handle->needles));
+}
hunk ./lib/libalpm/alpm.c 941
- pmtrans_t *trans;
-
hunk ./lib/libalpm/alpm.c 945
- trans = handle->trans;
- ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
- ASSERT(trans->state == STATE_INITIALIZED, RET_ERR(PM_ERR_TRANS_NOT_INITIALIZED, -1));
+ ASSERT(handle->trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
+ ASSERT(handle->trans->state == STATE_INITIALIZED, RET_ERR(PM_ERR_TRANS_NOT_INITIALIZED, -1));
hunk ./lib/libalpm/alpm.c 958
- pmtrans_t *trans;
-
hunk ./lib/libalpm/alpm.c 961
- trans = handle->trans;
- ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
- ASSERT(trans->state == STATE_PREPARED, RET_ERR(PM_ERR_TRANS_NOT_PREPARED, -1));
+ ASSERT(handle->trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
+ ASSERT(handle->trans->state == STATE_PREPARED, RET_ERR(PM_ERR_TRANS_NOT_PREPARED, -1));
hunk ./lib/libalpm/alpm.c 1213
- * @param callback the callback should take two parameters:
- * the treename and the database pointer
+ * @param callback a function to be called upon new database creation
+ * @param this_section the config current section being parsed
hunk ./lib/libalpm/alpm.c 1217
-int alpm_parse_config(char *file, alpm_cb_db_register callback)
+int alpm_parse_config(char *file, alpm_cb_db_register callback, const char *this_section)
hunk ./lib/libalpm/alpm.c 1232
+ if(this_section != NULL && strlen(this_section) > 0) {
+ strncpy(section, this_section, min(255, strlen(this_section)));
+ db = alpm_db_register(section);
+ }
+
hunk ./lib/libalpm/alpm.c 1306
- alpm_parse_config(conf, callback);
+ alpm_parse_config(conf, callback, section);
hunk ./lib/libalpm/alpm.c 1435
- if(alpm_db_setserver(db, strdup(ptr)) == -1) {
+ if(alpm_db_setserver(db, strdup(ptr)) != 0) {
hunk ./lib/libalpm/alpm.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/alpm.h 206
-int alpm_parse_config(char *file, alpm_cb_db_register callback);
+int alpm_parse_config(char *file, alpm_cb_db_register callback, const char *this_section);
hunk ./lib/libalpm/alpm.h 468
- PM_ERR_TRANS_DOWNLOADING
+ PM_ERR_TRANS_DOWNLOADING,
+ /* Downloading */
+ PM_ERR_CONNECT_FAILED,
+ PM_ERR_FORK_FAILED
hunk ./lib/libalpm/backup.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/cache.c 4
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/cache.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/conflict.c 4
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/conflict.c 6
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/conflict.c 8
+ * Copyright (c) 2006 by Christian Hamar <krics at linuxforum.hu>
hunk ./lib/libalpm/conflict.c 252
- /* CHECK 2: check every target against the filesystem */
+ /* CHECK 2: check every target against the filesystem */
hunk ./lib/libalpm/conflict.h 4
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/db.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/db.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/deps.c 4
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/deps.c 6
- * Copyright (c) 2005, 2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/deps.h 4
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/deps.h 6
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/error.c 4
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/error.c 6
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/error.c 136
+ case PM_ERR_CONNECT_FAILED:
+ return _("connection to remote host failed");
+ case PM_ERR_FORK_FAILED:
+ return _("forking process failed");
hunk ./lib/libalpm/error.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/error.h 24
-#define RET_ERR(err, ret) do { pm_errno = (err); return(ret); } while(0)
+#define RET_ERR(err, ret) do { pm_errno = (err); \
+ _alpm_log(PM_LOG_ERROR, _("returning error %d: %s\n"), err, alpm_strerror(err)); \
+ return(ret); } while(0)
hunk ./lib/libalpm/group.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/group.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/handle.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/list.c 4
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/list.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/log.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/log.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/package.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/package.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/provide.c 3
- *
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ *
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/provide.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/remove.c 4
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/remove.c 6
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/remove.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
- * Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/server.c 168
+ _alpm_log(PM_LOG_DEBUG, _("server check, %d\n"),servers);
hunk ./lib/libalpm/server.c 170
+ _alpm_log(PM_LOG_DEBUG, _("server check, done? %d\n"),done);
hunk ./lib/libalpm/server.c 273
- return(1);
+ return(PM_ERR_CONNECT_FAILED);
hunk ./lib/libalpm/server.c 280
- return(1);
+ return(PM_ERR_FORK_FAILED);
hunk ./lib/libalpm/server.c 303
- strncpy(pm_dlfnm, fn, 24);
+ strncpy(pm_dlfnm, fn, 22);
hunk ./lib/libalpm/server.c 307
- if(pm_dlfnm && ptr && (ptr-fn) < 24) {
+ if(pm_dlfnm && ptr && (ptr-fn) < 22) {
hunk ./lib/libalpm/server.c 315
- for(j = strlen(pm_dlfnm); j < 24; j++) {
+ for(j = strlen(pm_dlfnm); j < 22; j++) {
hunk ./lib/libalpm/server.c 318
- pm_dlfnm[24] = '\0';
+ pm_dlfnm[22] = '\0';
hunk ./lib/libalpm/server.c 510
+ _alpm_log(PM_LOG_DEBUG, _("end _alpm_downloadfiles_forreal - return %d"),!done);
hunk ./lib/libalpm/sync.c 4
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/sync.c 6
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/sync.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/trans.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/trans.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/util.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/util.h 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./lib/libalpm/versioncmp.c 4
- * Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
+ * Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./scripts/makeworld 5
-# Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
-# Copyright (c) 2006 by Alex Smith <alex at alex-smith.me.uk>
-# Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos at frugalware.org>
+# Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./scripts/pacman-optimize 5
-# Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
-# Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
+# Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
hunk ./scripts/updatesync 5
-# Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
-# Copyright (c) 2005 by Judd Vinet <jvinet at zeroflux.org>
-# Copyright (c) 2005 by Christian Hamar <krics at linuxforum.hu>
-# Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos at frugalware.org>
+# Copyright (c) 2004 by Jason Chu <jason at archlinux.org>
+# Derived from gensync (c) 2002-2006 Judd Vinet <jvinet at zeroflux.org>
hunk ./src/pacman/download.c 43
-char sync_fnm[25];
+char sync_fnm[23];
hunk ./src/pacman/download.c 107
- printf(" %s [", sync_fnm);
- cur = (int)((maxcols-64)*pct/100);
- for(i = 0; i < maxcols-64; i++) {
+ if(rate > 1000) {
+ printf("%s %6dK %6.0fK/s %02d:%02d:%02d [", sync_fnm, ((xfered+offset) / 1024), rate, eta_h, eta_m, eta_s);
+ } else {
+ printf("%s %6dK %6.1fK/s %02d:%02d:%02d [", sync_fnm, ((xfered+offset) / 1024), rate, eta_h, eta_m, eta_s);
+ }
+ cur = (int)((maxcols-57)*pct/100);
+ for(i = 0; i < maxcols-57; i++) {
hunk ./src/pacman/download.c 141
- if(rate > 1000) {
- printf("] %3d%% %6dK %6.0fK/s %02d:%02d:%02d\r", pct, ((xfered+offset) / 1024), rate, eta_h, eta_m, eta_s);
- } else {
- printf("] %3d%% %6dK %6.1fK/s %02d:%02d:%02d\r", pct, ((xfered+offset) / 1024), rate, eta_h, eta_m, eta_s);
- }
+ printf("] %3d%%\r", pct);
hunk ./src/pacman/download.h 24
-extern char sync_fnm[25];
+extern char sync_fnm[23];
hunk ./src/pacman/pacman.c 189
- "Please submit a full bug report, with the given package if appropriate.\n"
- "See <URL:http://wiki.frugalware.org/Bugs> for instructions.\n");
+ "Please submit a full bug report, with the given package if appropriate.\n");
hunk ./src/pacman/pacman.c 478
- (config->op_s_search || config->group || config->op_q_list ||
- config->op_q_info)) || (config->op == PM_OP_DEPTEST && !config->op_d_resolve)) {
- /* special case: PM_OP_SYNC can be used w/ config->op_s_search by any user */
+ (config->op_s_search || config->group || config->op_q_list || config->op_q_info))
+ || (config->op == PM_OP_DEPTEST && !config->op_d_resolve)
+ || (config->root != NULL)) {
+ /* special case: PM_OP_SYNC can be used w/ config->op_s_search by any user */
+ /* special case: ignore root user check if -r is specified, fall back on
+ * normal FS checking */
hunk ./src/pacman/pacman.c 513
- if(config->configfile == NULL) {
- config->configfile = strdup(PACCONF);
- }
- if(alpm_parse_config(config->configfile, cb_db_register) == -1) {
- ERR(NL, _("failed to parse config (%s)\n"), alpm_strerror(pm_errno));
- cleanup(1);
- }
-
- /* set library parameters */
+ /* Setup logging as soon as possible, to print out maximum debugging info */
hunk ./src/pacman/pacman.c 522
+
+ if(config->configfile == NULL) {
+ config->configfile = strdup(PACCONF);
+ }
+ if(alpm_parse_config(config->configfile, cb_db_register, "") != 0) {
+ ERR(NL, _("failed to parse config (%s)\n"), alpm_strerror(pm_errno));
+ cleanup(1);
+ }
+
+ /* set library parameters */
hunk ./src/pacman/sync.c 199
- printf("%s/%s/%s %s\n ", (char *)alpm_db_getinfo(sync->db, PM_DB_TREENAME),
- (char*)alpm_list_getdata(alpm_pkg_getinfo(pkg, PM_PKG_GROUPS)),
- (char *)alpm_pkg_getinfo(pkg, PM_PKG_NAME),
- (char *)alpm_pkg_getinfo(pkg, PM_PKG_VERSION));
+ char *group = (char *)alpm_list_getdata(alpm_pkg_getinfo(pkg,PM_PKG_GROUPS));
+ printf("%s/%s %s %s%s%s\n ",
+ (char *)alpm_db_getinfo(sync->db, PM_DB_TREENAME),
+ (char *)alpm_pkg_getinfo(pkg, PM_PKG_NAME),
+ (char *)alpm_pkg_getinfo(pkg, PM_PKG_VERSION),
+ (group ? "(" : ""), (group ? group : ""), (group ? ")" : ""));
hunk ./src/pacman/sync.c 227
-
+
hunk ./src/pacman/sync.c 249
- if(level > 1) {
+ if(grp && level > 1) {
hunk ./src/pacman/sync.c 618
- if(umb < 0.1) {
+ if(umb > 0 && umb < 0.1) {
hunk ./src/pacman/sync.c 625
- MSG(NL, _("\nTotal Uncompressed Package Size: %.1f MB\n"), umb);
+ if(umb > 0) {
+ MSG(NL, _("\nTotal Uncompressed Package Size: %.1f MB\n"), umb);
+ }
hunk ./src/pacman/trans.c 336
- case PM_TRANS_PROGRESS_ADD_START:
- case PM_TRANS_PROGRESS_UPGRADE_START:
- case PM_TRANS_PROGRESS_REMOVE_START:
- putchar('(');
- for(i=0;i<(int)log10(howmany)-(int)log10(remain);i++)
+ case PM_TRANS_PROGRESS_ADD_START:
+ case PM_TRANS_PROGRESS_UPGRADE_START:
+ case PM_TRANS_PROGRESS_REMOVE_START:
+ putchar('(');
+ for(i=0;i<(int)log10(howmany)-(int)log10(remain);i++)
+ putchar(' ');
+ printf("%d/%d) %s %s ", remain, howmany, ptr, pkgname);
+ if (strlen(pkgname)<maxpkglen)
+ for (i=maxpkglen-strlen(pkgname)-1; i>0; i--)
hunk ./src/pacman/trans.c 346
- printf("%d/%d) %s %s ", remain, howmany, ptr, pkgname);
- if (strlen(pkgname)<maxpkglen)
- for (i=maxpkglen-strlen(pkgname)-1; i>0; i--)
- putchar(' ');
hunk ./src/pacman/trans.c 348
- case PM_TRANS_PROGRESS_CONFLICTS_START:
- printf("%s (", ptr);
- for(i=0;i<(int)log10(howmany)-(int)log10(remain);i++)
- putchar(' ');
- printf("%d/%d) ", remain, howmany);
- for (i=maxpkglen; i>0; i--)
- putchar(' ');
+ case PM_TRANS_PROGRESS_CONFLICTS_START:
+ printf("%s (", ptr);
+ for(i=0;i<(int)log10(howmany)-(int)log10(remain);i++)
+ putchar(' ');
+ printf("%d/%d) ", remain, howmany);
+ for (i=maxpkglen; i>0; i--)
+ putchar(' ');
}
More information about the Frugalware-darcs
mailing list