summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/.gitignore2
-rw-r--r--lib/libalpm/Doxyfile148
-rw-r--r--lib/libalpm/Makefile.am28
-rw-r--r--lib/libalpm/add.c1255
-rw-r--r--lib/libalpm/add.h6
-rw-r--r--lib/libalpm/alpm.c1153
-rw-r--r--lib/libalpm/alpm.h220
-rw-r--r--lib/libalpm/alpm_list.c498
-rw-r--r--lib/libalpm/alpm_list.h58
-rw-r--r--lib/libalpm/backup.c18
-rw-r--r--lib/libalpm/backup.h8
-rw-r--r--lib/libalpm/be_files.c291
-rw-r--r--lib/libalpm/cache.c47
-rw-r--r--lib/libalpm/cache.h6
-rw-r--r--lib/libalpm/conflict.c408
-rw-r--r--lib/libalpm/conflict.h19
-rw-r--r--lib/libalpm/db.c594
-rw-r--r--lib/libalpm/db.h25
-rw-r--r--lib/libalpm/delta.c266
-rw-r--r--lib/libalpm/delta.h (renamed from lib/libalpm/versioncmp.h)38
-rw-r--r--lib/libalpm/deps.c858
-rw-r--r--lib/libalpm/deps.h29
-rw-r--r--lib/libalpm/error.c33
-rw-r--r--lib/libalpm/error.h8
-rw-r--r--lib/libalpm/group.c18
-rw-r--r--lib/libalpm/group.h11
-rw-r--r--lib/libalpm/handle.c483
-rw-r--r--lib/libalpm/handle.h75
-rw-r--r--lib/libalpm/log.c82
-rw-r--r--lib/libalpm/log.h12
-rw-r--r--lib/libalpm/md5.c566
-rw-r--r--lib/libalpm/md5.h104
-rw-r--r--lib/libalpm/md5driver.c80
-rw-r--r--lib/libalpm/package.c1299
-rw-r--r--lib/libalpm/package.h40
-rw-r--r--lib/libalpm/po/.gitignore2
-rw-r--r--lib/libalpm/po/POTFILES.in6
-rw-r--r--lib/libalpm/po/de.po1617
-rw-r--r--lib/libalpm/po/en_GB.po1586
-rw-r--r--lib/libalpm/po/es.po1633
-rw-r--r--lib/libalpm/po/fr.po1755
-rw-r--r--lib/libalpm/po/hu.po1606
-rw-r--r--lib/libalpm/po/it.po1616
-rw-r--r--lib/libalpm/po/libalpm.pot1331
-rw-r--r--lib/libalpm/po/pl_PL.po1621
-rw-r--r--lib/libalpm/po/pt_BR.po1492
-rw-r--r--lib/libalpm/po/ru_RU.po1552
-rw-r--r--lib/libalpm/provide.c58
-rw-r--r--lib/libalpm/provide.h32
-rw-r--r--lib/libalpm/remove.c211
-rw-r--r--lib/libalpm/remove.h6
-rw-r--r--lib/libalpm/server.c252
-rw-r--r--lib/libalpm/server.h18
-rw-r--r--lib/libalpm/sha1.c419
-rw-r--r--lib/libalpm/sha1.h72
-rw-r--r--lib/libalpm/sync.c1297
-rw-r--r--lib/libalpm/sync.h14
-rw-r--r--lib/libalpm/trans.c481
-rw-r--r--lib/libalpm/trans.h19
-rw-r--r--lib/libalpm/util.c670
-rw-r--r--lib/libalpm/util.h77
-rw-r--r--lib/libalpm/versioncmp.c295
62 files changed, 9933 insertions, 18591 deletions
diff --git a/lib/libalpm/.gitignore b/lib/libalpm/.gitignore
index 09980ae6..36d41441 100644
--- a/lib/libalpm/.gitignore
+++ b/lib/libalpm/.gitignore
@@ -1,6 +1,4 @@
.deps
.libs
-Makefile
-Makefile.in
*.lo
*.la
diff --git a/lib/libalpm/Doxyfile b/lib/libalpm/Doxyfile
deleted file mode 100644
index c0b98ad5..00000000
--- a/lib/libalpm/Doxyfile
+++ /dev/null
@@ -1,148 +0,0 @@
-# Doxyfile 1.4.5
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = libalpm
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY =
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = NO
-BUILTIN_STL_SUPPORT = NO
-DISTRIBUTE_GROUP_DOC = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT =
-FILE_PATTERNS = *.c
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS = *
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = YES
-MAN_OUTPUT = ../../doc
-MAN_EXTENSION = .3
-MAN_LINKS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
index 0381d9d8..6549066f 100644
--- a/lib/libalpm/Makefile.am
+++ b/lib/libalpm/Makefile.am
@@ -5,12 +5,16 @@ SUBDIRS = po
lib_LTLIBRARIES = libalpm.la
include_HEADERS = alpm_list.h alpm.h
-localedir = $(datadir)/locale
-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+DEFS = -DLOCALEDIR=\"@localedir@\" @DEFS@
-AM_CFLAGS = -fvisibility=hidden -pedantic -D_GNU_SOURCE
+AM_CFLAGS = -pedantic -D_GNU_SOURCE
-EXTRA_DIST = Doxyfile
+if ENABLE_VISIBILITY_CC
+AM_CFLAGS += -fvisibility=internal
+endif
+if ENABLE_GNU89_INLINE_CC
+AM_CFLAGS += -fgnu89-inline
+endif
libalpm_la_SOURCES = \
add.h add.c \
@@ -21,30 +25,20 @@ libalpm_la_SOURCES = \
cache.h cache.c \
conflict.h conflict.c \
db.h db.c \
+ delta.h delta.c \
deps.h deps.c \
error.h error.c \
group.h group.c \
handle.h handle.c \
log.h log.c \
md5.h md5.c \
- md5driver.c \
package.h package.c \
- provide.h provide.c \
remove.h remove.c \
server.h server.c \
- sha1.h sha1.c \
sync.h sync.c \
trans.h trans.c \
- util.h util.c \
- versioncmp.h versioncmp.c
+ util.h util.c
libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO)
-libalpm_la_LIBADD = -larchive -ldownload -lm
-
-if HAS_DOXYGEN
-all: doxygen.in
-doxygen.in:
- doxygen $(srcdir)/Doxyfile
-
-endif
+# vim:set ts=2 sw=2 noet:
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index afe7a45b..24f2b51f 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -1,12 +1,8 @@
/*
* add.c
- *
- * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
- * Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
- * Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
- * Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
+ * Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -19,26 +15,24 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
-#if defined(__APPLE__) || defined(__OpenBSD__)
-#include <sys/syslimits.h>
-#endif
-#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__)
-#include <sys/stat.h>
-#endif
-
#include "config.h"
#include <stdlib.h>
#include <errno.h>
#include <time.h>
-#include <fcntl.h>
#include <string.h>
#include <limits.h>
-#include <libintl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+/* libarchive */
+#include <archive.h>
+#include <archive_entry.h>
/* libalpm */
#include "add.h"
@@ -47,14 +41,10 @@
#include "util.h"
#include "error.h"
#include "cache.h"
-#include "versioncmp.h"
-#include "md5.h"
-#include "sha1.h"
#include "log.h"
#include "backup.h"
#include "package.h"
#include "db.h"
-#include "provide.h"
#include "conflict.h"
#include "deps.h"
#include "remove.h"
@@ -62,11 +52,9 @@
int _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
{
- pmpkg_t *info = NULL;
- pmpkg_t *dummy;
- char pkgname[PKG_NAME_LEN], pkgver[PKG_VERSION_LEN];
+ pmpkg_t *pkg = NULL;
+ const char *pkgname, *pkgver;
alpm_list_t *i;
- struct stat buf;
ALPM_LOG_FUNC;
@@ -74,26 +62,13 @@ int _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(name != NULL && strlen(name) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- _alpm_log(PM_LOG_DEBUG, _("loading target '%s'"), name);
-
- /* TODO FS#5120 we need a better way to check if a package is a valid package,
- * and read the metadata instead of relying on the filename for package name
- * and version */
- if(stat(name, &buf)) {
- pm_errno = PM_ERR_NOT_A_FILE;
- goto error;
- }
+ _alpm_log(PM_LOG_DEBUG, "loading target '%s'\n", name);
- if(_alpm_pkg_splitname(name, pkgname, pkgver, 1) == -1) {
- pm_errno = PM_ERR_PKG_INVALID_NAME;
- goto error;
- }
-
- /* no additional hyphens in version strings */
- if(strchr(pkgver, '-') != strrchr(pkgver, '-')) {
- pm_errno = PM_ERR_PKG_INVALID_NAME;
+ if(alpm_pkg_load(name, 1, &pkg) != 0) {
goto error;
}
+ pkgname = alpm_pkg_get_name(pkg);
+ pkgver = alpm_pkg_get_version(pkg);
if(trans->type != PM_TRANS_TYPE_UPGRADE) {
/* only install this package if it is not already installed */
@@ -101,63 +76,42 @@ int _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
pm_errno = PM_ERR_PKG_INSTALLED;
goto error;
}
- } else {
- if(trans->flags & PM_TRANS_FLAG_FRESHEN) {
- /* only upgrade/install this package if it is already installed and at a lesser version */
- dummy = _alpm_db_get_pkgfromcache(db, pkgname);
- if(dummy == NULL || _alpm_versioncmp(dummy->version, pkgver) >= 0) {
- pm_errno = PM_ERR_PKG_CANT_FRESH;
- goto error;
- }
- }
}
- /* check if an older version of said package is already in transaction packages.
- * if so, replace it in the list */
+ /* check if an older version of said package is already in transaction
+ * packages. if so, replace it in the list */
for(i = trans->packages; i; i = i->next) {
pmpkg_t *pkg = i->data;
if(strcmp(pkg->name, pkgname) == 0) {
if(_alpm_versioncmp(pkg->version, pkgver) < 0) {
pmpkg_t *newpkg;
- _alpm_log(PM_LOG_WARNING, _("replacing older version %s-%s by %s in target list"),
+ _alpm_log(PM_LOG_WARNING, _("replacing older version %s-%s by %s in target list\n"),
pkg->name, pkg->version, pkgver);
- if((newpkg = _alpm_pkg_load(name)) == NULL) {
+ if((newpkg = _alpm_pkg_load(name, 1)) == NULL) {
/* pm_errno is already set by pkg_load() */
goto error;
}
- FREEPKG(i->data);
+ _alpm_pkg_free(i->data);
i->data = newpkg;
} else {
- _alpm_log(PM_LOG_WARNING, _("newer version %s-%s is in the target list -- skipping"),
+ _alpm_log(PM_LOG_WARNING, _("newer version %s-%s is in the target list -- skipping\n"),
pkg->name, pkg->version);
}
return(0);
}
}
- _alpm_log(PM_LOG_DEBUG, _("reading '%s' metadata"), pkgname);
- info = _alpm_pkg_load(name);
- if(info == NULL) {
- /* pm_errno is already set by pkg_load() */
- goto error;
- }
- /* check to verify we're not getting fooled by a corrupted package */
- if(strcmp(pkgname, info->name) != 0 || strcmp(pkgver, info->version) != 0) {
- pm_errno = PM_ERR_PKG_INVALID;
- goto error;
- }
-
if(trans->flags & PM_TRANS_FLAG_ALLDEPS) {
- info->reason = PM_PKG_REASON_DEPEND;
+ pkg->reason = PM_PKG_REASON_DEPEND;
}
/* add the package to the transaction */
- trans->packages = alpm_list_add(trans->packages, info);
+ trans->packages = alpm_list_add(trans->packages, pkg);
return(0);
error:
- FREEPKG(info);
+ _alpm_pkg_free(pkg);
return(-1);
}
@@ -172,10 +126,7 @@ error:
int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
{
- alpm_list_t *lp = NULL, *i = NULL;
- alpm_list_t *rmlist = NULL;
- char rm_fname[PATH_MAX];
- pmpkg_t *info = NULL;
+ alpm_list_t *lp = NULL;
ALPM_LOG_FUNC;
@@ -188,8 +139,8 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
/* look for unsatisfied dependencies */
- _alpm_log(PM_LOG_DEBUG, _("looking for unsatisfied dependencies"));
- lp = _alpm_checkdeps(trans, db, trans->type, trans->packages);
+ _alpm_log(PM_LOG_DEBUG, "looking for unsatisfied dependencies\n");
+ lp = alpm_checkdeps(db, trans->type == PM_TRANS_TYPE_UPGRADE, NULL, trans->packages);
if(lp != NULL) {
if(data) {
*data = lp;
@@ -200,82 +151,46 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
}
/* no unsatisfied deps, so look for conflicts */
- _alpm_log(PM_LOG_DEBUG, _("looking for conflicts"));
- lp = _alpm_checkconflicts(db, trans->packages);
- for(i = lp; i; i = i->next) {
- pmdepmissing_t *miss = i->data;
+ _alpm_log(PM_LOG_DEBUG, "looking for conflicts\n");
+ alpm_list_t *inner = _alpm_innerconflicts(trans->packages);
+ alpm_list_t *outer = _alpm_outerconflicts(db, trans->packages);
+ lp = alpm_list_join(inner, outer);
+
+ /* TODO : factorize the conflict resolving code from sync.c to use it here (FS#3492) */
- _alpm_log(PM_LOG_ERROR, _("replacing packages with -A and -U is not supported yet"));
- _alpm_log(PM_LOG_ERROR, _("please remove '%s' first, using -Rd"), miss->depend.name);
- RET_ERR(PM_ERR_CONFLICTING_DEPS, -1);
-
- /* Attempt to resolve conflicts */
- /*
- int skip_this = 0;
- QUESTION(trans, PM_TRANS_CONV_CONFLICT_PKG, miss->target, miss->depend.name, NULL, &skip_this);
- if(skip_this) {
- pmdepmissing_t *pkg = NULL;
- lp = alpm_list_remove(lp, (void *)miss, deppkg_cmp, (void*)&pkg);
- */
- /* TODO: We remove the conflict from the list but never actually remove
- * the package. Need to do this to fix FS #3492. The sync code should
- * provide an example of how to do this, as it handles replaces and
- * removes. We run into problems because we do a file conflict check
- * below and it fails there. A force flag will skip that part, but
- * still not remove the original package designated here for removal.
- * Better yet, dump all this shitty duplicate code and somehow combine
- * it with the sync code. */
- /*
- FREE(pkg);
- if(lp == NULL) {
- break;
- }
- }
- */
- }
- /* Removal code should go here, as described above. Instead of simply
- * removing items, perhaps throw them in another list to be removed, then
- * proceed as sync.c would? I'm not sure because I'm not familiar enough
- * with the codebase. */
if(lp != NULL) {
if(data) {
*data = lp;
} else {
FREELIST(lp);
}
+ if(inner) {
+ _alpm_log(PM_LOG_ERROR, _("conflicting packages were found in the target list\n"));
+ _alpm_log(PM_LOG_ERROR, _("you cannot install two conflicting packages at the same time\n"));
+ }
+ if(outer) {
+ _alpm_log(PM_LOG_ERROR, _("replacing packages with -A and -U is not supported yet\n"));
+ _alpm_log(PM_LOG_ERROR, _("you can replace packages manually using -Rd and -U\n"));
+ }
RET_ERR(PM_ERR_CONFLICTING_DEPS, -1);
}
/* re-order w.r.t. dependencies */
- _alpm_log(PM_LOG_DEBUG, _("sorting by dependencies"));
+ _alpm_log(PM_LOG_DEBUG, "sorting by dependencies\n");
lp = _alpm_sortbydeps(trans->packages, PM_TRANS_TYPE_ADD);
/* free the old alltargs */
- FREELISTPTR(trans->packages);
+ alpm_list_free(trans->packages);
trans->packages = lp;
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
}
- /* Cleaning up
- */
- EVENT(trans, PM_TRANS_EVT_CLEANUP_START, NULL, NULL);
- _alpm_log(PM_LOG_DEBUG, _("cleaning up"));
- for (lp=trans->packages; lp!=NULL; lp=lp->next) {
- info=(pmpkg_t *)lp->data;
- for (rmlist = alpm_pkg_get_removes(info); rmlist; rmlist = rmlist->next) {
- snprintf(rm_fname, PATH_MAX, "%s%s", handle->root, (char *)rmlist->data);
- remove(rm_fname);
- }
- }
- EVENT(trans, PM_TRANS_EVT_CLEANUP_DONE, NULL, NULL);
-
- /* Check for file conflicts
- */
+ /* Check for file conflicts */
if(!(trans->flags & PM_TRANS_FLAG_FORCE)) {
EVENT(trans, PM_TRANS_EVT_FILECONFLICTS_START, NULL, NULL);
- _alpm_log(PM_LOG_DEBUG, _("looking for file conflicts"));
- lp = _alpm_db_find_conflicts(db, trans, handle->root);
+ _alpm_log(PM_LOG_DEBUG, "looking for file conflicts\n");
+ lp = _alpm_db_find_fileconflicts(db, trans, handle->root);
if(lp != NULL) {
if(data) {
*data = lp;
@@ -288,562 +203,662 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
EVENT(trans, PM_TRANS_EVT_FILECONFLICTS_DONE, NULL, NULL);
}
-#ifndef __sun__
- if(_alpm_check_freespace(trans, data) == -1) {
- /* pm_errno is set by check_freespace */
- return(-1);
- }
-#endif
-
return(0);
}
-int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
-{
- int i, ret = 0, errors = 0, pkg_count = 0;
- struct archive *archive;
- struct archive_entry *entry;
- char cwd[PATH_MAX] = "";
- alpm_list_t *targ, *lp;
-
- ALPM_LOG_FUNC;
-
- ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
- ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
+static int upgrade_remove(pmpkg_t *oldpkg, pmpkg_t *newpkg, pmtrans_t *trans, pmdb_t *db) {
+ /* this is kinda odd. If the old package exists, at this point we make a
+ * NEW transaction, unrelated to handle->trans, and instantiate a "remove"
+ * with the type PM_TRANS_TYPE_REMOVEUPGRADE. TODO: kill this weird
+ * behavior. */
+ pmtrans_t *tr = _alpm_trans_new();
+ _alpm_log(PM_LOG_DEBUG, "removing old package first (%s-%s)\n",
+ oldpkg->name, oldpkg->version);
+
+ if(!tr) {
+ RET_ERR(PM_ERR_TRANS_ABORT, -1);
+ }
- if(trans->packages == NULL) {
- return(0);
+ if(_alpm_trans_init(tr, PM_TRANS_TYPE_REMOVEUPGRADE, trans->flags,
+ NULL, NULL, NULL) == -1) {
+ _alpm_trans_free(tr);
+ tr = NULL;
+ RET_ERR(PM_ERR_TRANS_ABORT, -1);
}
- pkg_count = alpm_list_count(trans->targets);
-
- for(targ = trans->packages; targ; targ = targ->next) {
- char scriptlet[PATH_MAX+1];
- int targ_count = 0, is_upgrade = 0, use_md5 = 0;
- double percent = 0.0;
- pmpkg_t *newpkg = (pmpkg_t *)targ->data;
- pmpkg_t *oldpkg = NULL;
- errors = 0;
+ if(_alpm_remove_loadtarget(tr, db, newpkg->name) == -1) {
+ _alpm_trans_free(tr);
+ tr = NULL;
+ RET_ERR(PM_ERR_TRANS_ABORT, -1);
+ }
- if(handle->trans->state == STATE_INTERRUPTED) {
- break;
+ /* copy the remove skiplist over */
+ tr->skip_remove = alpm_list_strdup(trans->skip_remove);
+ const alpm_list_t *b;
+
+ /* Add files in the OLD and NEW backup array to the NoUpgrade array
+ * so this removal operation doesn't kill them */
+ alpm_list_t *old_noupgrade = alpm_list_strdup(handle->noupgrade);
+ /* old package backup list */
+ for(b = alpm_pkg_get_backup(oldpkg); b; b = b->next) {
+ const char *backup = b->data;
+ _alpm_log(PM_LOG_DEBUG, "adding %s to the NoUpgrade array temporarily\n",
+ backup);
+ handle->noupgrade = alpm_list_add(handle->noupgrade, strdup(backup));
+ }
+ /* new package backup list */
+ for(b = alpm_pkg_get_backup(newpkg); b; b = b->next) {
+ const char *backup = b->data;
+ /* make sure we don't add duplicate entries */
+ if(!alpm_list_find_ptr(handle->noupgrade, backup)) {
+ _alpm_log(PM_LOG_DEBUG, "adding %s to the NoUpgrade array temporarily\n",
+ backup);
+ handle->noupgrade = alpm_list_add(handle->noupgrade, strdup(backup));
}
+ }
- snprintf(scriptlet, PATH_MAX, "%s%s-%s/install", db->path,
- alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
+ int ret = _alpm_remove_commit(tr, db);
- /* check if we have a valid sha1sum, if not, use MD5 */
- if(strlen(newpkg->sha1sum) == 0) {
- use_md5 = 1;
- }
+ _alpm_trans_free(tr);
+ tr = NULL;
- /* see if this is an upgrade. if so, remove the old package first */
- pmpkg_t *local = _alpm_db_get_pkgfromcache(db, newpkg->name);
- if(local) {
- is_upgrade = 1;
-
- EVENT(trans, PM_TRANS_EVT_UPGRADE_START, newpkg, NULL);
- _alpm_log(PM_LOG_DEBUG, _("upgrading package %s-%s"), newpkg->name, newpkg->version);
-
- /* we'll need to save some record for backup checks later */
- oldpkg = _alpm_pkg_new(local->name, local->version);
- if(oldpkg) {
- oldpkg->backup = alpm_list_strdup(alpm_pkg_get_backup(local));
- oldpkg->provides = alpm_list_strdup(alpm_pkg_get_provides(local));
- strncpy(oldpkg->name, local->name, PKG_NAME_LEN);
- strncpy(oldpkg->version, local->version, PKG_VERSION_LEN);
- } else {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
+ /* restore our "NoUpgrade" list to previous state */
+ FREELIST(handle->noupgrade);
+ handle->noupgrade = old_noupgrade;
- /* copy over the install reason */
- newpkg->reason = alpm_pkg_get_reason(local);
+ if(ret == -1) {
+ RET_ERR(PM_ERR_TRANS_ABORT, -1);
+ }
- /* pre_upgrade scriptlet */
- if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
- _alpm_runscriptlet(handle->root, newpkg->data, "pre_upgrade", newpkg->version, oldpkg->version, trans);
- }
- } else {
- is_upgrade = 0;
-
- EVENT(trans, PM_TRANS_EVT_ADD_START, newpkg, NULL);
- _alpm_log(PM_LOG_DEBUG, _("adding package %s-%s"), newpkg->name, newpkg->version);
-
- /* pre_install scriptlet */
- if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
- _alpm_runscriptlet(handle->root, newpkg->data, "pre_install", newpkg->version, NULL, trans);
- }
- }
+ return(0);
+}
- if(oldpkg) {
- /* this is kinda odd. If the old package exists, at this point we make a
- * NEW transaction, unrelated to handle->trans, and instantiate a "remove"
- * with the type PM_TRANS_TYPE_UPGRADE. TODO: kill this weird behavior. */
- pmtrans_t *tr = _alpm_trans_new();
- _alpm_log(PM_LOG_DEBUG, _("removing old package first (%s-%s)"), oldpkg->name, oldpkg->version);
+static int extract_single_file(struct archive *archive,
+ struct archive_entry *entry, pmpkg_t *newpkg, pmpkg_t *oldpkg,
+ pmtrans_t *trans, pmdb_t *db)
+{
+ const char *entryname; /* the name of the file in the archive */
+ mode_t entrymode;
+ char filename[PATH_MAX]; /* the actual file we're extracting */
+ int needbackup = 0, notouch = 0;
+ char *hash_orig = NULL;
+ const int archive_flags = ARCHIVE_EXTRACT_OWNER |
+ ARCHIVE_EXTRACT_PERM |
+ ARCHIVE_EXTRACT_TIME;
+ int errors = 0;
+
+ entryname = archive_entry_pathname(entry);
+ entrymode = archive_entry_mode(entry);
+
+ memset(filename, 0, PATH_MAX); /* just to be sure */
+
+ if(strcmp(entryname, ".INSTALL") == 0) {
+ /* the install script goes inside the db */
+ snprintf(filename, PATH_MAX, "%s/%s-%s/install", db->path,
+ newpkg->name, newpkg->version);
+ archive_entry_set_mode(entry, 0644);
+ } else if(strcmp(entryname, ".CHANGELOG") == 0) {
+ /* the changelog goes inside the db */
+ snprintf(filename, PATH_MAX, "%s/%s-%s/changelog", db->path,
+ newpkg->name, newpkg->version);
+ archive_entry_set_mode(entry, 0644);
+ } else if(*entryname == '.') {
+ /* for now, ignore all files starting with '.' that haven't
+ * already been handled (for future possibilities) */
+ _alpm_log(PM_LOG_DEBUG, "skipping extraction of '%s'\n", entryname);
+ archive_read_data_skip(archive);
+ return(0);
+ } else {
+ /* build the new entryname relative to handle->root */
+ snprintf(filename, PATH_MAX, "%s%s", handle->root, entryname);
+ }
- if(!tr) {
- RET_ERR(PM_ERR_TRANS_ABORT, -1);
- }
+ /* if a file is in NoExtract then we never extract it */
+ if(alpm_list_find_str(handle->noextract, entryname)) {
+ _alpm_log(PM_LOG_DEBUG, "%s is in NoExtract, skipping extraction\n",
+ entryname);
+ alpm_logaction("note: %s is in NoExtract, skipping extraction\n",
+ entryname);
+ archive_read_data_skip(archive);
+ return(0);
+ }
- if(_alpm_trans_init(tr, PM_TRANS_TYPE_UPGRADE, trans->flags, NULL, NULL, NULL) == -1) {
- FREETRANS(tr);
- RET_ERR(PM_ERR_TRANS_ABORT, -1);
- }
+ /* if a file is in the add skiplist we never extract it */
+ if(alpm_list_find_str(trans->skip_add, filename)) {
+ _alpm_log(PM_LOG_DEBUG, "%s is in trans->skip_add, skipping extraction\n", entryname);
+ archive_read_data_skip(archive);
+ return(0);
+ }
- if(_alpm_remove_loadtarget(tr, db, newpkg->name) == -1) {
- FREETRANS(tr);
- RET_ERR(PM_ERR_TRANS_ABORT, -1);
+ /* Check for file existence. This is one of the more crucial parts
+ * to get 'right'. Here are the possibilities, with the filesystem
+ * on the left and the package on the top:
+ * (F=file, N=node, S=symlink, D=dir)
+ * | F/N | S | D
+ * non-existent | 1 | 2 | 3
+ * F/N | 4 | 5 | 6
+ * S | 7 | 8 | 9
+ * D | 10 | 11 | 12
+ *
+ * 1,2,3- extract, no magic necessary. lstat (_alpm_lstat) will fail here.
+ * 4,5,6,7,8- conflict checks should have caught this. either overwrite
+ * or backup the file.
+ * 9- follow the symlink, hopefully it is a directory, check it.
+ * 10- file replacing directory- don't allow it.
+ * 11- don't extract symlink- a dir exists here. we don't want links to
+ * links, etc.
+ * 12- skip extraction, dir already exists.
+ */
+ struct stat lsbuf;
+ if(_alpm_lstat(filename, &lsbuf) != 0) {
+ /* cases 1,2,3: couldn't stat an existing file, skip all backup checks */
+ } else {
+ /* do a stat as well, so we can see what symlinks point to */
+ struct stat sbuf;
+ stat(filename, &sbuf);
+
+ if(S_ISDIR(lsbuf.st_mode) && S_ISDIR(entrymode)) {
+ /* case 12: existing dir, ignore it */
+ if(lsbuf.st_mode != entrymode) {
+ /* if filesystem perms are different than pkg perms, warn user */
+ int mask = 07777;
+ _alpm_log(PM_LOG_WARNING, _("directory permissions differ on %s\n"
+ "filesystem: %o package: %o\n"), entryname, lsbuf.st_mode & mask,
+ entrymode & mask);
+ alpm_logaction("warning: directory permissions differ on %s\n"
+ "filesystem: %o package: %o\n", entryname, lsbuf.st_mode & mask,
+ entrymode & mask);
}
-
- /* copy the remove skiplist over */
- tr->skip_remove = alpm_list_strdup(trans->skip_remove);
- alpm_list_t *b;
-
- /* Add files in the NEW package's backup array to the noupgrade array
- * so this removal operation doesn't kill them */
- /* TODO if we add here, all backup=() entries for all targets, new and
- * old, we cover all bases, including backup=() locations changing hands.
- * But is this viable? */
- alpm_list_t *old_noupgrade = alpm_list_strdup(handle->noupgrade);
- for(b = alpm_pkg_get_backup(newpkg); b; b = b->next) {
- const char *backup = b->data;
- _alpm_log(PM_LOG_DEBUG, _("adding %s to the NoUpgrade array temporarily"), backup);
- handle->noupgrade = alpm_list_add(handle->noupgrade, strdup(backup));
+ _alpm_log(PM_LOG_DEBUG, "extract: skipping dir extraction of %s\n",
+ entryname);
+ archive_read_data_skip(archive);
+ return(0);
+ } else if(S_ISDIR(lsbuf.st_mode) && S_ISLNK(entrymode)) {
+ /* case 11: existing dir, symlink in package, ignore it */
+ _alpm_log(PM_LOG_DEBUG, "extract: skipping symlink extraction of %s\n",
+ entryname);
+ archive_read_data_skip(archive);
+ return(0);
+ } else if(S_ISLNK(lsbuf.st_mode) && S_ISDIR(entrymode)) {
+ /* case 9: existing symlink, dir in package */
+ if(S_ISDIR(sbuf.st_mode)) {
+ /* the symlink on FS is to a directory, so we'll use it */
+ _alpm_log(PM_LOG_DEBUG, "extract: skipping symlink overwrite of %s\n",
+ entryname);
+ archive_read_data_skip(archive);
+ return(0);
+ } else {
+ /* this is BAD. symlink was not to a directory */
+ _alpm_log(PM_LOG_ERROR, _("extract: symlink %s does not point to dir\n"),
+ entryname);
+ archive_read_data_skip(archive);
+ return(1);
}
+ } else if(S_ISDIR(lsbuf.st_mode) && S_ISREG(entrymode)) {
+ /* case 10: trying to overwrite dir tree with file, don't allow it */
+ _alpm_log(PM_LOG_ERROR, _("extract: not overwriting dir with file %s\n"),
+ entryname);
+ archive_read_data_skip(archive);
+ return(1);
+ } else if(S_ISREG(lsbuf.st_mode) && S_ISDIR(entrymode)) {
+ /* case 6: trying to overwrite file with dir */
+ _alpm_log(PM_LOG_DEBUG, "extract: overwriting file with dir %s\n",
+ entryname);
+ } else if(S_ISREG(entrymode)) {
+ /* case 4,7: */
+ /* if file is in NoUpgrade, don't touch it */
+ if(alpm_list_find_str(handle->noupgrade, entryname)) {
+ notouch = 1;
+ } else {
+ /* go to the backup array and see if our conflict is there */
+ /* check newpkg first, so that adding backup files is retroactive */
+ if(alpm_list_find_str(alpm_pkg_get_backup(newpkg), entryname) != NULL) {
+ needbackup = 1;
+ }
- int ret = _alpm_remove_commit(tr, db);
-
- FREETRANS(tr);
- /* restore our "NoUpgrade" list to previous state */
- alpm_list_free_inner(handle->noupgrade, free);
- alpm_list_free(handle->noupgrade);
- handle->noupgrade = old_noupgrade;
+ /* check oldpkg for a backup entry, store the hash if available */
+ if(oldpkg) {
+ hash_orig = _alpm_needbackup(entryname, alpm_pkg_get_backup(oldpkg));
+ if(hash_orig) {
+ needbackup = 1;
+ }
+ }
- if(ret == -1) {
- RET_ERR(PM_ERR_TRANS_ABORT, -1);
+ /* if we force hash_orig to be non-NULL retroactive backup works */
+ if(needbackup && !hash_orig) {
+ hash_orig = strdup("");
+ }
}
}
+ /* else if(S_ISLNK(entrymode)) */
+ /* case 5,8: don't need to do anything special */
+ }
- if(!(trans->flags & PM_TRANS_FLAG_DBONLY)) {
- _alpm_log(PM_LOG_DEBUG, _("extracting files"));
+ if(needbackup) {
+ char *tempfile = NULL;
+ char *hash_local = NULL, *hash_pkg = NULL;
+ int fd;
+
+ /* extract the package's version to a temporary file and checksum it */
+ tempfile = strdup("/tmp/alpm_XXXXXX");
+ fd = mkstemp(tempfile);
+
+ archive_entry_set_pathname(entry, tempfile);
+
+ int ret = archive_read_extract(archive, entry, archive_flags);
+ if(ret == ARCHIVE_WARN) {
+ /* operation succeeded but a non-critical error was encountered */
+ _alpm_log(PM_LOG_DEBUG, "warning extracting %s (%s)\n",
+ entryname, archive_error_string(archive));
+ } else if(ret != ARCHIVE_OK) {
+ _alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)\n"),
+ entryname, archive_error_string(archive));
+ alpm_logaction("error: could not extract %s (%s)\n",
+ entryname, archive_error_string(archive));
+ unlink(tempfile);
+ FREE(hash_orig);
+ close(fd);
+ return(1);
+ }
- if ((archive = archive_read_new()) == NULL) {
- RET_ERR(PM_ERR_LIBARCHIVE_ERROR, -1);
+ hash_local = alpm_get_md5sum(filename);
+ hash_pkg = alpm_get_md5sum(tempfile);
+
+ /* append the new md5 hash to it's respective entry
+ * in newpkg's backup (it will be the new orginal) */
+ alpm_list_t *backups;
+ for(backups = alpm_pkg_get_backup(newpkg); backups;
+ backups = alpm_list_next(backups)) {
+ char *oldbackup = alpm_list_getdata(backups);
+ if(!oldbackup || strcmp(oldbackup, entryname) != 0) {
+ continue;
+ }
+ char *backup = NULL;
+ /* length is tab char, null byte and MD5 (32 char) */
+ int backup_len = strlen(oldbackup) + 34;
+ backup = malloc(backup_len);
+ if(!backup) {
+ RET_ERR(PM_ERR_MEMORY, -1);
}
- archive_read_support_compression_all(archive);
- archive_read_support_format_all(archive);
+ sprintf(backup, "%s\t%s", oldbackup, hash_pkg);
+ backup[backup_len-1] = '\0';
+ FREE(oldbackup);
+ backups->data = backup;
+ }
- if(archive_read_open_file(archive, newpkg->data, ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
- RET_ERR(PM_ERR_PKG_OPEN, -1);
- }
+ _alpm_log(PM_LOG_DEBUG, "checking hashes for %s\n", entryname);
+ _alpm_log(PM_LOG_DEBUG, "current: %s\n", hash_local);
+ _alpm_log(PM_LOG_DEBUG, "new: %s\n", hash_pkg);
+ _alpm_log(PM_LOG_DEBUG, "original: %s\n", hash_orig);
+
+ if(!oldpkg) {
+ /* looks like we have a local file that has a different hash as the
+ * file in the package, move it to a .pacorig */
+ if(strcmp(hash_local, hash_pkg) != 0) {
+ char newpath[PATH_MAX];
+ snprintf(newpath, PATH_MAX, "%s.pacorig", filename);
- /* save the cwd so we can restore it later */
- if(getcwd(cwd, PATH_MAX) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not get current working directory"));
- cwd[0] = 0;
+ /* move the existing file to the "pacorig" */
+ if(rename(filename, newpath)) {
+ archive_entry_set_pathname(entry, filename);
+ _alpm_log(PM_LOG_ERROR, _("could not rename %s (%s)\n"), filename, strerror(errno));
+ alpm_logaction("error: could not rename %s (%s)\n", filename, strerror(errno));
+ errors++;
+ } else {
+ /* copy the tempfile we extracted to the real path */
+ if(_alpm_copyfile(tempfile, filename)) {
+ archive_entry_set_pathname(entry, filename);
+ _alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), filename, strerror(errno));
+ alpm_logaction("error: could not copy tempfile to %s (%s)\n", filename, strerror(errno));
+ errors++;
+ } else {
+ archive_entry_set_pathname(entry, filename);
+ _alpm_log(PM_LOG_WARNING, _("%s saved as %s\n"), filename, newpath);
+ alpm_logaction("warning: %s saved as %s\n", filename, newpath);
+ }
+ }
}
+ } else if(hash_orig) {
+ /* the fun part */
+
+ if(strcmp(hash_orig, hash_local) == 0) {
+ /* installed file has NOT been changed by user */
+ if(strcmp(hash_orig, hash_pkg) != 0) {
+ _alpm_log(PM_LOG_DEBUG, "action: installing new file: %s\n",
+ entryname);
- /* libarchive requires this for extracting hard links */
- chdir(handle->root);
-
- targ_count = alpm_list_count(targ);
- /* call PROGRESS once with 0 percent, as we sort-of skip that here */
- PROGRESS(trans, (is_upgrade ? PM_TRANS_PROGRESS_UPGRADE_START : PM_TRANS_PROGRESS_ADD_START),
- newpkg->name, 0, pkg_count, (pkg_count - targ_count +1));
-
- for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) {
- const char *entryname; /* the name of the file in the archive */
- char filename[PATH_MAX]; /* the actual file we're extracting */
- int needbackup = 0, notouch = 0;
- char *hash_orig = NULL;
- struct stat buf;
-
- entryname = archive_entry_pathname(entry);
-
- if(newpkg->size != 0) {
- /* Using compressed size for calculations here, as newpkg->isize is not
- * exact when it comes to comparing to the ACTUAL uncompressed size
- * (missing metadata sizes) */
- unsigned long pos = archive_position_compressed(archive);
- percent = (double)pos / (double)newpkg->size;
- _alpm_log(PM_LOG_DEBUG, "decompression progress: %f%% (%ld / %ld)", percent*100.0, pos, newpkg->size);
- if(percent >= 1.0) {
- percent = 1.0;
+ if(_alpm_copyfile(tempfile, filename)) {
+ _alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), filename, strerror(errno));
+ errors++;
}
+ archive_entry_set_pathname(entry, filename);
+ } else {
+ /* there's no sense in installing the same file twice, install
+ * ONLY is the original and package hashes differ */
+ _alpm_log(PM_LOG_DEBUG, "action: leaving existing file in place\n");
}
-
- PROGRESS(trans, (is_upgrade ? PM_TRANS_PROGRESS_UPGRADE_START : PM_TRANS_PROGRESS_ADD_START),
- newpkg->name, (int)(percent * 100), pkg_count, (pkg_count - targ_count +1));
-
- memset(filename, 0, PATH_MAX); /* just to be sure */
-
- if(strcmp(entryname, ".PKGINFO") == 0 || strcmp(entryname, ".FILELIST") == 0) {
- archive_read_data_skip(archive);
- continue;
- } else if(strcmp(entryname, ".INSTALL") == 0) {
- /* the install script goes inside the db */
- snprintf(filename, PATH_MAX, "%s/%s-%s/install", db->path,
- newpkg->name, newpkg->version);
- } else if(strcmp(entryname, ".CHANGELOG") == 0) {
- /* the changelog goes inside the db */
- snprintf(filename, PATH_MAX, "%s/%s-%s/changelog", db->path,
- newpkg->name, newpkg->version);
+ } else if(strcmp(hash_orig, hash_pkg) == 0) {
+ /* originally installed file and new file are the same - this
+ * implies the case above failed - i.e. the file was changed by a
+ * user */
+ _alpm_log(PM_LOG_DEBUG, "action: leaving existing file in place\n");
+ } else if(strcmp(hash_local, hash_pkg) == 0) {
+ /* this would be magical. The above two cases failed, but the
+ * user changes just so happened to make the new file exactly the
+ * same as the one in the package... skip it */
+ _alpm_log(PM_LOG_DEBUG, "action: leaving existing file in place\n");
+ } else {
+ char newpath[PATH_MAX];
+ _alpm_log(PM_LOG_DEBUG, "action: keeping current file and installing new one with .pacnew ending\n");
+ snprintf(newpath, PATH_MAX, "%s.pacnew", filename);
+ if(_alpm_copyfile(tempfile, newpath)) {
+ _alpm_log(PM_LOG_ERROR, _("could not install %s as %s: %s\n"), filename, newpath, strerror(errno));
+ alpm_logaction("error: could not install %s as %s: %s\n", filename, newpath, strerror(errno));
} else {
- /* build the new entryname relative to handle->root */
- snprintf(filename, PATH_MAX, "%s%s", handle->root, entryname);
+ _alpm_log(PM_LOG_WARNING, _("%s installed as %s\n"), filename, newpath);
+ alpm_logaction("warning: %s installed as %s\n", filename, newpath);
}
+ }
+ }
- /* if a file is in NoExtract then we never extract it */
- if(alpm_list_find_str(handle->noextract, entryname)) {
- _alpm_log(PM_LOG_DEBUG, _("%s is in NoExtract, skipping extraction"), entryname);
- alpm_logaction(_("%s is in NoExtract, skipping extraction"), entryname);
- archive_read_data_skip(archive);
- continue;
- }
+ FREE(hash_local);
+ FREE(hash_pkg);
+ FREE(hash_orig);
+ unlink(tempfile);
+ FREE(tempfile);
+ close(fd);
+ } else {
+ /* we didn't need a backup */
+ if(notouch) {
+ /* change the path to a .pacnew extension */
+ _alpm_log(PM_LOG_DEBUG, "%s is in NoUpgrade -- skipping\n", filename);
+ _alpm_log(PM_LOG_WARNING, _("extracting %s as %s.pacnew\n"), filename, filename);
+ alpm_logaction("warning: extracting %s as %s.pacnew\n", filename, filename);
+ strncat(filename, ".pacnew", PATH_MAX - strlen(filename));
+ } else {
+ _alpm_log(PM_LOG_DEBUG, "extracting %s\n", filename);
+ }
- /* if a file is in the add skiplist we never extract it */
- if(alpm_list_find_str(trans->skip_add, filename)) {
- _alpm_log(PM_LOG_DEBUG, _("%s is in trans->skip_add, skipping extraction"), entryname);
- archive_read_data_skip(archive);
- continue;
- }
+ if(trans->flags & PM_TRANS_FLAG_FORCE) {
+ /* if FORCE was used, unlink() each file (whether it's there
+ * or not) before extracting. This prevents the old "Text file busy"
+ * error that crops up if forcing a glibc or pacman upgrade. */
+ unlink(filename);
+ }
- /* check is file already exists */
- if(stat(filename, &buf) == 0 && !S_ISDIR(buf.st_mode)) {
- /* it does, is it a backup=() file?
- * always check the newpkg first, so when we do add a backup=() file,
- * we don't have to wait a full upgrade cycle */
- needbackup = alpm_list_find_str(alpm_pkg_get_backup(newpkg), entryname);
-
- if(is_upgrade) {
- hash_orig = _alpm_needbackup(entryname, alpm_pkg_get_backup(oldpkg));
- if(hash_orig) {
- needbackup = 1;
- }
- }
+ archive_entry_set_pathname(entry, filename);
+
+ int ret = archive_read_extract(archive, entry, archive_flags);
+ if(ret == ARCHIVE_WARN) {
+ /* operation succeeded but a non-critical error was encountered */
+ _alpm_log(PM_LOG_DEBUG, "warning extracting %s (%s)\n",
+ entryname, archive_error_string(archive));
+ } else if(ret != ARCHIVE_OK) {
+ _alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)\n"),
+ entryname, archive_error_string(archive));
+ alpm_logaction("error: could not extract %s (%s)\n",
+ entryname, archive_error_string(archive));
+ return(1);
+ }
- /* this is kind of gross. if we force hash_orig to be non-NULL we can
- * catch the pro-active backup=() case (when the backup entry is in
- * the new package, and not the old */
- if(needbackup && !hash_orig) {
- hash_orig = strdup("");
- }
-
- /* NoUpgrade skips all this backup stuff, because it's just never
- * touched */
- if(alpm_list_find_str(handle->noupgrade, entryname)) {
- notouch = 1;
- needbackup = 0;
- }
- }
+ /* calculate an hash if this is in newpkg's backup */
+ alpm_list_t *b;
+ for(b = alpm_pkg_get_backup(newpkg); b; b = b->next) {
+ char *backup = NULL, *hash = NULL;
+ char *oldbackup = alpm_list_getdata(b);
+ /* length is tab char, null byte and MD5 (32 char) */
+ int backup_len = strlen(oldbackup) + 34;
- if(needbackup) {
- char *tempfile = NULL;
- char *hash_local = NULL, *hash_pkg = NULL;
- int fd;
+ if(!oldbackup || strcmp(oldbackup, entryname) != 0) {
+ continue;
+ }
+ _alpm_log(PM_LOG_DEBUG, "appending backup entry for %s\n", filename);
- /* extract the package's version to a temporary file and md5 it */
- tempfile = strdup("/tmp/alpm_XXXXXX");
- fd = mkstemp(tempfile);
-
- archive_entry_set_pathname(entry, tempfile);
+ hash = alpm_get_md5sum(filename);
+ backup = malloc(backup_len);
+ if(!backup) {
+ RET_ERR(PM_ERR_MEMORY, -1);
+ }
- if(archive_read_extract(archive, entry, ARCHIVE_EXTRACT_FLAGS) != ARCHIVE_OK) {
- _alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"), entryname, strerror(errno));
- alpm_logaction(_("could not extract %s (%s)"), entryname, strerror(errno));
- errors++;
- unlink(tempfile);
- FREE(hash_orig);
- close(fd);
- continue;
- }
+ sprintf(backup, "%s\t%s", oldbackup, hash);
+ backup[backup_len-1] = '\0';
+ FREE(hash);
+ FREE(oldbackup);
+ b->data = backup;
+ }
+ }
+ return(errors);
+}
- if(use_md5) {
- hash_local = _alpm_MDFile(filename);
- hash_pkg = _alpm_MDFile(tempfile);
- } else {
- hash_local = _alpm_SHAFile(filename);
- hash_pkg = _alpm_SHAFile(tempfile);
- }
+static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
+ pmtrans_t *trans, pmdb_t *db)
+{
+ int i, ret = 0, errors = 0;
+ struct archive *archive;
+ struct archive_entry *entry;
+ char cwd[PATH_MAX] = "";
+ char scriptlet[PATH_MAX+1];
+ int is_upgrade = 0;
+ double percent = 0.0;
+ pmpkg_t *oldpkg = NULL;
+
+ snprintf(scriptlet, PATH_MAX, "%s%s-%s/install", db->path,
+ alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
+
+ /* see if this is an upgrade. if so, remove the old package first */
+ pmpkg_t *local = _alpm_db_get_pkgfromcache(db, newpkg->name);
+ if(local) {
+ is_upgrade = 1;
+
+ EVENT(trans, PM_TRANS_EVT_UPGRADE_START, newpkg, NULL);
+ _alpm_log(PM_LOG_DEBUG, "upgrading package %s-%s\n",
+ newpkg->name, newpkg->version);
+
+ /* we'll need to save some record for backup checks later */
+ oldpkg = _alpm_pkg_dup(local);
+ /* copy over the install reason (unless alldeps is set) */
+ if(trans->flags & PM_TRANS_FLAG_ALLDEPS) {
+ newpkg->reason = PM_PKG_REASON_DEPEND;
+ } else {
+ newpkg->reason = alpm_pkg_get_reason(local);
+ }
- /* append the new md5 or sha1 hash to it's respective entry in newpkg's backup
- * (it will be the new orginal) */
- for(lp = alpm_pkg_get_backup(newpkg); lp; lp = lp->next) {
- if(!lp->data || strcmp(lp->data, entryname) != 0) {
- continue;
- }
- char *backup = NULL;
- int backup_len = strlen(lp->data) + 2; /* tab char and null byte */
-
- if(use_md5) {
- backup_len += 32; /* MD5s are 32 chars in length */
- } else {
- backup_len += 40; /* SHA1s are 40 chars in length */
- }
-
- backup = malloc(backup_len);
- if(!backup) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
-
- sprintf(backup, "%s\t%s", (char *)lp->data, hash_pkg);
- backup[backup_len-1] = '\0';
- FREE(lp->data);
- lp->data = backup;
- }
+ /* pre_upgrade scriptlet */
+ if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
+ _alpm_runscriptlet(handle->root, newpkg->origin_data.file,
+ "pre_upgrade", newpkg->version, oldpkg->version, trans);
+ }
+ } else {
+ is_upgrade = 0;
- if(use_md5) {
- _alpm_log(PM_LOG_DEBUG, _("checking md5 hashes for %s"), entryname);
- } else {
- _alpm_log(PM_LOG_DEBUG, _("checking sha1 hashes for %s"), entryname);
- }
- _alpm_log(PM_LOG_DEBUG, _("current: %s"), hash_local);
- _alpm_log(PM_LOG_DEBUG, _("new: %s"), hash_pkg);
- _alpm_log(PM_LOG_DEBUG, _("original: %s"), hash_orig);
-
- if(!is_upgrade) {
- /* looks like we have a local file that has a different hash as the
- * file in the package, move it to a .pacorig */
- if(strcmp(hash_local, hash_pkg) != 0) {
- char newpath[PATH_MAX];
- snprintf(newpath, PATH_MAX, "%s.pacorig", filename);
-
- /* move the existing file to the "pacorig" */
- if(rename(filename, newpath)) {
- archive_entry_set_pathname(entry, filename);
- _alpm_log(PM_LOG_ERROR, _("could not rename %s (%s)"), filename, strerror(errno));
- alpm_logaction(_("error: could not rename %s (%s)"), filename, strerror(errno));
- errors++;
- } else {
- /* copy the tempfile we extracted to the real path */
- if(_alpm_copyfile(tempfile, filename)) {
- archive_entry_set_pathname(entry, filename);
- _alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)"), filename, strerror(errno));
- alpm_logaction(_("error: could not copy tempfile to %s (%s)"), filename, strerror(errno));
- errors++;
- } else {
- archive_entry_set_pathname(entry, filename);
- _alpm_log(PM_LOG_WARNING, _("%s saved as %s"), filename, newpath);
- alpm_logaction(_("warning: %s saved as %s"), filename, newpath);
- }
- }
- }
- } else if(hash_orig) {
- /* the fun part */
-
- if(strcmp(hash_orig, hash_local) == 0) {
- /* installed file has NOT been changed by user */
- if(strcmp(hash_orig, hash_pkg) != 0) {
- _alpm_log(PM_LOG_DEBUG, _("action: installing new file: %s"), entryname);
-
- if(_alpm_copyfile(tempfile, filename)) {
- _alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)"), filename, strerror(errno));
- errors++;
- }
- archive_entry_set_pathname(entry, filename);
- } else {
- /* there's no sense in installing the same file twice, install
- * ONLY is the original and package hashes differ */
- _alpm_log(PM_LOG_DEBUG, _("action: leaving existing file in place"));
- }
- } else if(strcmp(hash_orig, hash_pkg) == 0) {
- /* originally installed file and new file are the same - this
- * implies the case above failed - i.e. the file was changed by a
- * user */
- _alpm_log(PM_LOG_DEBUG, _("action: leaving existing file in place"));
- } else if(strcmp(hash_local, hash_pkg) == 0) {
- /* this would be magical. The above two cases failed, but the
- * user changes just so happened to make the new file exactly the
- * same as the one in the package... skip it */
- _alpm_log(PM_LOG_DEBUG, _("action: leaving existing file in place"));
- } else {
- char newpath[PATH_MAX];
- _alpm_log(PM_LOG_DEBUG, _("action: keeping current file and installing new one with .pacnew ending"));
- snprintf(newpath, PATH_MAX, "%s.pacnew", filename);
- if(_alpm_copyfile(tempfile, newpath)) {
- _alpm_log(PM_LOG_ERROR, _("could not install %s as %s: %s"), filename, newpath, strerror(errno));
- alpm_logaction(_("error: could not install %s as %s: %s"), filename, newpath, strerror(errno));
- } else {
- _alpm_log(PM_LOG_WARNING, _("%s installed as %s"), filename, newpath);
- alpm_logaction(_("warning: %s installed as %s"), filename, newpath);
- }
- }
- }
+ EVENT(trans, PM_TRANS_EVT_ADD_START, newpkg, NULL);
+ _alpm_log(PM_LOG_DEBUG, "adding package %s-%s\n",
+ newpkg->name, newpkg->version);
- FREE(hash_local);
- FREE(hash_pkg);
- FREE(hash_orig);
- unlink(tempfile);
- FREE(tempfile);
- close(fd);
- } else { /* ! needbackup */
-
- if(notouch) {
- _alpm_log(PM_LOG_DEBUG, _("%s is in NoUpgrade -- skipping"), filename);
- _alpm_log(PM_LOG_WARNING, _("extracting %s as %s.pacnew"), filename, filename);
- alpm_logaction(_("warning: extracting %s as %s.pacnew"), filename, filename);
- strncat(filename, ".pacnew", PATH_MAX);
- } else {
- _alpm_log(PM_LOG_DEBUG, _("extracting %s"), filename);
- }
+ /* pre_install scriptlet */
+ if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
+ _alpm_runscriptlet(handle->root, newpkg->origin_data.file,
+ "pre_install", newpkg->version, NULL, trans);
+ }
+ }
- if(trans->flags & PM_TRANS_FLAG_FORCE) {
- /* if FORCE was used, then unlink() each file (whether it's there
- * or not) before extracting. this prevents the old "Text file busy"
- * error that crops up if one tries to --force a glibc or pacman
- * upgrade.
- */
- unlink(filename);
- }
+ if(oldpkg) {
+ /* set up fake remove transaction */
+ int ret = upgrade_remove(oldpkg, newpkg, trans, db);
+ if(ret != 0) {
+ return(ret);
+ }
+ }
- archive_entry_set_pathname(entry, filename);
+ if(!(trans->flags & PM_TRANS_FLAG_DBONLY)) {
+ _alpm_log(PM_LOG_DEBUG, "extracting files\n");
- int ret = archive_read_extract(archive, entry,
- ARCHIVE_EXTRACT_FLAGS | ARCHIVE_EXTRACT_NO_OVERWRITE);
- if(ret != ARCHIVE_OK && ret != ARCHIVE_WARN) {
- _alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"), filename, strerror(errno));
- alpm_logaction(_("error: could not extract %s (%s)"), filename, strerror(errno));
- errors++;
- }
+ if ((archive = archive_read_new()) == NULL) {
+ RET_ERR(PM_ERR_LIBARCHIVE_ERROR, -1);
+ }
- /* calculate an hash if this is in newpkg's backup */
- for(lp = alpm_pkg_get_backup(newpkg); lp; lp = lp->next) {
- char *backup = NULL, *hash = NULL;
- int backup_len = strlen(lp->data) + 2; /* tab char and null byte */
-
- if(!lp->data || strcmp(lp->data, entryname) != 0) {
- continue;
- }
- _alpm_log(PM_LOG_DEBUG, _("appending backup entry for %s"), filename);
-
- if(use_md5) {
- backup_len += 32; /* MD5s are 32 chars in length */
- hash = _alpm_MDFile(filename);
- } else {
- backup_len += 40; /* SHA1s are 40 chars in length */
- hash = _alpm_SHAFile(filename);
- }
-
- backup = malloc(backup_len);
- if(!backup) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
-
- sprintf(backup, "%s\t%s", (char *)lp->data, hash);
- backup[backup_len-1] = '\0';
- FREE(hash);
- FREE(lp->data);
- lp->data = backup;
- }
- }
- }
- archive_read_finish(archive);
+ archive_read_support_compression_all(archive);
+ archive_read_support_format_all(archive);
- /* restore the old cwd is we have it */
- if(strlen(cwd)) {
- chdir(cwd);
- }
+ if(archive_read_open_filename(archive, newpkg->origin_data.file,
+ ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
+ RET_ERR(PM_ERR_PKG_OPEN, -1);
+ }
- if(errors) {
- ret = 1;
- _alpm_log(PM_LOG_ERROR, _("errors occurred while %s %s"),
- (is_upgrade ? _("upgrading") : _("installing")), newpkg->name);
- alpm_logaction(_("errors occurred while %s %s"),
- (is_upgrade ? _("upgrading") : _("installing")), newpkg->name);
- }
+ /* save the cwd so we can restore it later */
+ if(getcwd(cwd, PATH_MAX) == NULL) {
+ _alpm_log(PM_LOG_ERROR, _("could not get current working directory\n"));
+ cwd[0] = 0;
}
- /* Update the requiredby field by scanning the whole database
- * looking for packages depending on the package to add */
- _alpm_pkg_update_requiredby(newpkg);
-
- /* special case: if our provides list has changed from oldpkg to newpkg AND
- * we get here, we need to make sure we find the actual provision that
- * still satisfies this case, and update its 'requiredby' field... ugh */
- alpm_list_t *provdiff, *prov;
- provdiff = alpm_list_diff(alpm_pkg_get_provides(oldpkg),
- alpm_pkg_get_provides(newpkg),
- _alpm_str_cmp);
- for(prov = provdiff; prov; prov = prov->next) {
- const char *provname = prov->data;
- _alpm_log(PM_LOG_DEBUG, _("provision '%s' has been removed from package %s (%s => %s)"),
- provname, alpm_pkg_get_name(oldpkg),
- alpm_pkg_get_version(oldpkg), alpm_pkg_get_version(newpkg));
-
- alpm_list_t *p = _alpm_db_whatprovides(handle->db_local, provname);
- if(p) {
- /* we now have all the provisions in the local DB for this virtual
- * package... seeing as we can't really determine which is the 'correct'
- * provision, we'll use the FIRST for now.
- * TODO figure out a way to find a "correct" provision */
- pmpkg_t *provpkg = p->data;
- const char *pkgname = alpm_pkg_get_name(provpkg);
- _alpm_log(PM_LOG_DEBUG, _("updating '%s' due to provision change (%s)"), pkgname, provname);
- _alpm_pkg_update_requiredby(provpkg);
-
- if(_alpm_db_write(db, provpkg, INFRQ_DEPENDS)) {
- _alpm_log(PM_LOG_ERROR, _("could not update provision '%s' from '%s'"), provname, pkgname);
- alpm_logaction(_("could not update provision '%s' from '%s'"), provname, pkgname);
- RET_ERR(PM_ERR_DB_WRITE, -1);
+ /* libarchive requires this for extracting hard links */
+ chdir(handle->root);
+
+ /* call PROGRESS once with 0 percent, as we sort-of skip that here */
+ if(is_upgrade) {
+ PROGRESS(trans, PM_TRANS_PROGRESS_UPGRADE_START,
+ alpm_pkg_get_name(newpkg), 0, pkg_count, pkg_current);
+ } else {
+ PROGRESS(trans, PM_TRANS_PROGRESS_ADD_START,
+ alpm_pkg_get_name(newpkg), 0, pkg_count, pkg_current);
+ }
+
+ for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) {
+ if(newpkg->size != 0) {
+ /* Using compressed size for calculations here, as newpkg->isize is not
+ * exact when it comes to comparing to the ACTUAL uncompressed size
+ * (missing metadata sizes) */
+ unsigned long pos = archive_position_compressed(archive);
+ percent = (double)pos / (double)newpkg->size;
+ _alpm_log(PM_LOG_DEBUG, "decompression progress: %f%% (%ld / %ld)\n",
+ percent*100.0, pos, newpkg->size);
+ if(percent >= 1.0) {
+ percent = 1.0;
}
}
- }
- alpm_list_free(provdiff);
-
- /* make an install date (in UTC) */
- time_t t = time(NULL);
- strncpy(newpkg->installdate, asctime(gmtime(&t)), PKG_DATE_LEN);
- /* remove the extra line feed appended by asctime() */
- newpkg->installdate[strlen(newpkg->installdate)-1] = 0;
-
- _alpm_log(PM_LOG_DEBUG, _("updating database"));
- _alpm_log(PM_LOG_DEBUG, _("adding database entry '%s'"), newpkg->name);
-
- if(_alpm_db_write(db, newpkg, INFRQ_ALL)) {
- _alpm_log(PM_LOG_ERROR, _("could not update database entry %s-%s"),
- alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
- alpm_logaction(_("could not update database entry %s-%s"),
- alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
- RET_ERR(PM_ERR_DB_WRITE, -1);
- }
-
- if(_alpm_db_add_pkgincache(db, newpkg) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not add entry '%s' in cache"),
- alpm_pkg_get_name(newpkg));
- }
- /* update dependency packages' REQUIREDBY fields */
- _alpm_trans_update_depends(trans, newpkg);
+ if(is_upgrade) {
+ PROGRESS(trans, PM_TRANS_PROGRESS_UPGRADE_START,
+ alpm_pkg_get_name(newpkg), (int)(percent * 100), pkg_count,
+ pkg_current);
+ } else {
+ PROGRESS(trans, PM_TRANS_PROGRESS_ADD_START,
+ alpm_pkg_get_name(newpkg), (int)(percent * 100), pkg_count,
+ pkg_current);
+ }
+
+ /* extract the next file from the archive */
+ errors += extract_single_file(archive, entry, newpkg, oldpkg,
+ trans, db);
+ }
+ archive_read_finish(archive);
- PROGRESS(trans, (is_upgrade ? PM_TRANS_PROGRESS_UPGRADE_START : PM_TRANS_PROGRESS_ADD_START),
- alpm_pkg_get_name(newpkg), 100, pkg_count, (pkg_count - targ_count +1));
- EVENT(trans, PM_TRANS_EVT_EXTRACT_DONE, NULL, NULL);
+ /* restore the old cwd is we have it */
+ if(strlen(cwd)) {
+ chdir(cwd);
+ }
- /* run the post-install script if it exists */
- if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
+ if(errors) {
+ ret = 1;
if(is_upgrade) {
- _alpm_runscriptlet(handle->root, scriptlet, "post_upgrade",
- alpm_pkg_get_version(newpkg), oldpkg ? alpm_pkg_get_version(oldpkg) : NULL,
- trans);
+ _alpm_log(PM_LOG_ERROR, _("problem occurred while upgrading %s\n"),
+ newpkg->name);
+ alpm_logaction("error: problem occurred while upgrading %s\n",
+ newpkg->name);
} else {
- _alpm_runscriptlet(handle->root, scriptlet, "post_install",
- alpm_pkg_get_version(newpkg), NULL, trans);
+ _alpm_log(PM_LOG_ERROR, _("problem occurred while installing %s\n"),
+ newpkg->name);
+ alpm_logaction("error: problem occurred while installing %s\n",
+ newpkg->name);
}
}
+ }
- EVENT(trans, (is_upgrade) ? PM_TRANS_EVT_UPGRADE_DONE : PM_TRANS_EVT_ADD_DONE, newpkg, oldpkg);
+ /* make an install date (in UTC) */
+ newpkg->installdate = time(NULL);
- FREEPKG(oldpkg);
+ _alpm_log(PM_LOG_DEBUG, "updating database\n");
+ _alpm_log(PM_LOG_DEBUG, "adding database entry '%s'\n", newpkg->name);
+
+ if(_alpm_db_write(db, newpkg, INFRQ_ALL)) {
+ _alpm_log(PM_LOG_ERROR, _("could not update database entry %s-%s\n"),
+ alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
+ alpm_logaction("error: could not update database entry %s-%s\n",
+ alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
+ RET_ERR(PM_ERR_DB_WRITE, -1);
}
- /* run ldconfig if it exists */
- if(handle->trans->state != STATE_INTERRUPTED) {
- _alpm_log(PM_LOG_DEBUG, _("running \"ldconfig -r %s\""), handle->root);
- _alpm_ldconfig(handle->root);
+ if(_alpm_db_add_pkgincache(db, newpkg) == -1) {
+ _alpm_log(PM_LOG_ERROR, _("could not add entry '%s' in cache\n"),
+ alpm_pkg_get_name(newpkg));
}
+ if(is_upgrade) {
+ PROGRESS(trans, PM_TRANS_PROGRESS_UPGRADE_START,
+ alpm_pkg_get_name(newpkg), 100, pkg_count, pkg_current);
+ } else {
+ PROGRESS(trans, PM_TRANS_PROGRESS_ADD_START,
+ alpm_pkg_get_name(newpkg), 100, pkg_count, pkg_current);
+ }
+ EVENT(trans, PM_TRANS_EVT_EXTRACT_DONE, NULL, NULL);
+
+ /* run the post-install script if it exists */
+ if(alpm_pkg_has_scriptlet(newpkg)
+ && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
+ if(is_upgrade) {
+ _alpm_runscriptlet(handle->root, scriptlet, "post_upgrade",
+ alpm_pkg_get_version(newpkg),
+ oldpkg ? alpm_pkg_get_version(oldpkg) : NULL, trans);
+ } else {
+ _alpm_runscriptlet(handle->root, scriptlet, "post_install",
+ alpm_pkg_get_version(newpkg), NULL, trans);
+ }
+ }
+
+ if(is_upgrade) {
+ EVENT(trans, PM_TRANS_EVT_UPGRADE_DONE, newpkg, oldpkg);
+ } else {
+ EVENT(trans, PM_TRANS_EVT_ADD_DONE, newpkg, oldpkg);
+ }
+
+ _alpm_pkg_free(oldpkg);
+
+ return(0);
+}
+
+int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
+{
+ int pkg_count, pkg_current;
+ alpm_list_t *targ;
+
+ ALPM_LOG_FUNC;
+
+ ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
+ ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
+
+ if(trans->packages == NULL) {
+ return(0);
+ }
+
+ pkg_count = alpm_list_count(trans->targets);
+ pkg_current = 1;
+
+ /* loop through our package list adding/upgrading one at a time */
+ for(targ = trans->packages; targ; targ = targ->next) {
+ if(handle->trans->state == STATE_INTERRUPTED) {
+ return(0);
+ }
+
+ pmpkg_t *newpkg = (pmpkg_t *)targ->data;
+ commit_single_pkg(newpkg, pkg_current, pkg_count, trans, db);
+ pkg_current++;
+ }
+
+ /* run ldconfig if it exists */
+ _alpm_log(PM_LOG_DEBUG, "running \"ldconfig -r %s\"\n", handle->root);
+ _alpm_ldconfig(handle->root);
+
return(0);
}
diff --git a/lib/libalpm/add.h b/lib/libalpm/add.h
index 4cd2e445..e576c075 100644
--- a/lib/libalpm/add.h
+++ b/lib/libalpm/add.h
@@ -1,8 +1,8 @@
/*
* add.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_ADD_H
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index afb6226b..62bb8316 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -1,11 +1,11 @@
/*
* alpm.c
- *
- * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
+ *
+ * Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,54 +18,20 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include "config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <time.h>
-#include <syslog.h>
-#include <limits.h> /* PATH_MAX */
-#include <stdarg.h>
-#include <libintl.h>
-
/* libalpm */
#include "alpm.h"
#include "alpm_list.h"
-#include "log.h"
#include "error.h"
-#include "versioncmp.h"
-#include "md5.h"
-#include "sha1.h"
-#include "package.h"
-#include "group.h"
-#include "util.h"
-#include "db.h"
-#include "cache.h"
-#include "deps.h"
-#include "conflict.h"
-#include "backup.h"
-#include "add.h"
-#include "remove.h"
-#include "sync.h"
#include "handle.h"
-#include "provide.h"
-#include "server.h"
-
-#define min(X, Y) ((X) < (Y) ? (X) : (Y))
+#include "util.h"
/* Globals */
-pmhandle_t *handle = NULL;
enum _pmerrno_t pm_errno SYMEXPORT;
/** \addtogroup alpm_interface Interface Functions
@@ -77,7 +43,7 @@ enum _pmerrno_t pm_errno SYMEXPORT;
* functions are called.
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int SYMEXPORT alpm_initialize()
+int SYMEXPORT alpm_initialize(void)
{
ASSERT(handle == NULL, RET_ERR(PM_ERR_HANDLE_NOT_NULL, -1));
@@ -86,1126 +52,35 @@ int SYMEXPORT alpm_initialize()
RET_ERR(PM_ERR_MEMORY, -1);
}
- return(0);
-}
-
-/** Release the library. This should be the last alpm call you make.
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_release()
-{
- int dbs_left = 0;
-
- ALPM_LOG_FUNC;
-
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
-
- /* free the transaction if there is any */
- if(handle->trans) {
- alpm_trans_release();
- }
-
- /* close local database */
- if(handle->db_local) {
- alpm_db_unregister(handle->db_local);
- handle->db_local = NULL;
- }
- /* and also sync ones */
- while((dbs_left = alpm_list_count(handle->dbs_sync)) > 0) {
- pmdb_t *db = (pmdb_t *)handle->dbs_sync->data;
- _alpm_log(PM_LOG_DEBUG, _("removing DB %s, %d remaining..."), db->treename, dbs_left);
- alpm_db_unregister(db);
- db = NULL;
- }
-
- FREEHANDLE(handle);
+#ifdef ENABLE_NLS
+ bindtextdomain("libalpm", LOCALEDIR);
+#endif
return(0);
}
-/** @} */
-
-/** \addtogroup alpm_databases Database Functions
- * @brief Functions to query and manipulate the database of libalpm
- * @{
- */
-
-/** Register a package database
- * @param treename the name of the repository
- * @return a pmdb_t* on success (the value), NULL on error
- */
-pmdb_t SYMEXPORT *alpm_db_register(char *treename)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, NULL));
- ASSERT(treename != NULL && strlen(treename) != 0, RET_ERR(PM_ERR_WRONG_ARGS, NULL));
- /* Do not register a database if a transaction is on-going */
- ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, NULL));
-
- return(_alpm_db_register(treename, NULL));
-}
-
-/** Unregister a package database
- * @param db pointer to the package database to unregister
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int alpm_db_unregister(pmdb_t *db)
-{
- int found = 0;
-
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
- ASSERT(db != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- /* Do not unregister a database if a transaction is on-going */
- ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
-
- if(db == handle->db_local) {
- handle->db_local = NULL;
- found = 1;
- } else {
- void *data;
- handle->dbs_sync = alpm_list_remove(handle->dbs_sync, db, _alpm_db_cmp, &data);
- if(data) {
- found = 1;
- }
- }
-
- if(!found) {
- RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
- }
-
- _alpm_log(PM_LOG_DEBUG, _("unregistering database '%s'"), db->treename);
-
- /* Cleanup */
- _alpm_db_free_pkgcache(db);
-
- _alpm_log(PM_LOG_DEBUG, _("closing database '%s'"), db->treename);
- _alpm_db_close(db);
-
- _alpm_db_free(db);
-
- return(0);
-}
-
-/** Set the serverlist of a database.
- * @param db database pointer
- * @param url url of the server
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int alpm_db_setserver(pmdb_t *db, const char *url)
-{
- int found = 0;
-
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
-
- if(strcmp(db->treename, "local") == 0) {
- if(handle->db_local != NULL) {
- found = 1;
- }
- } else {
- alpm_list_t *i;
- for(i = handle->dbs_sync; i && !found; i = i->next) {
- pmdb_t *sdb = i->data;
- if(strcmp(db->treename, sdb->treename) == 0) {
- found = 1;
- }
- }
- }
- if(!found) {
- RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
- }
-
- if(url && strlen(url)) {
- pmserver_t *server;
- if((server = _alpm_server_new(url)) == NULL) {
- /* pm_errno is set by _alpm_server_new */
- return(-1);
- }
- db->servers = alpm_list_add(db->servers, server);
- _alpm_log(PM_LOG_DEBUG, _("adding new server to database '%s': protocol '%s', server '%s', path '%s'"),
- db->treename, server->s_url->scheme, server->s_url->host, server->s_url->doc);
- } else {
- FREELIST(db->servers);
- _alpm_log(PM_LOG_DEBUG, _("serverlist flushed for '%s'"), db->treename);
- }
-
- return(0);
-}
-
-/** Update a package database
- * @param force if true, then forces the update, otherwise update only in case
- * the database isn't up to date
- * @param db pointer to the package database to update
- * @return 0 on success, > 0 on error (pm_errno is set accordingly), < 0 if up
- * to date
- */
-int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
-{
- alpm_list_t *lp;
- char path[PATH_MAX];
- alpm_list_t *files = NULL;
- char newmtime[16] = "";
- char lastupdate[16] = "";
- int ret;
-
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
- ASSERT(db != NULL && db != handle->db_local, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- /* Verify we are in a transaction. This is done _mainly_ because we need a DB
- * lock - if we update without a db lock, we may kludge some other pacman
- * process that _has_ a lock.
- */
- 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));
- ASSERT(handle->trans->type == PM_TRANS_TYPE_SYNC, RET_ERR(PM_ERR_TRANS_TYPE, -1));
-
- if(!alpm_list_find(handle->dbs_sync, db)) {
- RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
- }
-
- if(!force) {
- /* get the lastupdate time */
- _alpm_db_getlastupdate(db, lastupdate);
- if(strlen(lastupdate) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("failed to get lastupdate time for %s (no big deal)"), db->treename);
- }
- }
-
- /* build a one-element list */
- snprintf(path, PATH_MAX, "%s" PM_EXT_DB, db->treename);
- files = alpm_list_add(files, strdup(path));
-
- snprintf(path, PATH_MAX, "%s%s", handle->root, handle->dbpath);
-
- ret = _alpm_downloadfiles_forreal(db->servers, path, files, lastupdate, newmtime);
- FREELIST(files);
- if(ret == 1) {
- /* mtimes match, do nothing */
- pm_errno = 0;
- return(1);
- } else if(ret == -1) {
- /* we use downloadLastErrString and downloadLastErrCode here, error returns from
- * libdownload */
- _alpm_log(PM_LOG_DEBUG, _("failed to sync db: %s [%d]"), downloadLastErrString, downloadLastErrCode);
- RET_ERR(PM_ERR_DB_SYNC, -1);
- } else {
- if(strlen(newmtime)) {
- _alpm_log(PM_LOG_DEBUG, _("sync: new mtime for %s: %s"), db->treename, newmtime);
- _alpm_db_setlastupdate(db, newmtime);
- }
- snprintf(path, PATH_MAX, "%s%s%s" PM_EXT_DB, handle->root, handle->dbpath, db->treename);
-
- /* remove the old dir */
- _alpm_log(PM_LOG_DEBUG, _("flushing database %s%s"), db->path);
- for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
- pmpkg_t *pkg = lp->data;
- if(pkg && _alpm_db_remove(db, pkg) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not remove database entry %s%s"), db->treename,
- alpm_pkg_get_name(pkg));
- RET_ERR(PM_ERR_DB_REMOVE, -1);
- }
- }
-
- /* Cache needs to be rebuild */
- _alpm_db_free_pkgcache(db);
-
- /* uncompress the sync database */
- if(_alpm_db_install(db, path) == -1) {
- return -1;
- }
- }
-
- return(0);
-}
-
-/** Get a package entry from a package database
- * @param db pointer to the package database to get the package from
- * @param name of the package
- * @return the package entry on success, NULL on error
- */
-pmpkg_t SYMEXPORT *alpm_db_get_pkg(pmdb_t *db, const char *name)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
- ASSERT(name != NULL && strlen(name) != 0, return(NULL));
-
- return(_alpm_db_get_pkgfromcache(db, name));
-}
-
-/** Get the package cache of a package database
- * @param db pointer to the package database to get the package from
- * @return the list of packages on success, NULL on error
- */
-alpm_list_t SYMEXPORT *alpm_db_getpkgcache(pmdb_t *db)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
-
- return(_alpm_db_get_pkgcache(db));
-}
-
-/** Get the list of packages that a package provides
- * @param db pointer to the package database to get the package from
- * @param name name of the package
- * @return the list of packages on success, NULL on error
- */
-alpm_list_t SYMEXPORT *alpm_db_whatprovides(pmdb_t *db, const char *name)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
- ASSERT(name != NULL && strlen(name) != 0, return(NULL));
-
- return(_alpm_db_whatprovides(db, name));
-}
-
-/** Get a group entry from a package database
- * @param db pointer to the package database to get the group from
- * @param name of the group
- * @return the groups entry on success, NULL on error
- */
-pmgrp_t SYMEXPORT *alpm_db_readgrp(pmdb_t *db, const char *name)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
- ASSERT(name != NULL && strlen(name) != 0, return(NULL));
-
- return(_alpm_db_get_grpfromcache(db, name));
-}
-
-/** Get the group cache of a package database
- * @param db pointer to the package database to get the group from
- * @return the list of groups on success, NULL on error
- */
-alpm_list_t SYMEXPORT *alpm_db_getgrpcache(pmdb_t *db)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
-
- return(_alpm_db_get_grpcache(db));
-}
-
-/** @} */
-
-/** \addtogroup alpm_packages Package Functions
- * @brief Functions to manipulate libalpm packages
- * @{
- */
-
-/** Create a package from a file.
- * @param filename location of the package tarball
- * @param pkg address of the package pointer
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_pkg_load(char *filename, pmpkg_t **pkg)
-{
- _alpm_log(PM_LOG_FUNCTION, "enter alpm_pkg_load");
-
- /* Sanity checks */
- ASSERT(filename != NULL && strlen(filename) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
-
- *pkg = _alpm_pkg_load(filename);
- if(*pkg == NULL) {
- /* pm_errno is set by pkg_load */
- return(-1);
- }
-
- return(0);
-}
-
-/** Free a package.
- * @param pkg package pointer to free
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_pkg_free(pmpkg_t *pkg)
-{
- _alpm_log(PM_LOG_FUNCTION, "enter alpm_pkg_free");
-
- ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
-
- /* Only free packages loaded in user space */
- if(pkg->origin != PKG_FROM_CACHE) {
- _alpm_pkg_free(pkg);
- }
-
- return(0);
-}
-
-/** Check the integrity (with sha1) of a package from the sync cache.
- * @param pkg package pointer
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int alpm_pkg_checksha1sum(pmpkg_t *pkg)
-{
- char path[PATH_MAX];
- char *sha1sum = NULL;
- int retval = 0;
-
- ALPM_LOG_FUNC;
-
- ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- /* We only inspect packages from sync repositories */
- ASSERT(pkg->origin == PKG_FROM_CACHE, RET_ERR(PM_ERR_PKG_INVALID, -1));
- ASSERT(pkg->data != handle->db_local, RET_ERR(PM_ERR_PKG_INVALID, -1));
-
- snprintf(path, PATH_MAX, "%s%s/%s-%s" PM_EXT_PKG,
- handle->root, handle->cachedir,
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
-
- sha1sum = _alpm_SHAFile(path);
- if(sha1sum == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not get sha1sum for package %s-%s"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
- pm_errno = PM_ERR_NOT_A_FILE;
- retval = -1;
- } else {
- if(strcmp(sha1sum, alpm_pkg_get_sha1sum(pkg)) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("sha1sums for package %s-%s match"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
- } else {
- _alpm_log(PM_LOG_ERROR, _("sha1sums do not match for package %s-%s"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
- pm_errno = PM_ERR_PKG_INVALID;
- retval = -1;
- }
- }
-
- FREE(sha1sum);
-
- return(retval);
-}
-
-/** Check the integrity (with md5) of a package from the sync cache.
- * @param pkg package pointer
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int alpm_pkg_checkmd5sum(pmpkg_t *pkg)
-{
- char path[PATH_MAX];
- char *md5sum = NULL;
- int retval = 0;
-
- ALPM_LOG_FUNC;
-
- ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- /* We only inspect packages from sync repositories */
- ASSERT(pkg->origin == PKG_FROM_CACHE, RET_ERR(PM_ERR_PKG_INVALID, -1));
- ASSERT(pkg->data != handle->db_local, RET_ERR(PM_ERR_PKG_INVALID, -1));
-
- snprintf(path, PATH_MAX, "%s%s/%s-%s" PM_EXT_PKG,
- handle->root, handle->cachedir,
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
-
- md5sum = _alpm_MDFile(path);
- if(md5sum == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not get md5sum for package %s-%s"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
- pm_errno = PM_ERR_NOT_A_FILE;
- retval = -1;
- } else {
- if(strcmp(md5sum, alpm_pkg_get_md5sum(pkg)) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("md5sums for package %s-%s match"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
- } else {
- _alpm_log(PM_LOG_ERROR, _("md5sums do not match for package %s-%s"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
- pm_errno = PM_ERR_PKG_INVALID;
- retval = -1;
- }
- }
-
- FREE(md5sum);
-
- return(retval);
-}
-
-/** Compare versions.
- * @param ver1 first version
- * @param ver2 secont version
- * @return postive, 0 or negative if ver1 is less, equal or more
- * than ver2, respectively.
- */
-int SYMEXPORT alpm_pkg_vercmp(const char *ver1, const char *ver2)
-{
- ALPM_LOG_FUNC;
-
- return(_alpm_versioncmp(ver1, ver2));
-}
-
-/* internal */
-static char *_supported_archs[] = {
- "i586",
- "i686",
- "ppc",
- "x86_64",
-};
-
-char SYMEXPORT *alpm_pkg_name_hasarch(char *pkgname)
-{
- /* TODO remove this when we transfer everything over to -ARCH
- *
- * this parsing sucks... it's done to support
- * two package formats for the time being:
- * package-name-foo-1.0.0-1-i686
- * and
- * package-name-bar-1.2.3-1
- */
- size_t i = 0;
- char *arch, *cmp, *p;
-
- ALPM_LOG_FUNC;
-
- if((p = strrchr(pkgname, '-'))) {
- for(i=0; i < sizeof(_supported_archs)/sizeof(char*); ++i) {
- cmp = p+1;
- arch = _supported_archs[i];
-
- /* whee, case insensitive compare */
- while(*arch && *cmp && tolower(*arch++) == tolower(*cmp++)) ;
- if(*arch || *cmp) {
- continue;
- }
-
- return(p);
- }
- }
- return(NULL);
-}
-
-/** @} */
-
-/** \addtogroup alpm_sync Sync Functions
- * @brief Functions to get informations about libalpm syncs
- * @{
- */
-
-/** Searches a database
- * @param db pointer to the package database to search in
- * @param needles the list of strings to search for
- * @return the list of packages on success, NULL on error
- */
-alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db, alpm_list_t* needles)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
-
- return(_alpm_db_search(db, needles));
-}
-
-/** @} */
-
-/** \addtogroup alpm_trans Transaction Functions
- * @brief Functions to manipulate libalpm transactions
- * @{
- */
-
-/** Initialize the transaction.
- * @param type type of the transaction
- * @param flags flags of the transaction (like nodeps, etc)
- * @param event event callback function pointer
- * @param conv question callback function pointer
- * @param progress progress callback function pointer
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_trans_init(pmtranstype_t type, pmtransflag_t flags,
- alpm_trans_cb_event event, alpm_trans_cb_conv conv,
- alpm_trans_cb_progress progress)
-{
- char path[PATH_MAX];
-
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
-
- ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
-
- /* lock db */
- snprintf(path, PATH_MAX, "%s%s", handle->root, PM_LOCK);
- handle->lckfd = _alpm_lckmk(path);
- if(handle->lckfd == -1) {
- RET_ERR(PM_ERR_HANDLE_LOCK, -1);
- }
-
- handle->trans = _alpm_trans_new();
- if(handle->trans == NULL) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
-
- return(_alpm_trans_init(handle->trans, type, flags, event, conv, progress));
-}
-
-/** Search for packages to upgrade and add them to the transaction.
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_trans_sysupgrade()
-{
- pmtrans_t *trans;
-
- ALPM_LOG_FUNC;
-
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
-
- 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(trans->type == PM_TRANS_TYPE_SYNC, RET_ERR(PM_ERR_TRANS_TYPE, -1));
-
- return(_alpm_trans_sysupgrade(trans));
-}
-
-/** Add a target to the transaction.
- * @param target the name of the target to add
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_trans_addtarget(char *target)
-{
- pmtrans_t *trans;
-
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
- ASSERT(target != NULL && strlen(target) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
-
- 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));
-
- return(_alpm_trans_addtarget(trans, target));
-}
-
-/** Prepare a transaction.
- * @param data the address of a PM_LIST where detailed description
- * of an error can be dumped (ie. list of conflicting files)
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_trans_prepare(alpm_list_t **data)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
- ASSERT(data != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -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));
-
- return(_alpm_trans_prepare(handle->trans, data));
-}
-
-/** Commit a transaction.
- * @param data the address of a PM_LIST where detailed description
- * of an error can be dumped (ie. list of conflicting files)
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_trans_commit(alpm_list_t **data)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -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));
-
- /* Check for database R/W permission */
- if(!(handle->trans->flags & PM_TRANS_FLAG_PRINTURIS)) {
- /* The print-uris operation is a bit odd. So we explicitly check for it */
- ASSERT(handle->access == PM_ACCESS_RW, RET_ERR(PM_ERR_BADPERMS, -1));
- }
-
- return(_alpm_trans_commit(handle->trans, data));
-}
-
-/** Release a transaction.
+/** Release the library. This should be the last alpm call you make.
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int SYMEXPORT alpm_trans_release()
+int SYMEXPORT alpm_release(void)
{
- pmtrans_t *trans;
- char path[PATH_MAX];
-
ALPM_LOG_FUNC;
- /* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
- trans = handle->trans;
- ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
- ASSERT(trans->state != STATE_IDLE, RET_ERR(PM_ERR_TRANS_NULL, -1));
-
- /* during a commit do not interrupt inmediatelly, just after a target */
- if(trans->state == STATE_COMMITING || trans->state == STATE_INTERRUPTED) {
- if(trans->state == STATE_COMMITING) {
- trans->state = STATE_INTERRUPTED;
- }
- pm_errno = PM_ERR_TRANS_COMMITING;
+ if(alpm_db_unregister_all() == -1) {
return(-1);
}
- FREETRANS(handle->trans);
-
- /* unlock db */
- if(handle->lckfd != -1) {
- close(handle->lckfd);
- handle->lckfd = -1;
- }
- snprintf(path, PATH_MAX, "%s%s", handle->root, PM_LOCK);
- if(_alpm_lckrm(path)) {
- _alpm_log(PM_LOG_WARNING, _("could not remove lock file %s"), path);
- alpm_logaction(_("warning: could not remove lock file %s"), path);
- }
+ _alpm_handle_free(handle);
return(0);
}
/** @} */
-/** \addtogroup alpm_log Logging Functions
- * @brief Functions to log using libalpm
- * @{
- */
-
-/** A printf-like function for logging.
- * @param fmt output format
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
- */
-int SYMEXPORT alpm_logaction(char *fmt, ...)
-{
- char str[LOG_STR_LEN];
- va_list args;
-
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
-
- va_start(args, fmt);
- vsnprintf(str, LOG_STR_LEN, fmt, args);
- va_end(args);
-
- /* TODO We should add a prefix to log strings depending on who called us.
- * If logaction was called by the frontend:
- * USER: <the frontend log>
- * and if called internally:
- * ALPM: <the library log>
- * Moreover, the frontend should be able to choose its prefix
- * (USER by default?):
- * pacman: "PACMAN"
- * kpacman: "KPACMAN"
- * This would allow us to share the log file between several frontends
- * and know who does what */
- return(_alpm_logaction(handle->usesyslog, handle->logfd, str));
-}
-/** @} */
-
-/** \addtogroup alpm_misc Miscellaneous Functions
+/** @defgroup alpm_misc Miscellaneous Functions
* @brief Various libalpm functions
- * @{
- */
-
-/** Get the md5 sum of file.
- * @param name name of the file
- * @return the checksum on success, NULL on error
- */
-char SYMEXPORT *alpm_get_md5sum(char *name)
-{
- ALPM_LOG_FUNC;
-
- ASSERT(name != NULL, return(NULL));
-
- return(_alpm_MDFile(name));
-}
-
-/** Get the sha1 sum of file.
- * @param name name of the file
- * @return the checksum on success, NULL on error
- */
-char SYMEXPORT *alpm_get_sha1sum(char *name)
-{
- ALPM_LOG_FUNC;
-
- ASSERT(name != NULL, return(NULL));
-
- return(_alpm_SHAFile(name));
-}
-
-/** Fetch a remote pkg.
- * @param url
- * @return the downloaded filename on success, NULL on error
- */
-char SYMEXPORT *alpm_fetch_pkgurl(char *url)
-{
- ALPM_LOG_FUNC;
-
- ASSERT(strstr(url, "://"), return(NULL));
-
- return(_alpm_fetch_pkgurl(url));
-}
-
-/** Parses a configuration file.
- * @param file path to the config file.
- * @param callback a function to be called upon new database creation
- * @param this_section the config current section being parsed
- * @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const char *this_section)
-{
- FILE *fp = NULL;
- char line[PATH_MAX+1];
- char *ptr = NULL;
- char *key = NULL;
- int linenum = 0;
- char origkey[256];
- char section[256] = "";
- pmdb_t *db = NULL;
-
- ALPM_LOG_FUNC;
-
- fp = fopen(file, "r");
- if(fp == NULL) {
- return(0);
- }
-
- if(this_section != NULL && strlen(this_section) > 0) {
- strncpy(section, this_section, min(255, strlen(this_section)));
- if(!strcmp(section, "local")) {
- RET_ERR(PM_ERR_CONF_LOCAL, -1);
- }
- if(strcmp(section, "options")) {
- db = _alpm_db_register(section, callback);
- }
- }
-
- while(fgets(line, PATH_MAX, fp)) {
- linenum++;
- _alpm_strtrim(line);
- if(strlen(line) == 0 || line[0] == '#') {
- continue;
- }
- if(line[0] == '[' && line[strlen(line)-1] == ']') {
- /* new config section */
- ptr = line;
- ptr++;
- strncpy(section, ptr, min(255, strlen(ptr)-1));
- section[min(255, strlen(ptr)-1)] = '\0';
- _alpm_log(PM_LOG_DEBUG, _("config: new section '%s'"), section);
- if(!strlen(section)) {
- RET_ERR(PM_ERR_CONF_BAD_SECTION, -1);
- }
- if(!strcmp(section, "local")) {
- RET_ERR(PM_ERR_CONF_LOCAL, -1);
- }
- if(strcmp(section, "options")) {
- db = _alpm_db_register(section, callback);
- if(db == NULL) {
- /* pm_errno is set by alpm_db_register */
- return(-1);
- }
- }
- } else {
- /* directive */
- ptr = line;
- key = strsep(&ptr, "=");
- if(key == NULL) {
- RET_ERR(PM_ERR_CONF_BAD_SYNTAX, -1);
- }
- _alpm_strtrim(key);
- strncpy(origkey, key, min(255, strlen(key)));
- origkey[min(255, strlen(key))] = '\0';
- key = _alpm_strtoupper(key);
- if(!strlen(section) && strcmp(key, "INCLUDE")) {
- RET_ERR(PM_ERR_CONF_DIRECTIVE_OUTSIDE_SECTION, -1);
- }
- if(ptr == NULL) {
- if(strcmp(origkey, "NoPassiveFTP") == 0 || strcmp(key, "NOPASSIVEFTP") == 0) {
- alpm_option_set_nopassiveftp(1);
- _alpm_log(PM_LOG_DEBUG, _("config: nopassiveftp"));
- } else if(strcmp(origkey, "UseSyslog") == 0 || strcmp(key, "USESYSLOG") == 0) {
- alpm_option_set_usesyslog(1);
- _alpm_log(PM_LOG_DEBUG, _("config: usesyslog"));
- } else if(strcmp(origkey, "ILoveCandy") == 0 || strcmp(key, "ILOVECANDY") == 0) {
- alpm_option_set_chomp(1);
- _alpm_log(PM_LOG_DEBUG, _("config: chomp"));
- } else if(strcmp(origkey, "UseColor") == 0 || strcmp(key, "USECOLOR") == 0) {
- alpm_option_set_usecolor(1);
- _alpm_log(PM_LOG_DEBUG, _("config: usecolor"));
- } else {
- RET_ERR(PM_ERR_CONF_BAD_SYNTAX, -1);
- }
- } else {
- _alpm_strtrim(ptr);
- if(strcmp(origkey, "Include") == 0 || strcmp(key, "INCLUDE") == 0) {
- char conf[PATH_MAX];
- strncpy(conf, ptr, PATH_MAX);
- _alpm_log(PM_LOG_DEBUG, _("config: including %s"), conf);
- alpm_parse_config(conf, callback, section);
- } else if(strcmp(section, "options") == 0) {
- if(strcmp(origkey, "NoUpgrade") == 0 || strcmp(key, "NOUPGRADE") == 0) {
- char *p = ptr;
- char *q;
-
- while((q = strchr(p, ' '))) {
- *q = '\0';
- alpm_option_add_noupgrade(p);
- _alpm_log(PM_LOG_DEBUG, _("config: noupgrade: %s"), p);
- p = q;
- p++;
- }
- alpm_option_add_noupgrade(p);
- _alpm_log(PM_LOG_DEBUG, _("config: noupgrade: %s"), p);
- } else if(strcmp(origkey, "NoExtract") == 0 || strcmp(key, "NOEXTRACT") == 0) {
- char *p = ptr;
- char *q;
-
- while((q = strchr(p, ' '))) {
- *q = '\0';
- alpm_option_add_noextract(p);
- _alpm_log(PM_LOG_DEBUG, _("config: noextract: %s"), p);
- p = q;
- p++;
- }
- alpm_option_add_noextract(p);
- _alpm_log(PM_LOG_DEBUG, _("config: noextract: %s"), p);
- } else if(strcmp(origkey, "IgnorePkg") == 0 || strcmp(key, "IGNOREPKG") == 0) {
- char *p = ptr;
- char *q;
-
- while((q = strchr(p, ' '))) {
- *q = '\0';
- alpm_option_add_ignorepkg(p);
- _alpm_log(PM_LOG_DEBUG, _("config: ignorepkg: %s"), p);
- p = q;
- p++;
- }
- alpm_option_add_ignorepkg(p);
- _alpm_log(PM_LOG_DEBUG, _("config: ignorepkg: %s"), p);
- } else if(strcmp(origkey, "HoldPkg") == 0 || strcmp(key, "HOLDPKG") == 0) {
- char *p = ptr;
- char *q;
-
- while((q = strchr(p, ' '))) {
- *q = '\0';
- alpm_option_add_holdpkg(p);
- _alpm_log(PM_LOG_DEBUG, _("config: holdpkg: %s"), p);
- p = q;
- p++;
- }
- alpm_option_add_holdpkg(p);
- _alpm_log(PM_LOG_DEBUG, _("config: holdpkg: %s"), p);
- } else if(strcmp(origkey, "DBPath") == 0 || strcmp(key, "DBPATH") == 0) {
- /* shave off the leading slash, if there is one */
- if(*ptr == '/') {
- ptr++;
- }
- alpm_option_set_dbpath(ptr);
- _alpm_log(PM_LOG_DEBUG, _("config: dbpath: %s"), ptr);
- } else if(strcmp(origkey, "CacheDir") == 0 || strcmp(key, "CACHEDIR") == 0) {
- /* shave off the leading slash, if there is one */
- if(*ptr == '/') {
- ptr++;
- }
- alpm_option_set_cachedir(ptr);
- _alpm_log(PM_LOG_DEBUG, _("config: cachedir: %s"), ptr);
- } else if(strcmp(origkey, "RootDir") == 0 || strcmp(key, "ROOTDIR") == 0) {
- /* shave off the leading slash, if there is one */
- if(*ptr == '/') {
- ptr++;
- }
- alpm_option_set_root(ptr);
- _alpm_log(PM_LOG_DEBUG, _("config: rootdir: %s"), ptr);
- } else if (strcmp(origkey, "LogFile") == 0 || strcmp(key, "LOGFILE") == 0) {
- alpm_option_set_logfile(ptr);
- _alpm_log(PM_LOG_DEBUG, _("config: logfile: %s"), ptr);
- } else if (strcmp(origkey, "XferCommand") == 0 || strcmp(key, "XFERCOMMAND") == 0) {
- alpm_option_set_xfercommand(ptr);
- _alpm_log(PM_LOG_DEBUG, _("config: xfercommand: %s"), ptr);
- } else if (strcmp(origkey, "UpgradeDelay") == 0 || strcmp(key, "UPGRADEDELAY") == 0) {
- /* The config value is in days, we use seconds */
- time_t ud = atol(ptr) * 60 * 60 *24;
- alpm_option_set_upgradedelay(ud);
- _alpm_log(PM_LOG_DEBUG, _("config: upgradedelay: %d"), ud);
- } else {
- RET_ERR(PM_ERR_CONF_BAD_SYNTAX, -1);
- }
- } else {
- if(strcmp(origkey, "Server") == 0 || strcmp(key, "SERVER") == 0) {
- /* add to the list */
- if(alpm_db_setserver(db, ptr) != 0) {
- /* pm_errno is set by alpm_db_setserver */
- return(-1);
- }
- } else {
- RET_ERR(PM_ERR_CONF_BAD_SYNTAX, -1);
- }
- }
- line[0] = '\0';
- }
- }
- }
- fclose(fp);
-
- return(0);
-}
-
-/** @} */
-
-/* This function is mostly the same as sync.c find_replacements and sysupgrade
- * functions, and we should be able to combine them - this is an interim
- * solution made for -Qu operation */
-alpm_list_t SYMEXPORT *alpm_get_upgrades()
-{
- alpm_list_t *syncpkgs = NULL;
- alpm_list_t *i, *j, *k, *m;
-
- ALPM_LOG_FUNC;
-
- /* TODO holy nested loops, Batman! */
- /* check for "recommended" package replacements */
- _alpm_log(PM_LOG_DEBUG, _("checking for package replacements"));
- for(i = handle->dbs_sync; i; i = i->next) {
- for(j = _alpm_db_get_pkgcache(i->data); j; j = j->next) {
- pmpkg_t *spkg = j->data;
-
- for(k = alpm_pkg_get_replaces(spkg); k; k = k->next) {
-
- for(m = _alpm_db_get_pkgcache(handle->db_local); m; m = m->next) {
- pmpkg_t *lpkg = m->data;
-
- if(strcmp(k->data, alpm_pkg_get_name(lpkg)) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("checking replacement '%s' for package '%s'"), k->data,
- alpm_pkg_get_name(spkg));
- if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(lpkg))) {
- _alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (to be replaced by %s-%s)"),
- alpm_pkg_get_name(lpkg), alpm_pkg_get_version(lpkg),
- alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg));
- } else {
- /* assume all replaces=() packages are accepted */
- pmsyncpkg_t *sync = NULL;
- pmpkg_t *dummy = _alpm_pkg_new(alpm_pkg_get_name(lpkg), NULL);
- if(dummy == NULL) {
- pm_errno = PM_ERR_MEMORY;
- goto error;
- }
- dummy->requiredby = alpm_list_strdup(alpm_pkg_get_requiredby(lpkg));
-
- pmsyncpkg_t *syncpkg;
- syncpkg = _alpm_sync_find(syncpkgs, alpm_pkg_get_name(spkg));
-
- if(syncpkg) {
- /* found it -- just append to the replaces list */
- sync->data = alpm_list_add(sync->data, dummy);
- } else {
- /* none found -- enter pkg into the final sync list */
- sync = _alpm_sync_new(PM_SYNC_TYPE_REPLACE, spkg, NULL);
- if(sync == NULL) {
- FREEPKG(dummy);
- pm_errno = PM_ERR_MEMORY;
- goto error;
- }
- sync->data = alpm_list_add(NULL, dummy);
- syncpkgs = alpm_list_add(syncpkgs, sync);
- }
- _alpm_log(PM_LOG_DEBUG, _("%s-%s elected for upgrade (to be replaced by %s-%s)"),
- alpm_pkg_get_name(lpkg), alpm_pkg_get_version(lpkg),
- alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg));
- }
- break;
- }
- }
- }
- }
- }
-
- /* now do normal upgrades */
- for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = i->next) {
- int replace=0;
- pmpkg_t *local = i->data;
- pmpkg_t *spkg = NULL;
- pmsyncpkg_t *sync;
-
- for(j = handle->dbs_sync; !spkg && j; j = j->next) {
- spkg = _alpm_db_get_pkgfromcache(j->data, alpm_pkg_get_name(local));
- }
- if(spkg == NULL) {
- _alpm_log(PM_LOG_DEBUG, _("'%s' not found in sync db -- skipping"), alpm_pkg_get_name(local));
- continue;
- }
-
- /* we don't care about a to-be-replaced package's newer version */
- for(j = syncpkgs; j && !replace; j=j->next) {
- sync = j->data;
- if(sync->type == PM_SYNC_TYPE_REPLACE) {
- if(_alpm_pkg_find(alpm_pkg_get_name(spkg), sync->data)) {
- replace=1;
- }
- }
- }
- if(replace) {
- _alpm_log(PM_LOG_DEBUG, _("'%s' is already elected for removal -- skipping"),
- alpm_pkg_get_name(local));
- continue;
- }
-
- if(alpm_pkg_compare_versions(local, spkg)) {
- _alpm_log(PM_LOG_DEBUG, _("%s elected for upgrade (%s => %s)"),
- alpm_pkg_get_name(local), alpm_pkg_get_version(local),
- alpm_pkg_get_version(spkg));
-
- pmsyncpkg_t *syncpkg;
- syncpkg = _alpm_sync_find(syncpkgs, alpm_pkg_get_name(local));
-
- if(!syncpkg) {
- pmpkg_t *dummy = _alpm_pkg_new(alpm_pkg_get_name(local),
- alpm_pkg_get_version(local));
- if(dummy == NULL) {
- goto error;
- }
- sync = _alpm_sync_new(PM_SYNC_TYPE_UPGRADE, spkg, dummy);
- if(sync == NULL) {
- FREEPKG(dummy);
- goto error;
- }
- syncpkgs = alpm_list_add(syncpkgs, sync);
- }
- }
- }
-
- return(syncpkgs);
-error:
- if(syncpkgs) {
- alpm_list_free_inner(syncpkgs, _alpm_sync_free);
- alpm_list_free(syncpkgs);
- }
- return(NULL);
-}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index fc4aed59..1e18ad95 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -1,11 +1,11 @@
/*
* alpm.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_H
@@ -29,28 +29,23 @@ extern "C" {
#endif
#include <time.h> /* for time_t */
+#include <stdarg.h> /* for va_list */
+
+#include <alpm_list.h>
+
+#define DEPRECATED __attribute__((deprecated))
/*
* Arch Linux Package Management library
*/
-#define PM_ROOT "/"
-#define PM_DBPATH "var/lib/pacman/"
-#define PM_CACHEDIR "var/cache/pacman/pkg/"
-#define PM_LOCK "tmp/pacman.lck"
-
-
-#define PM_EXT_PKG ".pkg.tar.gz"
-#define PM_EXT_DB ".db.tar.gz"
-
-/*
+/*
* Structures
*/
-typedef struct __alpm_list_t alpm_list_t;
-
typedef struct __pmdb_t pmdb_t;
typedef struct __pmpkg_t pmpkg_t;
+typedef struct __pmdelta_t pmdelta_t;
typedef struct __pmgrp_t pmgrp_t;
typedef struct __pmserver_t pmserver_t;
typedef struct __pmtrans_t pmtrans_t;
@@ -58,12 +53,14 @@ typedef struct __pmsyncpkg_t pmsyncpkg_t;
typedef struct __pmdepend_t pmdepend_t;
typedef struct __pmdepmissing_t pmdepmissing_t;
typedef struct __pmconflict_t pmconflict_t;
+typedef struct __pmfileconflict_t pmfileconflict_t;
+typedef struct __pmgraph_t pmgraph_t;
/*
* Library
*/
-int alpm_initialize();
+int alpm_initialize(void);
int alpm_release(void);
/*
@@ -75,18 +72,18 @@ typedef enum _pmloglevel_t {
PM_LOG_ERROR = 0x01,
PM_LOG_WARNING = 0x02,
PM_LOG_DEBUG = 0x04,
- PM_LOG_DOWNLOAD = 0x08,
- PM_LOG_FUNCTION = 0x10
+ PM_LOG_FUNCTION = 0x08
} pmloglevel_t;
-typedef void (*alpm_cb_log)(unsigned short, char *);
+typedef void (*alpm_cb_log)(pmloglevel_t, char *, va_list);
int alpm_logaction(char *fmt, ...);
/*
* Downloading
*/
-typedef void (*alpm_cb_download)(const char *filename, int xfered, int total);
+typedef void (*alpm_cb_download)(const char *filename, int file_xfered,
+ int file_total, int list_xfered, int list_total);
/*
* Options
@@ -100,40 +97,45 @@ void alpm_option_set_logcb(alpm_cb_log cb);
alpm_cb_download alpm_option_get_dlcb();
void alpm_option_set_dlcb(alpm_cb_download cb);
-unsigned short alpm_option_get_logmask();
-void alpm_option_set_logmask(unsigned short mask);
-
const char *alpm_option_get_root();
-void alpm_option_set_root(const char *root);
+int alpm_option_set_root(const char *root);
const char *alpm_option_get_dbpath();
-void alpm_option_set_dbpath(const char *dbpath);
+int alpm_option_set_dbpath(const char *dbpath);
-const char *alpm_option_get_cachedir();
-void alpm_option_set_cachedir(const char *cachedir);
+alpm_list_t *alpm_option_get_cachedirs();
+int alpm_option_add_cachedir(const char *cachedir);
+void alpm_option_set_cachedirs(alpm_list_t *cachedirs);
const char *alpm_option_get_logfile();
-void alpm_option_set_logfile(const char *logfile);
+int alpm_option_set_logfile(const char *logfile);
+
+const char *alpm_option_get_lockfile();
+/* no set_lockfile, path is determined from dbpath */
unsigned short alpm_option_get_usesyslog();
void alpm_option_set_usesyslog(unsigned short usesyslog);
alpm_list_t *alpm_option_get_noupgrades();
-void alpm_option_add_noupgrade(char *pkg);
+void alpm_option_add_noupgrade(const char *pkg);
void alpm_option_set_noupgrades(alpm_list_t *noupgrade);
alpm_list_t *alpm_option_get_noextracts();
-void alpm_option_add_noextract(char *pkg);
+void alpm_option_add_noextract(const char *pkg);
void alpm_option_set_noextracts(alpm_list_t *noextract);
alpm_list_t *alpm_option_get_ignorepkgs();
-void alpm_option_add_ignorepkg(char *pkg);
+void alpm_option_add_ignorepkg(const char *pkg);
void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs);
alpm_list_t *alpm_option_get_holdpkgs();
-void alpm_option_add_holdpkg(char *pkg);
+void alpm_option_add_holdpkg(const char *pkg);
void alpm_option_set_holdpkgs(alpm_list_t *holdpkgs);
+alpm_list_t *alpm_option_get_ignoregrps();
+void alpm_option_add_ignoregrp(const char *grp);
+void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps);
+
time_t alpm_option_get_upgradedelay();
void alpm_option_set_upgradedelay(time_t delay);
@@ -142,16 +144,7 @@ void alpm_option_set_xfercommand(const char *cmd);
unsigned short alpm_option_get_nopassiveftp();
void alpm_option_set_nopassiveftp(unsigned short nopasv);
-
-unsigned short alpm_option_get_chomp();
-void alpm_option_set_chomp(unsigned short chomp);
-
-alpm_list_t *alpm_option_get_needles();
-void alpm_option_add_needle(char *needle);
-void alpm_option_set_needles(alpm_list_t *needles);
-
-unsigned short alpm_option_get_usecolor();
-void alpm_option_set_usecolor(unsigned short usecolor);
+void alpm_option_set_usedelta(unsigned short usedelta);
pmdb_t *alpm_option_get_localdb();
alpm_list_t *alpm_option_get_syncdbs();
@@ -160,14 +153,14 @@ alpm_list_t *alpm_option_get_syncdbs();
* Databases
*/
-/* Database registration callback */
-typedef void (*alpm_cb_db_register)(const char *, pmdb_t *);
-
-pmdb_t *alpm_db_register(char *treename);
+/* Preferred interfaces db_register_local and db_register_sync */
+pmdb_t *alpm_db_register_local(void);
+pmdb_t *alpm_db_register_sync(const char *treename);
int alpm_db_unregister(pmdb_t *db);
+int alpm_db_unregister_all(void);
-const char *alpm_db_get_name(pmdb_t *db);
-const char *alpm_db_get_url(pmdb_t *db);
+const char *alpm_db_get_name(const pmdb_t *db);
+const char *alpm_db_get_url(const pmdb_t *db);
int alpm_db_setserver(pmdb_t *db, const char *url);
@@ -179,7 +172,7 @@ alpm_list_t *alpm_db_whatprovides(pmdb_t *db, const char *name);
pmgrp_t *alpm_db_readgrp(pmdb_t *db, const char *name);
alpm_list_t *alpm_db_getgrpcache(pmdb_t *db);
-alpm_list_t *alpm_db_search(pmdb_t *db, alpm_list_t* needles);
+alpm_list_t *alpm_db_search(pmdb_t *db, const alpm_list_t* needles);
/*
* Packages
@@ -193,35 +186,22 @@ typedef enum _pmpkgreason_t {
PM_PKG_REASON_DEPEND = 1 /* installed as a dependency for another package */
} pmpkgreason_t;
-/* package name formats */
-/*
-typedef enum _pmpkghasarch_t {
- PM_PKG_WITHOUT_ARCH = 0, / pkgname-pkgver-pkgrel, used under PM_DBPATH /
- PM_PKG_WITH_ARCH = 1 / pkgname-pkgver-pkgrel-arch, used under PM_CACHEDIR /
-} pmpkghasarch_t;
-*/
-
-int alpm_pkg_load(char *filename, pmpkg_t **pkg);
+int alpm_pkg_load(const char *filename, unsigned short full, pmpkg_t **pkg);
int alpm_pkg_free(pmpkg_t *pkg);
int alpm_pkg_checkmd5sum(pmpkg_t *pkg);
-int alpm_pkg_checksha1sum(pmpkg_t *pkg);
-char *alpm_fetch_pkgurl(char *url);
-int alpm_parse_config(char *file, alpm_cb_db_register callback,
- const char *this_section);
+char *alpm_fetch_pkgurl(const char *url);
int alpm_pkg_vercmp(const char *ver1, const char *ver2);
-char *alpm_pkg_name_hasarch(char *pkgname);
+alpm_list_t *alpm_pkg_compute_requiredby(pmpkg_t *pkg);
const char *alpm_pkg_get_filename(pmpkg_t *pkg);
const char *alpm_pkg_get_name(pmpkg_t *pkg);
const char *alpm_pkg_get_version(pmpkg_t *pkg);
const char *alpm_pkg_get_desc(pmpkg_t *pkg);
const char *alpm_pkg_get_url(pmpkg_t *pkg);
-const char *alpm_pkg_get_builddate(pmpkg_t *pkg);
-const char *alpm_pkg_get_buildtype(pmpkg_t *pkg);
-const char *alpm_pkg_get_installdate(pmpkg_t *pkg);
+time_t alpm_pkg_get_builddate(pmpkg_t *pkg);
+time_t alpm_pkg_get_installdate(pmpkg_t *pkg);
const char *alpm_pkg_get_packager(pmpkg_t *pkg);
const char *alpm_pkg_get_md5sum(pmpkg_t *pkg);
-const char *alpm_pkg_get_sha1sum(pmpkg_t *pkg);
const char *alpm_pkg_get_arch(pmpkg_t *pkg);
unsigned long alpm_pkg_get_size(pmpkg_t *pkg);
unsigned long alpm_pkg_get_isize(pmpkg_t *pkg);
@@ -229,20 +209,32 @@ pmpkgreason_t alpm_pkg_get_reason(pmpkg_t *pkg);
alpm_list_t *alpm_pkg_get_licenses(pmpkg_t *pkg);
alpm_list_t *alpm_pkg_get_groups(pmpkg_t *pkg);
alpm_list_t *alpm_pkg_get_depends(pmpkg_t *pkg);
-alpm_list_t *alpm_pkg_get_removes(pmpkg_t *pkg);
-alpm_list_t *alpm_pkg_get_requiredby(pmpkg_t *pkg);
+alpm_list_t *alpm_pkg_get_optdepends(pmpkg_t *pkg);
alpm_list_t *alpm_pkg_get_conflicts(pmpkg_t *pkg);
alpm_list_t *alpm_pkg_get_provides(pmpkg_t *pkg);
+alpm_list_t *alpm_pkg_get_deltas(pmpkg_t *pkg);
alpm_list_t *alpm_pkg_get_replaces(pmpkg_t *pkg);
alpm_list_t *alpm_pkg_get_files(pmpkg_t *pkg);
alpm_list_t *alpm_pkg_get_backup(pmpkg_t *pkg);
unsigned short alpm_pkg_has_scriptlet(pmpkg_t *pkg);
+unsigned long alpm_pkg_download_size(pmpkg_t *newpkg, pmdb_t *db_local);
+
+/*
+ * Deltas
+ */
+
+const char *alpm_delta_get_from(pmdelta_t *delta);
+const char *alpm_delta_get_to(pmdelta_t *delta);
+unsigned long alpm_delta_get_size(pmdelta_t *delta);
+const char *alpm_delta_get_filename(pmdelta_t *delta);
+const char *alpm_delta_get_md5sum(pmdelta_t *delta);
+
/*
* Groups
*/
-const char *alpm_grp_get_name(pmgrp_t *grp);
-alpm_list_t *alpm_grp_get_pkgs(pmgrp_t *grp);
+const char *alpm_grp_get_name(const pmgrp_t *grp);
+const alpm_list_t *alpm_grp_get_pkgs(const pmgrp_t *grp);
/*
* Sync
@@ -255,9 +247,11 @@ typedef enum _pmsynctype_t {
PM_SYNC_TYPE_DEPEND
} pmsynctype_t;
-pmsynctype_t alpm_sync_get_type(pmsyncpkg_t *sync);
-pmpkg_t *alpm_sync_get_pkg(pmsyncpkg_t *sync);
-void *alpm_sync_get_data(pmsyncpkg_t *sync);
+pmsynctype_t alpm_sync_get_type(const pmsyncpkg_t *sync);
+pmpkg_t *alpm_sync_get_pkg(const pmsyncpkg_t *sync);
+void *alpm_sync_get_data(const pmsyncpkg_t *sync);
+int alpm_sync_sysupgrade(pmdb_t *db_local,
+ alpm_list_t *dbs_sync, alpm_list_t **syncpkgs);
/*
* Transactions
@@ -267,6 +261,7 @@ void *alpm_sync_get_data(pmsyncpkg_t *sync);
typedef enum _pmtranstype_t {
PM_TRANS_TYPE_ADD = 1,
PM_TRANS_TYPE_REMOVE,
+ PM_TRANS_TYPE_REMOVEUPGRADE,
PM_TRANS_TYPE_UPGRADE,
PM_TRANS_TYPE_SYNC
} pmtranstype_t;
@@ -276,7 +271,7 @@ typedef enum _pmtransflag_t {
PM_TRANS_FLAG_NODEPS = 0x01,
PM_TRANS_FLAG_FORCE = 0x02,
PM_TRANS_FLAG_NOSAVE = 0x04,
- PM_TRANS_FLAG_FRESHEN = 0x08,
+ /* 0x08 flag can go here */
PM_TRANS_FLAG_CASCADE = 0x10,
PM_TRANS_FLAG_RECURSE = 0x20,
PM_TRANS_FLAG_DBONLY = 0x40,
@@ -285,7 +280,8 @@ typedef enum _pmtransflag_t {
PM_TRANS_FLAG_DOWNLOADONLY = 0x200,
PM_TRANS_FLAG_NOSCRIPTLET = 0x400,
PM_TRANS_FLAG_NOCONFLICTS = 0x800,
- PM_TRANS_FLAG_PRINTURIS = 0x1000
+ PM_TRANS_FLAG_PRINTURIS = 0x1000,
+ PM_TRANS_FLAG_NEEDED = 0x2000
} pmtransflag_t;
/* Transaction Events */
@@ -294,8 +290,6 @@ typedef enum _pmtransevt_t {
PM_TRANS_EVT_CHECKDEPS_DONE,
PM_TRANS_EVT_FILECONFLICTS_START,
PM_TRANS_EVT_FILECONFLICTS_DONE,
- PM_TRANS_EVT_CLEANUP_START,
- PM_TRANS_EVT_CLEANUP_DONE,
PM_TRANS_EVT_RESOLVEDEPS_START,
PM_TRANS_EVT_RESOLVEDEPS_DONE,
PM_TRANS_EVT_INTERCONFLICTS_START,
@@ -309,9 +303,14 @@ typedef enum _pmtransevt_t {
PM_TRANS_EVT_EXTRACT_DONE,
PM_TRANS_EVT_INTEGRITY_START,
PM_TRANS_EVT_INTEGRITY_DONE,
+ PM_TRANS_EVT_DELTA_INTEGRITY_START,
+ PM_TRANS_EVT_DELTA_INTEGRITY_DONE,
+ PM_TRANS_EVT_DELTA_PATCHES_START,
+ PM_TRANS_EVT_DELTA_PATCHES_DONE,
+ PM_TRANS_EVT_DELTA_PATCH_START,
+ PM_TRANS_EVT_DELTA_PATCH_DONE,
+ PM_TRANS_EVT_DELTA_PATCH_FAILED,
PM_TRANS_EVT_SCRIPTLET_INFO,
- PM_TRANS_EVT_SCRIPTLET_START,
- PM_TRANS_EVT_SCRIPTLET_DONE,
PM_TRANS_EVT_PRINTURI,
PM_TRANS_EVT_RETRIEVE_START,
} pmtransevt_t;
@@ -323,7 +322,7 @@ typedef enum _pmtransconv_t {
PM_TRANS_CONV_CONFLICT_PKG = 0x04,
PM_TRANS_CONV_CORRUPTED_PKG = 0x08,
PM_TRANS_CONV_LOCAL_NEWER = 0x10,
- PM_TRANS_CONV_LOCAL_UPTODATE = 0x20,
+ /* 0x20 flag can go here */
PM_TRANS_CONV_REMOVE_HOLDPKG = 0x40
} pmtransconv_t;
@@ -356,6 +355,7 @@ int alpm_trans_sysupgrade(void);
int alpm_trans_addtarget(char *target);
int alpm_trans_prepare(alpm_list_t **data);
int alpm_trans_commit(alpm_list_t **data);
+int alpm_trans_interrupt(void);
int alpm_trans_release(void);
/*
@@ -369,41 +369,42 @@ typedef enum _pmdepmod_t {
PM_DEP_MOD_LE
} pmdepmod_t;
-typedef enum _pmdeptype_t {
- PM_DEP_TYPE_DEPEND = 1,
- PM_DEP_TYPE_CONFLICT
-} pmdeptype_t;
-
pmdepend_t *alpm_splitdep(const char *depstring);
int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep);
+alpm_list_t *alpm_checkdeps(pmdb_t *db, int reversedeps,
+ alpm_list_t *remove, alpm_list_t *upgrade);
-const char *alpm_dep_get_target(pmdepmissing_t *miss);
-pmdeptype_t alpm_dep_get_type(pmdepmissing_t *miss);
-pmdepmod_t alpm_dep_get_mod(pmdepmissing_t *miss);
-const char *alpm_dep_get_name(pmdepmissing_t *miss);
-const char *alpm_dep_get_version(pmdepmissing_t *miss);
+const char *alpm_miss_get_target(const pmdepmissing_t *miss);
+pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss);
+
+const char *alpm_conflict_get_package1(pmconflict_t *conflict);
+const char *alpm_conflict_get_package2(pmconflict_t *conflict);
+
+pmdepmod_t alpm_dep_get_mod(const pmdepend_t *dep);
+const char *alpm_dep_get_name(const pmdepend_t *dep);
+const char *alpm_dep_get_version(const pmdepend_t *dep);
+char *alpm_dep_get_string(const pmdepend_t *dep);
/*
* File conflicts
*/
-typedef enum _pmconflicttype_t {
- PM_CONFLICT_TYPE_TARGET = 1,
- PM_CONFLICT_TYPE_FILE
-} pmconflicttype_t;
+typedef enum _pmfileconflicttype_t {
+ PM_FILECONFLICT_TARGET = 1,
+ PM_FILECONFLICT_FILESYSTEM
+} pmfileconflicttype_t;
-const char *alpm_conflict_get_target(pmconflict_t *conflict);
-pmconflicttype_t alpm_conflict_get_type(pmconflict_t *conflict);
-const char *alpm_conflict_get_file(pmconflict_t *conflict);
-const char *alpm_conflict_get_ctarget(pmconflict_t *conflict);
+const char *alpm_fileconflict_get_target(pmfileconflict_t *conflict);
+pmfileconflicttype_t alpm_fileconflict_get_type(pmfileconflict_t *conflict);
+const char *alpm_fileconflict_get_file(pmfileconflict_t *conflict);
+const char *alpm_fileconflict_get_ctarget(pmfileconflict_t *conflict);
/*
* Helpers
*/
-/* md5sums */
-char *alpm_get_md5sum(char *name);
-char *alpm_get_sha1sum(char *name);
+/* checksums */
+char *alpm_get_md5sum(const char *name);
/*
* Errors
@@ -413,6 +414,7 @@ enum _pmerrno_t {
PM_ERR_SYSTEM,
PM_ERR_BADPERMS,
PM_ERR_NOT_A_FILE,
+ PM_ERR_NOT_A_DIR,
PM_ERR_WRONG_ARGS,
/* Interface */
PM_ERR_HANDLE_NULL,
@@ -455,6 +457,9 @@ enum _pmerrno_t {
PM_ERR_PKG_INVALID_NAME,
PM_ERR_PKG_CORRUPTED,
PM_ERR_PKG_REPO_NOT_FOUND,
+ /* Deltas */
+ PM_ERR_DLT_CORRUPTED,
+ PM_ERR_DLT_PATCHFAILED,
/* Groups */
PM_ERR_GRP_NOT_FOUND,
/* Dependencies */
@@ -465,15 +470,9 @@ enum _pmerrno_t {
PM_ERR_USER_ABORT,
PM_ERR_INTERNAL_ERROR,
PM_ERR_LIBARCHIVE_ERROR,
- PM_ERR_DISK_FULL,
PM_ERR_DB_SYNC,
PM_ERR_RETRIEVE,
PM_ERR_PKG_HOLD,
- /* Configuration file */
- PM_ERR_CONF_BAD_SECTION,
- PM_ERR_CONF_LOCAL,
- PM_ERR_CONF_BAD_SYNTAX,
- PM_ERR_CONF_DIRECTIVE_OUTSIDE_SECTION,
PM_ERR_INVALID_REGEX,
/* Downloading */
PM_ERR_CONNECT_FAILED,
@@ -482,9 +481,8 @@ enum _pmerrno_t {
extern enum _pmerrno_t pm_errno;
-char *alpm_strerror(int err);
-
-alpm_list_t *alpm_get_upgrades();
+const char *alpm_strerror(int err);
+const char *alpm_strerrorlast(void);
#ifdef __cplusplus
}
diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c
index 54027455..a1e8861b 100644
--- a/lib/libalpm/alpm_list.c
+++ b/lib/libalpm/alpm_list.c
@@ -1,8 +1,8 @@
/*
* alpm_list.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -29,29 +29,41 @@
#include "alpm_list.h"
#include "util.h"
-/** \defgroup alpm_list functions */
-/*\@{*/
+/**
+ * @addtogroup alpm_list List Functions
+ * @brief Functions to manipulate alpm_list_t lists.
+ *
+ * These functions are designed to create, destroy, and modify lists of
+ * type alpm_list_t. This is an internal list type used by libalpm that is
+ * publicly exposed for use by frontends if desired.
+ *
+ * @{ */
/* Allocation */
-/** Allocate a new alpm_list_t
- * @return a new alpm_list_t item, or NULL on failure
+/**
+ * @brief Allocate a new alpm_list_t.
+ *
+ * @return a new alpm_list_t item, or NULL on failure
*/
-alpm_list_t *alpm_list_new()
+alpm_list_t SYMEXPORT *alpm_list_new()
{
alpm_list_t *list = NULL;
- list = (alpm_list_t *)malloc(sizeof(alpm_list_t));
+ list = malloc(sizeof(alpm_list_t));
if(list) {
list->data = NULL;
- list->prev = NULL;
+ list->prev = list; /* maintain a back reference to the tail pointer */
list->next = NULL;
}
+
return(list);
}
-/** Free a list, but not the contained data
- * @param list the list to free
+/**
+ * @brief Free a list, but not the contained data.
+ *
+ * @param list the list to free
*/
void SYMEXPORT alpm_list_free(alpm_list_t *list)
{
@@ -64,9 +76,11 @@ void SYMEXPORT alpm_list_free(alpm_list_t *list)
}
}
-/** Free the internal data of a list structure
- * @param list the list to free
- * @param fn a free function for the internal data
+/**
+ * @brief Free the internal data of a list structure.
+ *
+ * @param list the list to free
+ * @param fn a free function for the internal data
*/
void SYMEXPORT alpm_list_free_inner(alpm_list_t *list, alpm_list_fn_free fn)
{
@@ -83,10 +97,13 @@ void SYMEXPORT alpm_list_free_inner(alpm_list_t *list, alpm_list_fn_free fn)
/* Mutators */
-/** Add a new item to the list
- * @param list the list to add to
- * @param data the new item to be added to the list
- * @return the resultant list, or NULL on failure
+/**
+ * @brief Add a new item to the end of the list.
+ *
+ * @param list the list to add to
+ * @param data the new item to be added to the list
+ *
+ * @return the resultant list
*/
alpm_list_t SYMEXPORT *alpm_list_add(alpm_list_t *list, void *data)
{
@@ -110,6 +127,7 @@ alpm_list_t SYMEXPORT *alpm_list_add(alpm_list_t *list, void *data)
}
lp->next->prev = lp;
lp = lp->next;
+ list->prev = lp;
}
lp->data = data;
@@ -117,13 +135,16 @@ alpm_list_t SYMEXPORT *alpm_list_add(alpm_list_t *list, void *data)
return(ptr);
}
-/** Add items to a list in sorted order.
- * @param list the list to add to
- * @param data the new item to be added to the list
- * @param fn the comparison function to use to determine order
- * @return the resultant list, or NULL on failure
+/**
+ * @brief Add items to a list in sorted order.
+ *
+ * @param list the list to add to
+ * @param data the new item to be added to the list
+ * @param fn the comparison function to use to determine order
+ *
+ * @return the resultant list
*/
-alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn)
+alpm_list_t SYMEXPORT *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn)
{
if(!fn) {
return alpm_list_add(list, data);
@@ -153,21 +174,63 @@ alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cm
} else {
list = add; /* At beginning, or new list */
}
-
+
+ if(next == NULL) {
+ /* At end, adjust tail pointer on head node */
+ list->prev = add;
+ }
+
return(list);
}
}
-/** Merge the two sorted sublists into one sorted list
- * @param left the first list
+/**
+ * @brief Join two lists.
+ * The two lists must be independent. Do not free the original lists after
+ * calling this function, as this is not a copy operation. The list pointers
+ * passed in should be considered invalid after calling this function.
+ *
+ * @param first the first list
+ * @param second the second list
+ *
+ * @return the resultant joined list
+ */
+alpm_list_t SYMEXPORT *alpm_list_join(alpm_list_t *first, alpm_list_t *second)
+{
+ alpm_list_t *tmp;
+
+ if (first == NULL) {
+ return second;
+ }
+ if (second == NULL) {
+ return first;
+ }
+ /* tmp is the last element of the first list */
+ tmp = first->prev;
+ /* link the first list to the second */
+ tmp->next = second;
+ /* link the second list to the first */
+ first->prev = second->prev;
+ /* set the back reference to the tail */
+ second->prev = tmp;
+
+ return(first);
+}
+
+/**
+ * @brief Merge the two sorted sublists into one sorted list.
+ *
+ * @param left the first list
* @param right the second list
- * @param fn comparison function for determining merge order
+ * @param fn comparison function for determining merge order
+ *
+ * @return the resultant list
*/
-alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn)
+alpm_list_t SYMEXPORT *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn)
{
alpm_list_t *newlist, *lp;
- if (left == NULL)
+ if (left == NULL)
return right;
if (right == NULL)
return left;
@@ -189,7 +252,7 @@ alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_f
lp->next = left;
left->prev = lp;
left = left->next;
- }
+ }
else {
lp->next = right;
right->prev = lp;
@@ -206,22 +269,35 @@ alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_f
lp->next = right;
right->prev = lp;
}
+
+ /* Find our tail pointer
+ * TODO maintain this in the algorithm itself */
+ lp = newlist;
+ while(lp && lp->next) {
+ lp = lp->next;
+ }
+ newlist->prev = lp;
+
return(newlist);
}
-/** Sort a list of size `n` using mergesort algorithm
- * @param list the list to sort
- * @param n the size of the list
- * @param fn the comparison function for determining order
+/**
+ * @brief Sort a list of size `n` using mergesort algorithm.
+ *
+ * @param list the list to sort
+ * @param n the size of the list
+ * @param fn the comparison function for determining order
+ *
+ * @return the resultant list
*/
-alpm_list_t* alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn)
+alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn)
{
if (n > 1) {
alpm_list_t *left = list;
alpm_list_t *lastleft = alpm_list_nth(list, n/2 - 1);
alpm_list_t *right = lastleft->next;
/* terminate first list */
- lastleft->next = NULL;
+ lastleft->next = NULL;
left = alpm_list_msort(left, n/2, fn);
right = alpm_list_msort(right, n - (n/2), fn);
@@ -230,15 +306,18 @@ alpm_list_t* alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn)
return(list);
}
-/** Remove an item from the list
- * @param haystack the list to remove the item from
- * @param needle the data member of the item we're removing
- * @param fn the comparison function for searching
- * @param data output parameter containing the data member of the item removed
- * @return the resultant list, or NULL on failure
+/**
+ * @brief Remove an item from the list.
+ *
+ * @param haystack the list to remove the item from
+ * @param needle the data member of the item we're removing
+ * @param fn the comparison function for searching
+ * @param data output parameter containing data of the removed item
+ *
+ * @return the resultant list
*/
-alpm_list_t *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data)
-{ /* TODO I modified this to remove ALL matching items. Do we need a remove_first? */
+alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data)
+{
alpm_list_t *i = haystack, *tmp = NULL;
if(data) {
@@ -252,16 +331,31 @@ alpm_list_t *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_li
tmp = i->next;
if(fn(needle, i->data) == 0) {
/* we found a matching item */
- if(i->next) {
- i->next->prev = i->prev;
- }
- if(i->prev) {
- i->prev->next = i->next;
- }
-
if(i == haystack) {
- /* The item found is the first in the chain */
- haystack = haystack->next;
+ /* Special case: removing the head node which has a back reference to
+ * the tail node */
+ haystack = i->next;
+ if(haystack) {
+ haystack->prev = i->prev;
+ }
+ i->prev = NULL;
+ } else if(i == haystack->prev) {
+ /* Special case: removing the tail node, so we need to fix the back
+ * reference on the head node. We also know tail != head. */
+ if(i->prev) {
+ /* i->next should always be null */
+ i->prev->next = i->next;
+ haystack->prev = i->prev;
+ i->prev = NULL;
+ }
+ } else {
+ /* Normal case, non-head and non-tail node */
+ if(i->next) {
+ i->next->prev = i->prev;
+ }
+ if(i->prev) {
+ i->prev->next = i->next;
+ }
}
if(data) {
@@ -269,79 +363,117 @@ alpm_list_t *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_li
}
i->data = NULL;
free(i);
+ i = NULL;
+ } else {
+ i = tmp;
}
- i = tmp;
}
return(haystack);
}
-/** Remove the passed in node from the list that it is a part of
- * @note this DOES NOT free the node
- * @param node the list node we're removing
- * @return the node which took the place of this one
+/**
+ * @brief Create a new list without any duplicates.
+ *
+ * This does NOT copy data members.
+ *
+ * @param list the list to copy
+ *
+ * @return a new list containing non-duplicate items
*/
-alpm_list_t *alpm_list_remove_node(alpm_list_t *node)
+alpm_list_t SYMEXPORT *alpm_list_remove_dupes(const alpm_list_t *list)
{
- if(!node) return(NULL);
-
- alpm_list_t *ret = NULL;
-
- if(node->prev) {
- node->prev->next = node->next;
- ret = node->prev;
- node->prev = NULL;
- }
- if(node->next) {
- node->next->prev = node->prev;
- ret = node->next;
- node->next = NULL;
+ const alpm_list_t *lp = list;
+ alpm_list_t *newlist = NULL;
+ while(lp) {
+ if(!alpm_list_find_ptr(newlist, lp->data)) {
+ newlist = alpm_list_add(newlist, lp->data);
+ }
+ lp = lp->next;
}
-
- return(ret);
+ return(newlist);
}
-/** Create a new list without any duplicates
- * @note DOES NOT copy data members
- * @param list the list to copy
- * @return a NEW list containing non-duplicated items
+/**
+ * @brief Copy a string list, including data.
+ *
+ * @param list the list to copy
+ *
+ * @return a copy of the original list
*/
-alpm_list_t SYMEXPORT *alpm_list_remove_dupes(alpm_list_t *list)
-{ /* TODO does removing the strdup here cause invalid free's anywhere? */
- alpm_list_t *lp = list, *newlist = NULL;
+alpm_list_t SYMEXPORT *alpm_list_strdup(const alpm_list_t *list)
+{
+ const alpm_list_t *lp = list;
+ alpm_list_t *newlist = NULL;
while(lp) {
- if(!alpm_list_find(newlist, lp->data)) {
- newlist = alpm_list_add(newlist, lp->data);
- }
+ newlist = alpm_list_add(newlist, strdup(lp->data));
lp = lp->next;
}
return(newlist);
}
-/** Copy a string list, including data
- * @note this is gross, assumes string data members
- * @param list the list to copy
- * @return a copy of the original list
+/**
+ * @brief Copy a list, without copying data.
+ *
+ * @param list the list to copy
+ *
+ * @return a copy of the original list
*/
-alpm_list_t *alpm_list_strdup(alpm_list_t *list)
+alpm_list_t SYMEXPORT *alpm_list_copy(const alpm_list_t *list)
{
- alpm_list_t *lp = list, *newlist = NULL;
+ const alpm_list_t *lp = list;
+ alpm_list_t *newlist = NULL;
while(lp) {
- newlist = alpm_list_add(newlist, strdup(lp->data));
+ newlist = alpm_list_add(newlist, lp->data);
lp = lp->next;
}
return(newlist);
}
-/** Create a new list in reverse order
- * @param list the list to copy
- * @return a NEW list in reverse order of the first
+/**
+ * @brief Copy a list and copy the data.
+ * Note that the data elements to be copied should not contain pointers
+ * and should also be of constant size.
+ *
+ * @param list the list to copy
+ * @param size the size of each data element
+ *
+ * @return a copy of the original list, data copied as well
*/
-alpm_list_t *alpm_list_reverse(alpm_list_t *list)
-{ /* TODO any invalid free's from NOT duplicating data here? */
- alpm_list_t *lp, *newlist = NULL;
+alpm_list_t SYMEXPORT *alpm_list_copy_data(const alpm_list_t *list,
+ size_t size)
+{
+ const alpm_list_t *lp = list;
+ alpm_list_t *newlist = NULL;
+ while(lp) {
+ void *newdata = calloc(1, size);
+ if(newdata) {
+ memcpy(newdata, lp->data, size);
+ newlist = alpm_list_add(newlist, newdata);
+ lp = lp->next;
+ }
+ }
+ return(newlist);
+}
+
+/**
+ * @brief Create a new list in reverse order.
+ *
+ * @param list the list to copy
+ *
+ * @return a new list in reverse order
+ */
+alpm_list_t SYMEXPORT *alpm_list_reverse(alpm_list_t *list)
+{
+ const alpm_list_t *lp;
+ alpm_list_t *newlist = NULL;
lp = alpm_list_last(list);
+ if(list) {
+ /* break our reverse circular list */
+ list->prev = NULL;
+ }
+
while(lp) {
newlist = alpm_list_add(newlist, lp->data);
lp = lp->prev;
@@ -351,65 +483,84 @@ alpm_list_t *alpm_list_reverse(alpm_list_t *list)
/* Accessors */
-/** Get the first element of a list.
+/**
+ * @brief Get the first element of a list.
+ *
* @param list the list
+ *
* @return the first element in the list
*/
-alpm_list_t SYMEXPORT *alpm_list_first(alpm_list_t *list)
+inline alpm_list_t SYMEXPORT *alpm_list_first(const alpm_list_t *list)
{
- return(list);
+ return((alpm_list_t*)list);
}
-/** Return nth element from list (starting with 0)
- * @param list the list to access
- * @param n the index of the item to find
- * @return an alpm_list_t node for index `n`
+/**
+ * @brief Return nth element from list (starting from 0).
+ *
+ * @param list the list
+ * @param n the index of the item to find
+ *
+ * @return an alpm_list_t node for index `n`
*/
-alpm_list_t *alpm_list_nth(alpm_list_t *list, int n)
+alpm_list_t SYMEXPORT *alpm_list_nth(const alpm_list_t *list, int n)
{
- alpm_list_t *i = list;
+ const alpm_list_t *i = list;
while(n--) {
i = i->next;
}
- return(i);
+ return((alpm_list_t*)i);
}
-/** Get the next element of a list.
- * @param entry the list entry
+/**
+ * @brief Get the next element of a list.
+ *
+ * @param node the list node
+ *
* @return the next element, or NULL when no more elements exist
*/
-alpm_list_t SYMEXPORT *alpm_list_next(alpm_list_t *entry)
+inline alpm_list_t SYMEXPORT *alpm_list_next(const alpm_list_t *node)
{
- return(entry->next);
+ return(node->next);
}
-/** Get the last item in the list.
- * @param list the list to operate on
- * @return the last element in the list
+
+/**
+ * @brief Get the last item in the list.
+ *
+ * @param list the list
+ *
+ * @return the last element in the list
*/
-alpm_list_t *alpm_list_last(alpm_list_t *list)
+alpm_list_t SYMEXPORT *alpm_list_last(const alpm_list_t *list)
{
- alpm_list_t *i = list;
- while(i && i->next) {
- i = i->next;
+ if(list) {
+ return(list->prev);
+ } else {
+ return(NULL);
}
- return(i);
}
-/** Get the data member of a list entry.
- * @param entry the list entry
+/**
+ * @brief Get the data member of a list node.
+ *
+ * @param node the list node
+ *
* @return the contained data, or NULL if none
*/
-void SYMEXPORT *alpm_list_getdata(const alpm_list_t *entry)
+void SYMEXPORT *alpm_list_getdata(const alpm_list_t *node)
{
- if(entry == NULL) return(NULL);
- return(entry->data);
+ if(node == NULL) return(NULL);
+ return(node->data);
}
/* Misc */
-/** Count the list items
- * @param list the list to operate on
- * @return the number of list items
+/**
+ * @brief Get the number of items in a list.
+ *
+ * @param list the list
+ *
+ * @return the number of list items
*/
int SYMEXPORT alpm_list_count(const alpm_list_t *list)
{
@@ -422,53 +573,80 @@ int SYMEXPORT alpm_list_count(const alpm_list_t *list)
return(i);
}
-/** Is an item in the list
- * @param needle the data to compare to (== comparison)
- * @param haystack the list to search
- * @return 1 if `needle` is found, 0 otherwise
+/**
+ * @brief Find an item in a list.
+ *
+ * @param needle the item to search
+ * @param haystack the list
+ * @param fn the comparison function for searching (!= NULL)
+ *
+ * @return `needle` if found, NULL otherwise
*/
-int SYMEXPORT alpm_list_find(alpm_list_t *haystack, const void *needle)
+void SYMEXPORT *alpm_list_find(const alpm_list_t *haystack, const void *needle,
+ alpm_list_fn_cmp fn)
{
- alpm_list_t *lp = haystack;
+ const alpm_list_t *lp = haystack;
while(lp) {
- if(lp->data == needle) {
- return(1);
+ if(lp->data && fn(lp->data, needle) == 0) {
+ return(lp->data);
}
lp = lp->next;
}
- return(0);
+ return(NULL);
+}
+
+/* trivial helper function for alpm_list_find_ptr */
+static int ptrcmp(const void *p, const void *q)
+{
+ return(p != q);
+}
+
+/**
+ * @brief Find an item in a list.
+ *
+ * Search for the item whos data matches that of the `needle`.
+ *
+ * @param needle the data to search for (== comparison)
+ * @param haystack the list
+ *
+ * @return `needle` if found, NULL otherwise
+ */
+void SYMEXPORT *alpm_list_find_ptr(const alpm_list_t *haystack, const void *needle)
+{
+ return(alpm_list_find(haystack, needle, ptrcmp));
}
-/* Test for existence of a string in a alpm_list_t
-*/
-/** Is a _string_ in the list (optimization of alpm_list_find for strings)
- * @param needle the string to compare
- * @param haystack the list to search
- * @return 1 if `needle` is found, 0 otherwise
+/**
+ * @brief Find a string in a list.
+ *
+ * @param needle the string to search for
+ * @param haystack the list
+ *
+ * @return `needle` if found, NULL otherwise
*/
-int SYMEXPORT alpm_list_find_str(alpm_list_t *haystack, const char *needle)
+char SYMEXPORT *alpm_list_find_str(const alpm_list_t *haystack, const char *needle)
{
- alpm_list_t *lp = haystack;
- while(lp) {
- if(lp->data && strcmp((const char *)lp->data, needle) == 0) {
- return(1);
- }
- lp = lp->next;
- }
- return(0);
+ return((char *)alpm_list_find(haystack, (const void*)needle, (alpm_list_fn_cmp)strcmp));
}
-/**
- * Calculate the items in list `lhs` that are not present in list `rhs`
- * @note Entries are not duplicated
+/**
+ * @brief Find the items in list `lhs` that are not present in list `rhs`.
+ *
+ * Entries are not duplicated. Operation is O(m*n). The first list is stepped
+ * through one node at a time, and for each node in the first list, each node
+ * in the second list is compared to it.
+ *
* @param lhs the first list
* @param rhs the second list
- * @param fn the comparison function
- * @return a list containing all items in lhs not present in rhs
+ * @param fn the comparison function
+ *
+ * @return a list containing all items in `lhs` not present in `rhs`
*/
-alpm_list_t *alpm_list_diff(alpm_list_t *lhs, alpm_list_t *rhs, alpm_list_fn_cmp fn)
+alpm_list_t SYMEXPORT *alpm_list_diff(const alpm_list_t *lhs,
+ const alpm_list_t *rhs, alpm_list_fn_cmp fn)
{
- alpm_list_t *i, *j, *ret = NULL;
+ const alpm_list_t *i, *j;
+ alpm_list_t *ret = NULL;
for(i = lhs; i; i = i->next) {
int found = 0;
for(j = rhs; j; j = j->next) {
diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h
index 214deea4..39cbdd30 100644
--- a/lib/libalpm/alpm_list.h
+++ b/lib/libalpm/alpm_list.h
@@ -1,8 +1,8 @@
/*
- * alpm_alpm_list.h
- *
+ * alpm_list.h
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,25 +15,33 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_LIST_H
#define _ALPM_LIST_H
-#include "alpm.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
-/* Chained list struct */
-struct __alpm_list_t {
+/**
+ * @brief Linked list type used by libalpm.
+ *
+ * It is exposed so front ends can use it to prevent the need to reimplement
+ * lists of their own; however, it is not required that the front end uses
+ * it.
+ */
+typedef struct __alpm_list_t {
+ /** data held by the list node */
void *data;
+ /** pointer to the previous node */
struct __alpm_list_t *prev;
+ /** pointer to the next node */
struct __alpm_list_t *next;
-};
+} alpm_list_t;
-/* TODO we should do away with these... they're messy*/
-#define _FREELIST(p, f) do { alpm_list_free_inner(p, f); alpm_list_free(p); p = NULL; } while(0)
-#define FREELIST(p) _FREELIST(p, free)
-#define FREELISTPTR(p) do { alpm_list_free(p); p = NULL; } while(0)
+#define FREELIST(p) do { alpm_list_free_inner(p, free); alpm_list_free(p); p = NULL; } while(0)
typedef void (*alpm_list_fn_free)(void *); /* item deallocation callback */
typedef int (*alpm_list_fn_cmp)(const void *, const void *); /* item comparison callback */
@@ -46,27 +54,33 @@ void alpm_list_free_inner(alpm_list_t *list, alpm_list_fn_free fn);
/* item mutators */
alpm_list_t *alpm_list_add(alpm_list_t *list, void *data);
alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn);
+alpm_list_t *alpm_list_join(alpm_list_t *first, alpm_list_t *second);
alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn);
alpm_list_t *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn);
alpm_list_t *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data);
-alpm_list_t *alpm_list_remove_node(alpm_list_t *node);
-alpm_list_t *alpm_list_remove_dupes(alpm_list_t *list);
-alpm_list_t *alpm_list_strdup(alpm_list_t *list);
+alpm_list_t *alpm_list_remove_dupes(const alpm_list_t *list);
+alpm_list_t *alpm_list_strdup(const alpm_list_t *list);
+alpm_list_t *alpm_list_copy(const alpm_list_t *list);
+alpm_list_t *alpm_list_copy_data(const alpm_list_t *list, size_t size);
alpm_list_t *alpm_list_reverse(alpm_list_t *list);
/* item accessors */
-alpm_list_t *alpm_list_first(alpm_list_t *list);
-alpm_list_t *alpm_list_nth(alpm_list_t *list, int n);
-alpm_list_t *alpm_list_next(alpm_list_t *list);
-alpm_list_t *alpm_list_last(alpm_list_t *list);
+alpm_list_t *alpm_list_first(const alpm_list_t *list);
+alpm_list_t *alpm_list_nth(const alpm_list_t *list, int n);
+alpm_list_t *alpm_list_next(const alpm_list_t *list);
+alpm_list_t *alpm_list_last(const alpm_list_t *list);
void *alpm_list_getdata(const alpm_list_t *entry);
/* misc */
int alpm_list_count(const alpm_list_t *list);
-int alpm_list_find(alpm_list_t *haystack, const void *needle);
-int alpm_list_find_str(alpm_list_t *haystack,const char *needle);
-alpm_list_t *alpm_list_diff(alpm_list_t *lhs, alpm_list_t *rhs, alpm_list_fn_cmp fn);
+void *alpm_list_find(const alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn);
+void *alpm_list_find_ptr(const alpm_list_t *haystack, const void *needle);
+char *alpm_list_find_str(const alpm_list_t *haystack, const char *needle);
+alpm_list_t *alpm_list_diff(const alpm_list_t *lhs, const alpm_list_t *rhs, alpm_list_fn_cmp fn);
+#ifdef __cplusplus
+}
+#endif
#endif /* _ALPM_LIST_H */
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c
index aeb0dea7..731a59e6 100644
--- a/lib/libalpm/backup.c
+++ b/lib/libalpm/backup.c
@@ -1,11 +1,11 @@
/*
* backup.c
- *
+ *
* Copyright (c) 2005 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -34,11 +34,11 @@
#include "util.h"
/* Look for a filename in a pmpkg_t.backup list. If we find it,
- * then we return the md5 or sha1 hash (parsed from the same line)
+ * then we return the md5 hash (parsed from the same line)
*/
-char *_alpm_needbackup(const char *file, alpm_list_t *backup)
+char *_alpm_needbackup(const char *file, const alpm_list_t *backup)
{
- alpm_list_t *lp;
+ const alpm_list_t *lp;
ALPM_LOG_FUNC;
@@ -46,11 +46,11 @@ char *_alpm_needbackup(const char *file, alpm_list_t *backup)
return(NULL);
}
- /* run through the backup list and parse out the md5 or sha1 hash for our file */
+ /* run through the backup list and parse out the md5 hash for our file */
for(lp = backup; lp; lp = lp->next) {
char *str = strdup(lp->data);
char *ptr;
-
+
/* tab delimiter */
ptr = strchr(str, '\t');
if(ptr == NULL) {
@@ -59,7 +59,7 @@ char *_alpm_needbackup(const char *file, alpm_list_t *backup)
}
*ptr = '\0';
ptr++;
- /* now str points to the filename and ptr points to the md5 or sha1 hash */
+ /* now str points to the filename and ptr points to the md5 hash */
if(strcmp(file, str) == 0) {
char *hash = strdup(ptr);
FREE(str);
diff --git a/lib/libalpm/backup.h b/lib/libalpm/backup.h
index dde907f0..8723abaf 100644
--- a/lib/libalpm/backup.h
+++ b/lib/libalpm/backup.h
@@ -1,8 +1,8 @@
/*
* backup.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_BACKUP_H
@@ -23,7 +23,7 @@
#include "alpm_list.h"
-char *_alpm_needbackup(const char *file, alpm_list_t *backup);
+char *_alpm_needbackup(const char *file, const alpm_list_t *backup);
#endif /* _ALPM_BACKUP_H */
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index f3619277..078136ed 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -1,9 +1,9 @@
/*
* be_files.c
- *
+ *
* Copyright (c) 2006 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -27,16 +27,13 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
-#ifdef __sun__
-#include <strings.h>
-#endif
+#include <stdint.h> /* uintmax_t */
#include <sys/stat.h>
#include <dirent.h>
-#include <libintl.h>
-#include <locale.h>
-#ifdef CYGWIN
+#include <ctype.h>
+#include <time.h>
#include <limits.h> /* PATH_MAX */
-#endif
+#include <locale.h> /* setlocale */
/* libalpm */
#include "db.h"
@@ -47,6 +44,8 @@
#include "error.h"
#include "handle.h"
#include "package.h"
+#include "delta.h"
+#include "deps.h"
/* This function is used to convert the downloaded db file to the proper backend
@@ -56,9 +55,9 @@ int _alpm_db_install(pmdb_t *db, const char *dbfile)
{
ALPM_LOG_FUNC;
- /* TODO we should not simply unpack the archive, but better parse it and
+ /* TODO we should not simply unpack the archive, but better parse it and
* db_write each entry (see sync_load_dbarchive to get archive content) */
- _alpm_log(PM_LOG_DEBUG, _("unpacking database '%s'"), dbfile);
+ _alpm_log(PM_LOG_DEBUG, "unpacking database '%s'\n", dbfile);
if(_alpm_unpack(dbfile, db->path, NULL)) {
RET_ERR(PM_ERR_SYSTEM, -1);
@@ -75,7 +74,7 @@ int _alpm_db_open(pmdb_t *db)
RET_ERR(PM_ERR_DB_NULL, -1);
}
- _alpm_log(PM_LOG_DEBUG, _("opening database from path '%s'"), db->path);
+ _alpm_log(PM_LOG_DEBUG, "opening database from path '%s'\n", db->path);
db->handle = opendir(db->path);
if(db->handle == NULL) {
RET_ERR(PM_ERR_DB_OPEN, -1);
@@ -109,6 +108,43 @@ void _alpm_db_rewind(pmdb_t *db)
rewinddir(db->handle);
}
+static int _alpm_db_splitname(const char *target, char *name, char *version)
+{
+ /* the format of a db entry is as follows:
+ * package-version-rel/
+ * package name can contain hyphens, so parse from the back- go back
+ * two hyphens and we have split the version from the name.
+ */
+ char *tmp, *p, *q;
+
+ if(target == NULL) {
+ return(-1);
+ }
+ tmp = strdup(target);
+ p = tmp + strlen(tmp);
+
+ /* do the magic parsing- find the beginning of the version string
+ * by doing two iterations of same loop to lop off two hyphens */
+ for(q = --p; *q && *q != '-'; q--);
+ for(p = --q; *p && *p != '-'; p--);
+ if(*p != '-' || p == tmp) {
+ return(-1);
+ }
+
+ /* copy into fields and return */
+ if(version) {
+ strncpy(version, p+1, PKG_VERSION_LEN);
+ }
+ /* insert a terminator at the end of the name (on hyphen)- then copy it */
+ *p = '\0';
+ if(name) {
+ strncpy(name, tmp, PKG_NAME_LEN);
+ }
+
+ free(tmp);
+ return(0);
+}
+
pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target)
{
struct dirent *ent = NULL;
@@ -142,7 +178,7 @@ pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target)
if(stat(path, &sbuf) || !S_ISDIR(sbuf.st_mode)) {
continue;
}
- STRNCPY(name, ent->d_name, PKG_FULLNAME_LEN);
+ strncpy(name, ent->d_name, PKG_FULLNAME_LEN);
/* truncate the string at the second-to-last hyphen, */
/* which will give us the package name */
if((ptr = rindex(name, '-'))) {
@@ -179,21 +215,25 @@ pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target)
pkg = _alpm_pkg_new(NULL, NULL);
if(pkg == NULL) {
- _alpm_log(PM_LOG_DEBUG, _("db scan could not find package: %s"), target);
+ _alpm_log(PM_LOG_DEBUG, "db scan could not find package: %s\n", target);
return(NULL);
}
- if(_alpm_pkg_splitname(ent->d_name, pkg->name, pkg->version, 0) == -1) {
- _alpm_log(PM_LOG_ERROR, _("invalid name for database entry '%s'"), ent->d_name);
- return(NULL);
+ /* split the db entry name */
+ if(_alpm_db_splitname(ent->d_name, pkg->name, pkg->version) != 0) {
+ _alpm_log(PM_LOG_ERROR, _("invalid name for database entry '%s'\n"),
+ ent->d_name);
+ alpm_pkg_free(pkg);
+ pkg = NULL;
+ continue;
}
/* explicitly read with only 'BASE' data, accessors will handle the rest */
if(_alpm_db_read(db, pkg, INFRQ_BASE) == -1) {
/* TODO removed corrupt entry from the FS here */
- FREEPKG(pkg);
+ _alpm_pkg_free(pkg);
} else {
- pkg->data = db;
pkg->origin = PKG_FROM_CACHE;
+ pkg->origin_data.db = db;
}
}
@@ -206,10 +246,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
struct stat buf;
char path[PATH_MAX+1];
char line[513];
- /*
- alpm_list_t *tmplist;
- char *locale;
- */
ALPM_LOG_FUNC;
@@ -218,12 +254,12 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
if(info == NULL || info->name[0] == 0 || info->version[0] == 0) {
- _alpm_log(PM_LOG_DEBUG, _("invalid package entry provided to _alpm_db_read, skipping"));
+ _alpm_log(PM_LOG_DEBUG, "invalid package entry provided to _alpm_db_read, skipping\n");
return(-1);
}
if(info->origin == PKG_FROM_FILE) {
- _alpm_log(PM_LOG_DEBUG, _("request to read database info for a file-based package '%s', skipping..."), info->name);
+ _alpm_log(PM_LOG_DEBUG, "request to read database info for a file-based package '%s', skipping...\n", info->name);
return(-1);
}
@@ -236,7 +272,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
/* already loaded this info, do nothing */
return(0);
}
- _alpm_log(PM_LOG_FUNCTION, _("loading package data for %s : level=%d"), info->name, inforeq);
+ _alpm_log(PM_LOG_FUNCTION, _("loading package data for %s : level=%d\n"), info->name, inforeq);
/* clear out 'line', to be certain - and to make valgrind happy */
memset(line, 0, 513);
@@ -244,7 +280,8 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
snprintf(path, PATH_MAX, "%s/%s-%s", db->path, info->name, info->version);
if(stat(path, &buf)) {
/* directory doesn't exist or can't be opened */
- _alpm_log(PM_LOG_DEBUG, _("cannot find '%s-%s' in db '%s'"), info->name, info->version, db->treename);
+ _alpm_log(PM_LOG_DEBUG, "cannot find '%s-%s' in db '%s'\n",
+ info->name, info->version, db->treename);
return(-1);
}
@@ -252,7 +289,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
if(inforeq & INFRQ_DESC) {
snprintf(path, PATH_MAX, "%s/%s-%s/desc", db->path, info->name, info->version);
if((fp = fopen(path, "r")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s"), path, strerror(errno));
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
goto error;
}
while(!feof(fp)) {
@@ -273,32 +310,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
if(fgets(info->desc, sizeof(info->desc), fp) == NULL) {
goto error;
}
- /*
- while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
- info->desc_localized = alpm_list_add(info->desc_localized, strdup(line));
- PKG_
- }
-
- if((locale = setlocale(LC_ALL, "")) == NULL) { //To fix segfault when locale invalid
- setenv("LC_ALL", "C", 1);
- locale = setlocale(LC_ALL, "");
- }
-
- if(info->desc_localized && !info->desc_localized->next) {
- snprintf(info->desc, 512, "%s", (char*)info->desc_localized->data);
- } else {
- for (tmplist = info->desc_localized; tmplist; tmplist = tmplist->next) {
- if (tmplist->data && strncmp(tmplist->data, locale, strlen(locale))) {
- strncpy(info->desc, (char *)info->desc_localized->data, sizeof(info->desc));
- } else {
- char *p = (char *)tmplist->data;
- p += strlen(locale) + 1;
- strncpy(info->desc, p, sizeof(info->desc));
- break;
- }
- }
- }
- */
_alpm_strtrim(info->desc);
} else if(!strcmp(line, "%GROUPS%")) {
while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
@@ -319,20 +330,39 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
_alpm_strtrim(info->arch);
} else if(!strcmp(line, "%BUILDDATE%")) {
- if(fgets(info->builddate, sizeof(info->builddate), fp) == NULL) {
+ char tmp[32];
+ if(fgets(tmp, sizeof(tmp), fp) == NULL) {
goto error;
}
- _alpm_strtrim(info->builddate);
- } else if(!strcmp(line, "%BUILDTYPE%")) {
- if(fgets(info->buildtype, sizeof(info->buildtype), fp) == NULL) {
- goto error;
+ _alpm_strtrim(tmp);
+
+ char first = tolower(tmp[0]);
+ if(first > 'a' && first < 'z') {
+ struct tm tmp_tm = {0}; //initialize to null incase of failure
+ setlocale(LC_TIME, "C");
+ strptime(tmp, "%a %b %e %H:%M:%S %Y", &tmp_tm);
+ info->builddate = mktime(&tmp_tm);
+ setlocale(LC_TIME, "");
+ } else {
+ info->builddate = atol(tmp);
}
- _alpm_strtrim(info->buildtype);
} else if(!strcmp(line, "%INSTALLDATE%")) {
- if(fgets(info->installdate, sizeof(info->installdate), fp) == NULL) {
+ char tmp[32];
+ if(fgets(tmp, sizeof(tmp), fp) == NULL) {
goto error;
}
- _alpm_strtrim(info->installdate);
+ _alpm_strtrim(tmp);
+
+ char first = tolower(tmp[0]);
+ if(first > 'a' && first < 'z') {
+ struct tm tmp_tm = {0}; //initialize to null incase of failure
+ setlocale(LC_TIME, "C");
+ strptime(tmp, "%a %b %e %H:%M:%S %Y", &tmp_tm);
+ info->installdate = mktime(&tmp_tm);
+ setlocale(LC_TIME, "");
+ } else {
+ info->installdate = atol(tmp);
+ }
} else if(!strcmp(line, "%PACKAGER%")) {
if(fgets(info->packager, sizeof(info->packager), fp) == NULL) {
goto error;
@@ -357,6 +387,10 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
_alpm_strtrim(tmp);
info->size = atol(tmp);
+ /* also store this value to isize if isize is unset */
+ if(info->isize == 0) {
+ info->isize = atol(tmp);
+ }
} else if(!strcmp(line, "%ISIZE%")) {
/* ISIZE (installed size) tag only appears in sync repositories,
* not the local one. */
@@ -366,12 +400,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
_alpm_strtrim(tmp);
info->isize = atol(tmp);
- } else if(!strcmp(line, "%SHA1SUM%")) {
- /* SHA1SUM tag only appears in sync repositories,
- * not the local one. */
- if(fgets(info->sha1sum, sizeof(info->sha1sum), fp) == NULL) {
- goto error;
- }
} else if(!strcmp(line, "%MD5SUM%")) {
/* MD5SUM tag only appears in sync repositories,
* not the local one. */
@@ -398,7 +426,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
if(inforeq & INFRQ_FILES) {
snprintf(path, PATH_MAX, "%s/%s-%s/files", db->path, info->name, info->version);
if((fp = fopen(path, "r")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s"), path, strerror(errno));
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
goto error;
}
while(fgets(line, 256, fp)) {
@@ -421,7 +449,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
if(inforeq & INFRQ_DEPENDS) {
snprintf(path, PATH_MAX, "%s/%s-%s/depends", db->path, info->name, info->version);
if((fp = fopen(path, "r")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s"), path, strerror(errno));
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
goto error;
}
while(!feof(fp)) {
@@ -429,11 +457,12 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
_alpm_strtrim(line);
if(!strcmp(line, "%DEPENDS%")) {
while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
- info->depends = alpm_list_add(info->depends, strdup(line));
+ pmdepend_t *dep = alpm_splitdep(line);
+ info->depends = alpm_list_add(info->depends, dep);
}
- } else if(!strcmp(line, "%REQUIREDBY%")) {
+ } else if(!strcmp(line, "%OPTDEPENDS%")) {
while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
- info->requiredby = alpm_list_add(info->requiredby, strdup(line));
+ info->optdepends = alpm_list_add(info->optdepends, strdup(line));
}
} else if(!strcmp(line, "%CONFLICTS%")) {
while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
@@ -451,7 +480,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
* not the local one. *
while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
info->replaces = alpm_list_add(info->replaces, strdup(line));
- }
+ }
} else if(!strcmp(line, "%FORCE%")) {
* FORCE tag only appears in sync repositories,
* not the local one. *
@@ -462,6 +491,24 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
fp = NULL;
}
+ /* DELTAS */
+ if(inforeq & INFRQ_DELTAS) {
+ snprintf(path, PATH_MAX, "%s/%s-%s/deltas", db->path, info->name, info->version);
+ if((fp = fopen(path, "r"))) {
+ while(!feof(fp)) {
+ fgets(line, 255, fp);
+ _alpm_strtrim(line);
+ if(!strcmp(line, "%DELTAS%")) {
+ while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
+ info->deltas = alpm_list_add(info->deltas, _alpm_delta_parse(line));
+ }
+ }
+ }
+ fclose(fp);
+ fp = NULL;
+ }
+ }
+
/* INSTALL */
if(inforeq & INFRQ_SCRIPTLET) {
snprintf(path, PATH_MAX, "%s/%s-%s/install", db->path, info->name, info->version);
@@ -509,22 +556,17 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
/* DESC */
if(inforeq & INFRQ_DESC) {
- _alpm_log(PM_LOG_DEBUG, _("writing %s-%s DESC information back to db"), info->name, info->version);
+ _alpm_log(PM_LOG_DEBUG, "writing %s-%s DESC information back to db\n",
+ info->name, info->version);
snprintf(path, PATH_MAX, "%s/%s-%s/desc", db->path, info->name, info->version);
if((fp = fopen(path, "w")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s"), path, strerror(errno));
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
retval = -1;
goto cleanup;
}
fprintf(fp, "%%NAME%%\n%s\n\n"
"%%VERSION%%\n%s\n\n", info->name, info->version);
if(info->desc[0]) {
- /*fputs("%DESC%\n", fp);
- for(lp = info->desc_localized; lp; lp = lp->next) {
- fprintf(fp, "%s\n", (char *)lp->data);
- }
- fprintf(fp, "\n");
- */
fprintf(fp, "%%DESC%%\n"
"%s\n\n", info->desc);
}
@@ -551,17 +593,13 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
fprintf(fp, "%%ARCH%%\n"
"%s\n\n", info->arch);
}
- if(info->builddate[0]) {
+ if(info->builddate) {
fprintf(fp, "%%BUILDDATE%%\n"
- "%s\n\n", info->builddate);
- }
- if(info->buildtype[0]) {
- fprintf(fp, "%%BUILDTYPE%%\n"
- "%s\n\n", info->buildtype);
+ "%ju\n\n", (uintmax_t)info->builddate);
}
- if(info->installdate[0]) {
+ if(info->installdate) {
fprintf(fp, "%%INSTALLDATE%%\n"
- "%s\n\n", info->installdate);
+ "%ju\n\n", (uintmax_t)info->installdate);
}
if(info->packager[0]) {
fprintf(fp, "%%PACKAGER%%\n"
@@ -585,10 +623,7 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
fprintf(fp, "%%ISIZE%%\n"
"%lu\n\n", info->isize);
}
- if(info->sha1sum) {
- fprintf(fp, "%%SHA1SUM%%\n"
- "%s\n\n", info->sha1sum);
- } else if(info->md5sum) {
+ if(info->md5sum) {
fprintf(fp, "%%MD5SUM%%\n"
"%s\n\n", info->md5sum);
}
@@ -599,10 +634,11 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
/* FILES */
if(local && (inforeq & INFRQ_FILES)) {
- _alpm_log(PM_LOG_DEBUG, _("writing %s-%s FILES information back to db"), info->name, info->version);
+ _alpm_log(PM_LOG_DEBUG, "writing %s-%s FILES information back to db\n",
+ info->name, info->version);
snprintf(path, PATH_MAX, "%s/%s-%s/files", db->path, info->name, info->version);
if((fp = fopen(path, "w")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s"), path, strerror(errno));
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
retval = -1;
goto cleanup;
}
@@ -626,23 +662,26 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
/* DEPENDS */
if(inforeq & INFRQ_DEPENDS) {
- _alpm_log(PM_LOG_DEBUG, _("writing %s-%s DEPENDS information back to db"), info->name, info->version);
+ _alpm_log(PM_LOG_DEBUG, "writing %s-%s DEPENDS information back to db\n",
+ info->name, info->version);
snprintf(path, PATH_MAX, "%s/%s-%s/depends", db->path, info->name, info->version);
if((fp = fopen(path, "w")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s"), path, strerror(errno));
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
retval = -1;
goto cleanup;
}
if(info->depends) {
fputs("%DEPENDS%\n", fp);
for(lp = info->depends; lp; lp = lp->next) {
- fprintf(fp, "%s\n", (char *)lp->data);
+ char *depstring = alpm_dep_get_string(lp->data);
+ fprintf(fp, "%s\n", depstring);
+ free(depstring);
}
fprintf(fp, "\n");
}
- if(local && info->requiredby) {
- fputs("%REQUIREDBY%\n", fp);
- for(lp = info->requiredby; lp; lp = lp->next) {
+ if(info->optdepends) {
+ fputs("%OPTDEPENDS%\n", fp);
+ for(lp = info->optdepends; lp; lp = lp->next) {
fprintf(fp, "%s\n", (char *)lp->data);
}
fprintf(fp, "\n");
@@ -709,67 +748,63 @@ int _alpm_db_remove(pmdb_t *db, pmpkg_t *info)
return(0);
}
-/* reads dbpath/.lastupdate and populates *ts with the contents.
- * *ts should be malloc'ed and should be at least 15 bytes.
- *
- * Returns 0 on success, 1 on error
- *
+/*
+ * Return the last update time as number of seconds from the epoch.
+ * Returns 0 if the value is unknown or can't be read.
*/
-int _alpm_db_getlastupdate(pmdb_t *db, char *ts)
+time_t _alpm_db_getlastupdate(const pmdb_t *db)
{
FILE *fp;
char file[PATH_MAX];
+ time_t ret = 0;
ALPM_LOG_FUNC;
- if(db == NULL || ts == NULL) {
- return(-1);
+ if(db == NULL) {
+ return(ret);
}
- snprintf(file, PATH_MAX, "%s%s.lastupdate", handle->root, db->path);
+ snprintf(file, PATH_MAX, "%s.lastupdate", db->path);
/* get the last update time, if it's there */
if((fp = fopen(file, "r")) == NULL) {
- return(-1);
+ return(ret);
} else {
- char line[256];
+ char line[64];
if(fgets(line, sizeof(line), fp)) {
- STRNCPY(ts, line, 15); /* YYYYMMDDHHMMSS */
- ts[14] = '\0';
- } else {
- fclose(fp);
- return(-1);
+ ret = atol(line);
}
}
fclose(fp);
- return(0);
+ return(ret);
}
-/* writes the dbpath/.lastupdate with the contents of *ts
+/*
+ * writes the dbpath/.lastupdate file with the value in time
*/
-int _alpm_db_setlastupdate(pmdb_t *db, char *ts)
+int _alpm_db_setlastupdate(const pmdb_t *db, time_t time)
{
FILE *fp;
char file[PATH_MAX];
+ int ret = 0;
ALPM_LOG_FUNC;
- if(db == NULL || ts == NULL || strlen(ts) == 0) {
+ if(db == NULL || time == 0) {
return(-1);
}
- snprintf(file, PATH_MAX, "%s%s.lastupdate", handle->root, db->path);
+ snprintf(file, PATH_MAX, "%s.lastupdate", db->path);
if((fp = fopen(file, "w")) == NULL) {
return(-1);
}
- if(fputs(ts, fp) <= 0) {
- fclose(fp);
- return(-1);
+ if(fprintf(fp, "%ju", (uintmax_t)time) <= 0) {
+ ret = -1;
}
fclose(fp);
- return(0);
+ return(ret);
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
index ed893470..1da65a49 100644
--- a/lib/libalpm/cache.c
+++ b/lib/libalpm/cache.c
@@ -1,8 +1,8 @@
/*
* cache.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -26,8 +26,6 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
-#include <sys/stat.h>
-#include <libintl.h>
/* libalpm */
#include "cache.h"
@@ -56,15 +54,15 @@ int _alpm_db_load_pkgcache(pmdb_t *db)
_alpm_db_free_pkgcache(db);
- _alpm_log(PM_LOG_DEBUG, _("loading package cache for repository '%s'"),
+ _alpm_log(PM_LOG_DEBUG, "loading package cache for repository '%s'\n",
db->treename);
_alpm_db_rewind(db);
while((info = _alpm_db_scan(db, NULL)) != NULL) {
- _alpm_log(PM_LOG_FUNCTION, _("adding '%s' to package cache for db '%s'"),
+ _alpm_log(PM_LOG_FUNCTION, _("adding '%s' to package cache for db '%s'\n"),
alpm_pkg_get_name(info), db->treename);
info->origin = PKG_FROM_CACHE;
- info->data = db;
+ info->origin_data.db = db;
/* add to the collection */
db->pkgcache = alpm_list_add(db->pkgcache, info);
count++;
@@ -82,10 +80,15 @@ void _alpm_db_free_pkgcache(pmdb_t *db)
return;
}
- _alpm_log(PM_LOG_DEBUG, _("freeing package cache for repository '%s'"),
+ _alpm_log(PM_LOG_DEBUG, "freeing package cache for repository '%s'\n",
db->treename);
- FREELISTPKGS(db->pkgcache);
+ alpm_list_t *tmp;
+ for(tmp = db->pkgcache; tmp; tmp = alpm_list_next(tmp)) {
+ _alpm_pkg_free(tmp->data);
+ }
+ alpm_list_free(db->pkgcache);
+ db->pkgcache = NULL;
if(db->grpcache) {
_alpm_db_free_grpcache(db);
@@ -106,7 +109,7 @@ alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db)
/* hmmm, still NULL ?*/
if(!db->pkgcache) {
- _alpm_log(PM_LOG_DEBUG, _("error: pkgcache is NULL for db '%s'"), db->treename);
+ _alpm_log(PM_LOG_DEBUG, "error: pkgcache is NULL for db '%s'\n", db->treename);
}
return(db->pkgcache);
@@ -126,7 +129,7 @@ int _alpm_db_add_pkgincache(pmdb_t *db, pmpkg_t *pkg)
if(newpkg == NULL) {
return(-1);
}
- _alpm_log(PM_LOG_DEBUG, _("adding entry '%s' in '%s' cache"),
+ _alpm_log(PM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n",
alpm_pkg_get_name(newpkg), db->treename);
db->pkgcache = alpm_list_add_sorted(db->pkgcache, newpkg, _alpm_pkg_cmp);
@@ -146,19 +149,19 @@ int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg)
return(-1);
}
- _alpm_log(PM_LOG_DEBUG, _("removing entry '%s' from '%s' cache"),
+ _alpm_log(PM_LOG_DEBUG, "removing entry '%s' from '%s' cache\n",
alpm_pkg_get_name(pkg), db->treename);
db->pkgcache = alpm_list_remove(db->pkgcache, pkg, _alpm_pkg_cmp, &vdata);
data = vdata;
if(data == NULL) {
/* package not found */
- _alpm_log(PM_LOG_DEBUG, _("cannot remove entry '%s' from '%s' cache: not found"),
+ _alpm_log(PM_LOG_DEBUG, "cannot remove entry '%s' from '%s' cache: not found\n",
alpm_pkg_get_name(pkg), db->treename);
return(-1);
}
- FREEPKG(data);
+ _alpm_pkg_free(data);
_alpm_db_free_grpcache(db);
@@ -175,7 +178,8 @@ pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, const char *target)
alpm_list_t *pkgcache = _alpm_db_get_pkgcache(db);
if(!pkgcache) {
- _alpm_log(PM_LOG_DEBUG, _("error: failed to get '%s' from NULL pkgcache"), target);
+ _alpm_log(PM_LOG_DEBUG, "error: failed to get '%s' from NULL pkgcache\n",
+ target);
return(NULL);
}
@@ -198,10 +202,11 @@ int _alpm_db_load_grpcache(pmdb_t *db)
_alpm_db_load_pkgcache(db);
}
- _alpm_log(PM_LOG_DEBUG, _("loading group cache for repository '%s'"), db->treename);
+ _alpm_log(PM_LOG_DEBUG, "loading group cache for repository '%s'\n",
+ db->treename);
for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
- alpm_list_t *i;
+ const alpm_list_t *i;
pmpkg_t *pkg = lp->data;
for(i = alpm_pkg_get_groups(pkg); i; i = i->next) {
@@ -251,8 +256,10 @@ void _alpm_db_free_grpcache(pmdb_t *db)
for(lg = db->grpcache; lg; lg = lg->next) {
pmgrp_t *grp = lg->data;
- FREELISTPTR(grp->packages);
- FREEGRP(lg->data);
+ alpm_list_free(grp->packages);
+ grp->packages = NULL;
+ _alpm_grp_free(lg->data);
+ lg->data = NULL;
}
FREELIST(db->grpcache);
}
diff --git a/lib/libalpm/cache.h b/lib/libalpm/cache.h
index fa1fef32..2526afac 100644
--- a/lib/libalpm/cache.h
+++ b/lib/libalpm/cache.h
@@ -1,8 +1,8 @@
/*
* cache.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_CACHE_H
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 3ab4ee71..7b21c38a 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -1,12 +1,12 @@
/*
* conflict.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
* Copyright (c) 2006 by Christian Hamar <krics@linuxforum.hu>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -19,7 +19,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -30,11 +30,7 @@
#include <unistd.h>
#include <string.h>
#include <limits.h>
-#if defined(__APPLE__) || defined(__OpenBSD__)
-#include <sys/syslimits.h>
-#endif
#include <sys/stat.h>
-#include <libintl.h>
/* libalpm */
#include "conflict.h"
@@ -47,191 +43,145 @@
#include "cache.h"
#include "deps.h"
-
-/** See if potential conflict 'name' matches package 'pkg'.
- * @param target the name of the parent package we're checking
- * @param depname the name of the dependency we're checking
- * @param pkg the package to check
- * @param conflict the name of the possible conflict
- * @return A depmissing struct indicating the conflict
- * @note The first two paramters are here to simplify the addition
- * of new 'depmiss' objects.
- *
- * TODO WTF is a 'depmissing' doing indicating a conflict??
- */
-static pmdepmissing_t *does_conflict(const char *target, const char *depname,
- pmpkg_t *pkg, const char *conflict)
-{
- alpm_list_t *i;
-
- /* check the actual package name, easy */
- if(strcmp(alpm_pkg_get_name(pkg), conflict) == 0) {
- _alpm_log(PM_LOG_DEBUG, _(" found conflict '%s' : package '%s'"), conflict, target);
- return(_alpm_depmiss_new(target, PM_DEP_TYPE_CONFLICT,
- PM_DEP_MOD_ANY, depname, NULL));
- } else {
- /* check what this package provides, harder */
- for(i = alpm_pkg_get_provides(pkg); i; i = i->next) {
- const char *provision = i->data;
-
- if(strcmp(provision, conflict) == 0) {
- _alpm_log(PM_LOG_DEBUG, _(" found conflict '%s' : package '%s' provides '%s'"),
- conflict, target, provision);
- return(_alpm_depmiss_new(target, PM_DEP_TYPE_CONFLICT,
- PM_DEP_MOD_ANY, depname, NULL));
- }
- }
- }
- return(NULL); /* not a conflict */
-}
-
-static alpm_list_t *chk_pkg_vs_db(alpm_list_t *baddeps, pmpkg_t *pkg, pmdb_t *db)
+pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2)
{
- pmdepmissing_t *miss = NULL;
- const char *pkgname;
- alpm_list_t *i, *j;
+ pmconflict_t *conflict;
- pkgname = alpm_pkg_get_name(pkg);
+ ALPM_LOG_FUNC;
- for(i = alpm_pkg_get_conflicts(pkg); i; i = i->next) {
- const char *conflict = i->data;
+ MALLOC(conflict, sizeof(pmconflict_t), RET_ERR(PM_ERR_MEMORY, NULL));
- if(strcmp(pkgname, conflict) == 0) {
- /* a package cannot conflict with itself -- that's just not nice */
- _alpm_log(PM_LOG_DEBUG, _("package '%s' conflicts with itself - packaging error"),
- pkgname);
- continue;
- }
+ strncpy(conflict->package1, package1, PKG_NAME_LEN);
+ strncpy(conflict->package2, package2, PKG_NAME_LEN);
- /* CHECK 1: check targets against database */
- _alpm_log(PM_LOG_DEBUG, _("checkconflicts: target '%s' vs db"), pkgname);
+ return(conflict);
+}
- for(j = _alpm_db_get_pkgcache(db); j; j = j->next) {
- pmpkg_t *dbpkg = j->data;
+int _alpm_conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
+{
+ alpm_list_t *i;
- if(strcmp(alpm_pkg_get_name(dbpkg), pkgname) == 0) {
- /* skip the package we're currently processing */
- continue;
- }
+ ALPM_LOG_FUNC;
- miss = does_conflict(pkgname, alpm_pkg_get_name(dbpkg), dbpkg, conflict);
- if(miss && !_alpm_depmiss_isin(miss, baddeps)) {
- baddeps = alpm_list_add(baddeps, miss);
- } else {
- FREE(miss);
- }
+ for(i = haystack; i; i = i->next) {
+ pmconflict_t *conflict = i->data;
+ char *cpkg1 = conflict->package1;
+ char *cpkg2 = conflict->package2;
+ char *npkg1 = needle->package1;
+ char *npkg2 = needle->package2;
+ if((!strcmp(cpkg1, npkg1) && !strcmp(cpkg2, npkg2))
+ || (!strcmp(cpkg1, npkg2) && !strcmp(cpkg2, npkg1))) {
+ return(1);
}
}
- return(baddeps);
+
+ return(0);
}
-static alpm_list_t *chk_pkg_vs_targets(alpm_list_t *baddeps,
- pmpkg_t *pkg, pmdb_t *db,
- alpm_list_t *targets)
+/** Check if pkg1 conflicts with pkg2
+ * @param pkg1 package we are looking at
+ * @param conflict name of the possible conflict
+ * @param pkg2 package to check
+ * @return 0 for no conflict, non-zero otherwise
+ */
+static int does_conflict(pmpkg_t *pkg1, const char *conflict, pmpkg_t *pkg2)
{
- pmdepmissing_t *miss = NULL;
- const char *pkgname;
- alpm_list_t *i, *j;
+ const char *pkg1name = alpm_pkg_get_name(pkg1);
+ const char *pkg2name = alpm_pkg_get_name(pkg2);
+ pmdepend_t *conf = alpm_splitdep(conflict);
+ int match = 0;
+
+ match = alpm_depcmp(pkg2, conf);
+ if(match) {
+ _alpm_log(PM_LOG_DEBUG, "package %s conflicts with %s (by %s)\n",
+ pkg1name, pkg2name, conflict);
+ }
+ FREE(conf);
+ return(match);
+}
- pkgname = alpm_pkg_get_name(pkg);
+/** Adds the pkg1/pkg2 conflict to the baddeps list
+ * @param *baddeps list to add conflict to
+ * @param pkg1 first package
+ * @param pkg2 package causing conflict
+ */
+static void add_conflict(alpm_list_t **baddeps, const char *pkg1,
+ const char *pkg2)
+{
+ pmconflict_t *conflict = _alpm_conflict_new(pkg1, pkg2);
+ if(conflict && !_alpm_conflict_isin(conflict, *baddeps)) {
+ *baddeps = alpm_list_add(*baddeps, conflict);
+ } else {
+ FREE(conflict);
+ }
+}
- for(i = alpm_pkg_get_conflicts(pkg); i; i = i->next) {
- const char *conflict = i->data;
+/** Check if packages from list1 conflict with packages from list2.
+ * This looks at the conflicts fields of all packages from list1, and sees
+ * if they match packages from list2.
+ * If a conflict (pkg1, pkg2) is found, it is added to the baddeps list
+ * in this order if order >= 0, or reverse order (pkg2,pkg1) otherwise.
+ *
+ * @param list1 first list of packages
+ * @param list2 second list of packages
+ * @param *baddeps list to store conflicts
+ * @param order if >= 0 the conflict order is preserved, if < 0 it's reversed
+ */
+static void check_conflict(alpm_list_t *list1, alpm_list_t *list2,
+ alpm_list_t **baddeps, int order) {
+ alpm_list_t *i, *j, *k;
- if(strcmp(pkgname, conflict) == 0) {
- /* a package cannot conflict with itself -- that's just not nice */
- _alpm_log(PM_LOG_DEBUG, _("package '%s' conflicts with itself - packaging error"),
- pkgname);
- continue;
- }
+ if(!baddeps) {
+ return;
+ }
+ for(i = list1; i; i = i->next) {
+ pmpkg_t *pkg1 = i->data;
+ const char *pkg1name = alpm_pkg_get_name(pkg1);
- /* CHECK 2: check targets against targets */
- _alpm_log(PM_LOG_DEBUG, _("checkconflicts: target '%s' vs all targets"), pkgname);
+ for(j = alpm_pkg_get_conflicts(pkg1); j; j = j->next) {
+ const char *conflict = j->data;
- for(j = targets; j; j = j->next) {
- const char *targetname;
- pmpkg_t *target = j->data;
- targetname = alpm_pkg_get_name(target);
+ for(k = list2; k; k = k->next) {
+ pmpkg_t *pkg2 = k->data;
+ const char *pkg2name = alpm_pkg_get_name(pkg2);
- if(strcmp(targetname, pkgname) == 0) {
- /* skip the package we're currently processing */
- continue;
- }
+ if(strcmp(pkg1name, pkg2name) == 0) {
+ /* skip the package we're currently processing */
+ continue;
+ }
- miss = does_conflict(pkgname, targetname, target, conflict);
- if(miss && !_alpm_depmiss_isin(miss, baddeps)) {
- baddeps = alpm_list_add(baddeps, miss);
- } else {
- FREE(miss);
+ if(does_conflict(pkg1, conflict, pkg2)) {
+ if(order >= 0) {
+ add_conflict(baddeps, pkg1name, pkg2name);
+ } else {
+ add_conflict(baddeps, pkg2name, pkg1name);
+ }
+ }
}
}
}
- return(baddeps);
}
-static alpm_list_t *chk_db_vs_targets(alpm_list_t *baddeps, pmpkg_t *pkg,
- pmdb_t *db, alpm_list_t *targets)
+/* Check for inter-conflicts */
+alpm_list_t *_alpm_innerconflicts(alpm_list_t *packages)
{
- pmdepmissing_t *miss = NULL;
- const char *pkgname;
- alpm_list_t *i, *j;
+ alpm_list_t *baddeps = NULL;
- pkgname = alpm_pkg_get_name(pkg);
-
- _alpm_log(PM_LOG_DEBUG, _("checkconflicts: db vs target '%s'"), pkgname);
-
- for(i = _alpm_db_get_pkgcache(db); i; i = i->next) {
- alpm_list_t *conflicts = NULL;
- const char *dbpkgname;
-
- pmpkg_t *dbpkg = i->data;
- dbpkgname = alpm_pkg_get_name(dbpkg);
-
- if(strcmp(dbpkgname, pkgname) == 0) {
- /* skip the package we're currently processing */
- continue;
- }
-
- /* is this db package in the targets? if so use the
- * new package's conflict list to pick up new changes */
- int use_newconflicts = 0;
- for(j = targets; j; j = j->next) {
- pmpkg_t *targ = j->data;
- if(strcmp(alpm_pkg_get_name(targ), dbpkgname) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("target '%s' is also in target list, using NEW conflicts"),
- dbpkgname);
- conflicts = alpm_pkg_get_conflicts(targ);
- use_newconflicts = 1;
- break;
- }
- }
- /* if we didn't find newer conflicts, use the original list */
- if(!use_newconflicts) {
- conflicts = alpm_pkg_get_conflicts(dbpkg);
- }
-
- for(j = conflicts; j; j = j->next) {
- const char *conflict = j->data;
+ ALPM_LOG_FUNC;
+ _alpm_log(PM_LOG_DEBUG, "check targets vs targets\n");
+ check_conflict(packages, packages, &baddeps, 0);
- miss = does_conflict(pkgname, dbpkgname, pkg, conflict);
- if(miss && !_alpm_depmiss_isin(miss, baddeps)) {
- baddeps = alpm_list_add(baddeps, miss);
- } else {
- FREE(miss);
- }
- }
- }
return(baddeps);
}
-/* Returns a alpm_list_t* of pmdepmissing_t pointers.
- *
- * conflicts are always name only
+/* Check for target vs (db - target) conflicts
+ * In case of conflict the package1 field of pmdepconflict_t contains
+ * the target package, package2 field contains the local package
*/
-alpm_list_t *_alpm_checkconflicts(pmdb_t *db, alpm_list_t *packages)
+alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages)
{
- alpm_list_t *i, *baddeps = NULL;
+ alpm_list_t *baddeps = NULL;
ALPM_LOG_FUNC;
@@ -239,27 +189,23 @@ alpm_list_t *_alpm_checkconflicts(pmdb_t *db, alpm_list_t *packages)
return(NULL);
}
- for(i = packages; i; i = i->next) {
- pmpkg_t *pkg = i->data;
- if(pkg == NULL) {
- continue;
- }
-
- /* run three different conflict checks on each package */
- baddeps = chk_pkg_vs_db(baddeps, pkg, db);
- baddeps = chk_pkg_vs_targets(baddeps, pkg, db, packages);
- baddeps = chk_db_vs_targets(baddeps, pkg, db, packages);
- }
+ alpm_list_t *dblist = alpm_list_diff(_alpm_db_get_pkgcache(db), packages,
+ _alpm_pkg_cmp);
- /* debug loop */
- for(i = baddeps; i; i = i->next) {
- pmdepmissing_t *miss = i->data;
- _alpm_log(PM_LOG_DEBUG, _("\tCONFLICTS:: %s conflicts with %s"), miss->target, miss->depend.name);
- }
+ /* two checks to be done here for conflicts */
+ _alpm_log(PM_LOG_DEBUG, "check targets vs db\n");
+ check_conflict(packages, dblist, &baddeps, 1);
+ _alpm_log(PM_LOG_DEBUG, "check db vs targets\n");
+ check_conflict(dblist, packages, &baddeps, -1);
+ alpm_list_free(dblist);
return(baddeps);
}
+/* Check for transaction conflicts */
+alpm_list_t *_alpm_checkconflicts(pmdb_t *db, alpm_list_t *packages) {
+ return(alpm_list_join(_alpm_innerconflicts(packages), _alpm_outerconflicts(db, packages)));
+}
/* Returns a alpm_list_t* of file conflicts.
* Hooray for set-intersects!
@@ -335,32 +281,29 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB)
return(ret);
}
-/* Adds pmconflict_t to a conflicts list. Pass the conflicts list, type (either
- * PM_CONFLICT_TYPE_TARGET or PM_CONFLICT_TYPE_FILE), a file string, and either
+/* Adds pmfileconflict_t to a conflicts list. Pass the conflicts list, type (either
+ * PM_FILECONFLICT_TARGET or PM_FILECONFLICT_FILESYSTEM), a file string, and either
* two package names or one package name and NULL. This is a wrapper for former
* functionality that was done inline.
*/
static alpm_list_t *add_fileconflict(alpm_list_t *conflicts,
- pmconflicttype_t type, const char *filestr,
+ pmfileconflicttype_t type, const char *filestr,
const char* name1, const char* name2)
{
- pmconflict_t *conflict = malloc(sizeof(pmconflict_t));
- if(conflict == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"),
- sizeof(pmconflict_t));
- return(conflicts);
- }
+ pmfileconflict_t *conflict;
+ MALLOC(conflict, sizeof(pmfileconflict_t), return(conflicts));
+
conflict->type = type;
- STRNCPY(conflict->target, name1, PKG_NAME_LEN);
- STRNCPY(conflict->file, filestr, CONFLICT_FILE_LEN);
+ strncpy(conflict->target, name1, PKG_NAME_LEN);
+ strncpy(conflict->file, filestr, CONFLICT_FILE_LEN);
if(name2) {
- STRNCPY(conflict->ctarget, name2, PKG_NAME_LEN);
+ strncpy(conflict->ctarget, name2, PKG_NAME_LEN);
} else {
conflict->ctarget[0] = '\0';
}
conflicts = alpm_list_add(conflicts, conflict);
- _alpm_log(PM_LOG_DEBUG, "found file conflict %s, packages %s and %s",
+ _alpm_log(PM_LOG_DEBUG, "found file conflict %s, packages %s and %s\n",
filestr, name1, name2 ? name2 : "(filesystem)");
return(conflicts);
@@ -369,11 +312,12 @@ static alpm_list_t *add_fileconflict(alpm_list_t *conflicts,
/* Find file conflicts that may occur during the transaction with two checks:
* 1: check every target against every target
* 2: check every target against the filesystem */
-alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
+alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans, char *root)
{
alpm_list_t *i, *conflicts = NULL;
alpm_list_t *targets = trans->packages;
int numtargs = alpm_list_count(targets);
+ int current;
ALPM_LOG_FUNC;
@@ -381,7 +325,11 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
return(NULL);
}
- for(i = targets; i; i = i->next) {
+ /* TODO this whole function needs a huge change, which hopefully will
+ * be possible with real transactions. Right now we only do half as much
+ * here as we do when we actually extract files in add.c with our 12
+ * different cases. */
+ for(current = 1, i = targets; i; i = i->next, current++) {
alpm_list_t *j, *k, *tmpfiles = NULL;
pmpkg_t *p1, *p2, *dbpkg;
char path[PATH_MAX+1];
@@ -391,37 +339,35 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
continue;
}
- double percent = (double)(alpm_list_count(targets) - alpm_list_count(i) + 1)
- / alpm_list_count(targets);
+ double percent = (double)current / numtargs;
PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", (percent * 100),
- numtargs, (numtargs - alpm_list_count(i) +1));
+ numtargs, current);
/* CHECK 1: check every target against every target */
for(j = i->next; j; j = j->next) {
p2 = j->data;
if(!p2) {
continue;
}
- _alpm_log(PM_LOG_DEBUG, "searching for file conflicts: %s and %s",
+ _alpm_log(PM_LOG_DEBUG, "searching for file conflicts: %s and %s\n",
alpm_pkg_get_name(p1), alpm_pkg_get_name(p2));
tmpfiles = chk_fileconflicts(alpm_pkg_get_files(p1), alpm_pkg_get_files(p2));
if(tmpfiles) {
for(k = tmpfiles; k; k = k->next) {
snprintf(path, PATH_MAX, "%s%s", root, (char *)k->data);
- conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_TARGET, path,
+ conflicts = add_fileconflict(conflicts, PM_FILECONFLICT_TARGET, path,
alpm_pkg_get_name(p1), alpm_pkg_get_name(p2));
}
- alpm_list_free_inner(tmpfiles, &free);
- alpm_list_free(tmpfiles);
+ FREELIST(tmpfiles);
}
}
/* declarations for second check */
- struct stat buf;
+ struct stat lsbuf, sbuf;
char *filestr = NULL;
/* CHECK 2: check every target against the filesystem */
- _alpm_log(PM_LOG_DEBUG, "searching for filesystem conflicts: %s", p1->name);
+ _alpm_log(PM_LOG_DEBUG, "searching for filesystem conflicts: %s\n", p1->name);
dbpkg = _alpm_db_get_pkgfromcache(db, p1->name);
/* Do two different checks here. f the package is currently installed,
@@ -441,22 +387,31 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
snprintf(path, PATH_MAX, "%s%s", root, filestr);
- /* stat the file - if it exists and is not a dir, do some checks */
- if(lstat(path, &buf) == 0 && !S_ISDIR(buf.st_mode)) {
- _alpm_log(PM_LOG_DEBUG, "checking possible conflict: %s", path);
+ /* stat the file - if it exists, do some checks */
+ if(_alpm_lstat(path, &lsbuf) != 0) {
+ continue;
+ }
+ stat(path, &sbuf);
+
+ if(S_ISDIR(lsbuf.st_mode)) {
+ _alpm_log(PM_LOG_DEBUG, "%s is a directory, not a conflict\n", path);
+ } else if(S_ISLNK(lsbuf.st_mode) && S_ISDIR(sbuf.st_mode)) {
+ _alpm_log(PM_LOG_DEBUG, "%s is a symlink to a dir, hopefully not a conflict\n", path);
+ } else {
+ _alpm_log(PM_LOG_DEBUG, "checking possible conflict: %s\n", path);
/* Make sure the possible conflict is not a symlink that points to a
* path in the old package. This is kind of dirty with inode usage */
+ /* TODO this seems ripe for a cleanup */
if(dbpkg) {
- struct stat buf2;
+ struct stat pkgbuf;
char str[PATH_MAX+1];
unsigned ok = 0;
for(k = dbpkg->files; k; k = k->next) {
snprintf(str, PATH_MAX, "%s%s", root, (char*)k->data);
- lstat(str, &buf2);
- if(buf.st_ino == buf2.st_ino) {
+ if(!_alpm_lstat(str, &pkgbuf) && lsbuf.st_ino == pkgbuf.st_ino) {
ok = 1;
- _alpm_log(PM_LOG_DEBUG, "conflict was a symlink: %s", path);
+ _alpm_log(PM_LOG_DEBUG, "conflict was a symlink: %s\n", path);
break;
}
}
@@ -487,7 +442,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
/* keep file intact if it is in backup array */
trans->skip_add = alpm_list_add(trans->skip_add, strdup(path));
trans->skip_remove = alpm_list_add(trans->skip_remove, strdup(path));
- _alpm_log(PM_LOG_DEBUG, "file in backup array, adding to add and remove skiplist: %s", filestr);
+ _alpm_log(PM_LOG_DEBUG, "file in backup array, adding to add and remove skiplist: %s\n", filestr);
resolved_conflict = 1;
break;
} else {
@@ -495,29 +450,48 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
* package from removing the file when it was already installed
* by its new owner */
trans->skip_remove = alpm_list_add(trans->skip_remove, strdup(path));
- _alpm_log(PM_LOG_DEBUG, "file changed packages, adding to remove skiplist: %s", filestr);
+ _alpm_log(PM_LOG_DEBUG, "file changed packages, adding to remove skiplist: %s\n", filestr);
resolved_conflict = 1;
break;
}
}
}
if(!resolved_conflict) {
- _alpm_log(PM_LOG_DEBUG, "file found in conflict: %s", path);
- conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_FILE,
+ _alpm_log(PM_LOG_DEBUG, "file found in conflict: %s\n", path);
+ conflicts = add_fileconflict(conflicts, PM_FILECONFLICT_FILESYSTEM,
path, p1->name, NULL);
}
- } else {
- _alpm_log(PM_LOG_DEBUG, "%s is a directory, not a conflict", path);
}
}
- alpm_list_free_inner(tmpfiles, &free);
- alpm_list_free(tmpfiles);
+ FREELIST(tmpfiles);
}
return(conflicts);
}
-const char SYMEXPORT *alpm_conflict_get_target(pmconflict_t *conflict)
+const char SYMEXPORT *alpm_conflict_get_package1(pmconflict_t *conflict)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(conflict != NULL, return(NULL));
+
+ return conflict->package1;
+}
+
+const char SYMEXPORT *alpm_conflict_get_package2(pmconflict_t *conflict)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(conflict != NULL, return(NULL));
+
+ return conflict->package2;
+}
+
+const char SYMEXPORT *alpm_fileconflict_get_target(pmfileconflict_t *conflict)
{
ALPM_LOG_FUNC;
@@ -528,7 +502,7 @@ const char SYMEXPORT *alpm_conflict_get_target(pmconflict_t *conflict)
return conflict->target;
}
-pmconflicttype_t SYMEXPORT alpm_conflict_get_type(pmconflict_t *conflict)
+pmfileconflicttype_t SYMEXPORT alpm_fileconflict_get_type(pmfileconflict_t *conflict)
{
ALPM_LOG_FUNC;
@@ -539,7 +513,7 @@ pmconflicttype_t SYMEXPORT alpm_conflict_get_type(pmconflict_t *conflict)
return conflict->type;
}
-const char SYMEXPORT *alpm_conflict_get_file(pmconflict_t *conflict)
+const char SYMEXPORT *alpm_fileconflict_get_file(pmfileconflict_t *conflict)
{
ALPM_LOG_FUNC;
@@ -550,7 +524,7 @@ const char SYMEXPORT *alpm_conflict_get_file(pmconflict_t *conflict)
return conflict->file;
}
-const char SYMEXPORT *alpm_conflict_get_ctarget(pmconflict_t *conflict)
+const char SYMEXPORT *alpm_fileconflict_get_ctarget(pmfileconflict_t *conflict)
{
ALPM_LOG_FUNC;
diff --git a/lib/libalpm/conflict.h b/lib/libalpm/conflict.h
index 8928de86..00a593e9 100644
--- a/lib/libalpm/conflict.h
+++ b/lib/libalpm/conflict.h
@@ -1,8 +1,8 @@
/*
* conflict.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_CONFLICT_H
@@ -28,14 +28,23 @@
#define CONFLICT_FILE_LEN 512
struct __pmconflict_t {
+ char package1[PKG_NAME_LEN];
+ char package2[PKG_NAME_LEN];
+};
+
+struct __pmfileconflict_t {
char target[PKG_NAME_LEN];
- pmconflicttype_t type;
+ pmfileconflicttype_t type;
char file[CONFLICT_FILE_LEN];
char ctarget[PKG_NAME_LEN];
};
+pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2);
+int _alpm_conflict_isin(pmconflict_t *needle, alpm_list_t *haystack);
+alpm_list_t *_alpm_innerconflicts(alpm_list_t *packages);
+alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages);
alpm_list_t *_alpm_checkconflicts(pmdb_t *db, alpm_list_t *packages);
-alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root);
+alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans, char *root);
#endif /* _ALPM_CONFLICT_H */
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 148c32dc..b772adde 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -1,12 +1,12 @@
/*
* db.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -19,7 +19,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -30,17 +30,11 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
+#include <stdint.h> /* uintmax_t */
#include <sys/stat.h>
-#if defined(__APPLE__) || defined(__OpenBSD__)
-#include <sys/syslimits.h>
-#include <sys/stat.h>
-#endif
#include <dirent.h>
-#include <libintl.h>
#include <regex.h>
-#ifdef CYGWIN
-#include <limits.h> /* PATH_MAX */
-#endif
+#include <time.h>
/* libalpm */
#include "db.h"
@@ -53,38 +47,425 @@
#include "cache.h"
#include "alpm.h"
-pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename)
+/** \addtogroup alpm_databases Database Functions
+ * @brief Functions to query and manipulate the database of libalpm
+ * @{
+ */
+
+/** Register a sync database of packages.
+ * @param treename the name of the sync repository
+ * @return a pmdb_t* on success (the value), NULL on error
+ */
+pmdb_t SYMEXPORT *alpm_db_register_sync(const char *treename)
{
- pmdb_t *db;
+ ALPM_LOG_FUNC;
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, NULL));
+ ASSERT(treename != NULL && strlen(treename) != 0, RET_ERR(PM_ERR_WRONG_ARGS, NULL));
+ /* Do not register a database if a transaction is on-going */
+ ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, NULL));
+
+ return(_alpm_db_register_sync(treename));
+}
+
+/** Register the local package database.
+ * @return a pmdb_t* representing the local database, or NULL on error
+ */
+pmdb_t SYMEXPORT *alpm_db_register_local(void)
+{
ALPM_LOG_FUNC;
- db = calloc(1, sizeof(pmdb_t));
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, NULL));
+ /* Do not register a database if a transaction is on-going */
+ ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, NULL));
+
+ return(_alpm_db_register_local());
+}
+
+/* Helper function for alpm_db_unregister{_all} */
+static void _alpm_db_unregister(pmdb_t *db)
+{
if(db == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failed: could not allocate %d bytes"),
- sizeof(pmdb_t));
- RET_ERR(PM_ERR_MEMORY, NULL);
+ return;
+ }
+
+ _alpm_log(PM_LOG_DEBUG, "closing database '%s'\n", db->treename);
+ _alpm_db_close(db);
+
+ _alpm_log(PM_LOG_DEBUG, "unregistering database '%s'\n", db->treename);
+ _alpm_db_free(db);
+}
+
+/** Unregister all package databases
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_db_unregister_all(void)
+{
+ alpm_list_t *i;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ /* Do not unregister a database if a transaction is on-going */
+ ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
+
+ /* close local database */
+ _alpm_db_unregister(handle->db_local);
+ handle->db_local = NULL;
+
+ /* and also sync ones */
+ for(i = handle->dbs_sync; i; i = i->next) {
+ pmdb_t *db = i->data;
+ _alpm_db_unregister(db);
+ i->data = NULL;
+ }
+ FREELIST(handle->dbs_sync);
+ return(0);
+}
+
+/** Unregister a package database
+ * @param db pointer to the package database to unregister
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_db_unregister(pmdb_t *db)
+{
+ int found = 0;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ ASSERT(db != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
+ /* Do not unregister a database if a transaction is on-going */
+ ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
+
+ if(db == handle->db_local) {
+ handle->db_local = NULL;
+ found = 1;
+ } else {
+ /* Warning : this function shouldn't be used to unregister all sync
+ * databases by walking through the list returned by
+ * alpm_option_get_syncdbs, because the db is removed from that list here.
+ */
+ void *data;
+ handle->dbs_sync = alpm_list_remove(handle->dbs_sync,
+ db, _alpm_db_cmp, &data);
+ if(data) {
+ found = 1;
+ }
+ }
+
+ if(!found) {
+ RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
+ }
+
+ _alpm_db_unregister(db);
+ return(0);
+}
+
+/** Set the serverlist of a database.
+ * @param db database pointer
+ * @param url url of the server
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_db_setserver(pmdb_t *db, const char *url)
+{
+ alpm_list_t *i;
+ int found = 0;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
+
+ for(i = handle->dbs_sync; i && !found; i = i->next) {
+ pmdb_t *sdb = i->data;
+ if(strcmp(db->treename, sdb->treename) == 0) {
+ found = 1;
+ }
+ }
+ if(!found) {
+ RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
+ }
+
+ if(url && strlen(url)) {
+ pmserver_t *server;
+ if((server = _alpm_server_new(url)) == NULL) {
+ /* pm_errno is set by _alpm_server_new */
+ return(-1);
+ }
+ db->servers = alpm_list_add(db->servers, server);
+ _alpm_log(PM_LOG_DEBUG, "adding new server to database '%s': protocol '%s', server '%s', path '%s'\n",
+ db->treename, server->s_url->scheme, server->s_url->host, server->s_url->doc);
+ } else {
+ FREELIST(db->servers);
+ _alpm_log(PM_LOG_DEBUG, "serverlist flushed for '%s'\n", db->treename);
+ }
+
+ return(0);
+}
+
+/** Update a package database
+ * @param force if true, then forces the update, otherwise update only in case
+ * the database isn't up to date
+ * @param db pointer to the package database to update
+ * @return 0 on success, > 0 on error (pm_errno is set accordingly), < 0 if up
+ * to date
+ */
+int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
+{
+ alpm_list_t *lp;
+ char path[PATH_MAX];
+ alpm_list_t *files = NULL;
+ time_t newmtime = 0, lastupdate = 0;
+ const char *dbpath;
+ int ret;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ ASSERT(db != NULL && db != handle->db_local, RET_ERR(PM_ERR_WRONG_ARGS, -1));
+ /* Verify we are in a transaction. This is done _mainly_ because we need a DB
+ * lock - if we update without a db lock, we may kludge some other pacman
+ * process that _has_ a lock.
+ */
+ 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));
+ ASSERT(handle->trans->type == PM_TRANS_TYPE_SYNC, RET_ERR(PM_ERR_TRANS_TYPE, -1));
+
+ if(!alpm_list_find_ptr(handle->dbs_sync, db)) {
+ RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
}
- db->path = calloc(1, strlen(root)+strlen(dbpath)+strlen(treename)+2);
- if(db->path == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failed: could not allocate %d bytes"),
- strlen(root)+strlen(dbpath)+strlen(treename)+2);
- FREE(db);
- RET_ERR(PM_ERR_MEMORY, NULL);
+ if(!force) {
+ /* get the lastupdate time */
+ lastupdate = _alpm_db_getlastupdate(db);
+ if(lastupdate == 0) {
+ _alpm_log(PM_LOG_DEBUG, "failed to get lastupdate time for %s\n",
+ db->treename);
+ }
}
- sprintf(db->path, "%s%s%s/", root, dbpath, treename);
- STRNCPY(db->treename, treename, PATH_MAX);
+ /* build a one-element list */
+ snprintf(path, PATH_MAX, "%s" DBEXT, db->treename);
+ files = alpm_list_add(files, strdup(path));
+
+ dbpath = alpm_option_get_dbpath();
+
+ ret = _alpm_downloadfiles_forreal(db->servers, dbpath, files, lastupdate,
+ &newmtime, NULL, 0);
+ FREELIST(files);
+ if(ret == 1) {
+ /* mtimes match, do nothing */
+ pm_errno = 0;
+ return(1);
+ } else if(ret == -1) {
+ /* we use downloadLastErrString and downloadLastErrCode here, error returns from
+ * libdownload */
+ _alpm_log(PM_LOG_DEBUG, "failed to sync db: %s [%d]\n",
+ downloadLastErrString, downloadLastErrCode);
+ RET_ERR(PM_ERR_DB_SYNC, -1);
+ } else {
+ if(newmtime != 0) {
+ _alpm_log(PM_LOG_DEBUG, "sync: new mtime for %s: %ju\n",
+ db->treename, (uintmax_t)newmtime);
+ _alpm_db_setlastupdate(db, newmtime);
+ }
+ snprintf(path, PATH_MAX, "%s%s" DBEXT, dbpath, db->treename);
+
+ /* remove the old dir */
+ _alpm_log(PM_LOG_DEBUG, "flushing database %s\n", db->path);
+ for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
+ pmpkg_t *pkg = lp->data;
+ if(pkg && _alpm_db_remove(db, pkg) == -1) {
+ _alpm_log(PM_LOG_ERROR, _("could not remove database entry %s%s\n"), db->treename,
+ alpm_pkg_get_name(pkg));
+ RET_ERR(PM_ERR_DB_REMOVE, -1);
+ }
+ }
+
+ /* Cache needs to be rebuild */
+ _alpm_db_free_pkgcache(db);
+
+ /* uncompress the sync database */
+ if(_alpm_db_install(db, path) == -1) {
+ return -1;
+ }
+ }
+
+ return(0);
+}
+
+/** Get the name of a package database
+ * @param db pointer to the package database
+ * @return the name of the package database, NULL on error
+ */
+const char SYMEXPORT *alpm_db_get_name(const pmdb_t *db)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+
+ return db->treename;
+}
+
+/** Get a download URL for the package database
+ * @param db pointer to the package database
+ * @return a fully-specified download URL, NULL on error
+ */
+const char SYMEXPORT *alpm_db_get_url(const pmdb_t *db)
+{
+ char path[PATH_MAX];
+ pmserver_t *s;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+
+ s = (pmserver_t*)db->servers->data;
+
+ snprintf(path, PATH_MAX, "%s://%s%s", s->s_url->scheme, s->s_url->host, s->s_url->doc);
+ return strdup(path);
+}
+
+
+/** Get a package entry from a package database
+ * @param db pointer to the package database to get the package from
+ * @param name of the package
+ * @return the package entry on success, NULL on error
+ */
+pmpkg_t SYMEXPORT *alpm_db_get_pkg(pmdb_t *db, const char *name)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+ ASSERT(name != NULL && strlen(name) != 0, return(NULL));
+
+ return(_alpm_db_get_pkgfromcache(db, name));
+}
+
+/** Get the package cache of a package database
+ * @param db pointer to the package database to get the package from
+ * @return the list of packages on success, NULL on error
+ */
+alpm_list_t SYMEXPORT *alpm_db_getpkgcache(pmdb_t *db)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+
+ return(_alpm_db_get_pkgcache(db));
+}
+
+/** Get the list of packages that a package provides
+ * @param db pointer to the package database to get the package from
+ * @param name name of the package
+ * @return the list of packages on success, NULL on error
+ */
+alpm_list_t SYMEXPORT *alpm_db_whatprovides(pmdb_t *db, const char *name)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+ ASSERT(name != NULL && strlen(name) != 0, return(NULL));
+
+ return(_alpm_db_whatprovides(db, name));
+}
+
+/** Get a group entry from a package database
+ * @param db pointer to the package database to get the group from
+ * @param name of the group
+ * @return the groups entry on success, NULL on error
+ */
+pmgrp_t SYMEXPORT *alpm_db_readgrp(pmdb_t *db, const char *name)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+ ASSERT(name != NULL && strlen(name) != 0, return(NULL));
+
+ return(_alpm_db_get_grpfromcache(db, name));
+}
+
+/** Get the group cache of a package database
+ * @param db pointer to the package database to get the group from
+ * @return the list of groups on success, NULL on error
+ */
+alpm_list_t SYMEXPORT *alpm_db_getgrpcache(pmdb_t *db)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+
+ return(_alpm_db_get_grpcache(db));
+}
+
+/** Searches a database
+ * @param db pointer to the package database to search in
+ * @param needles the list of strings to search for
+ * @return the list of packages on success, NULL on error
+ */
+alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db, const alpm_list_t* needles)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+
+ return(_alpm_db_search(db, needles));
+}
+
+/** @} */
+
+pmdb_t *_alpm_db_new(const char *dbpath, const char *treename)
+{
+ pmdb_t *db;
+ const size_t pathsize = strlen(dbpath) + strlen(treename) + 2;
+
+ ALPM_LOG_FUNC;
+
+ CALLOC(db, 1, sizeof(pmdb_t), RET_ERR(PM_ERR_MEMORY, NULL));
+ CALLOC(db->path, 1, pathsize, RET_ERR(PM_ERR_MEMORY, NULL));
+
+ sprintf(db->path, "%s%s/", dbpath, treename);
+
+ strncpy(db->treename, treename, PATH_MAX);
return(db);
}
void _alpm_db_free(pmdb_t *db)
{
+ alpm_list_t *tmp;
+
ALPM_LOG_FUNC;
- _FREELIST(db->servers, _alpm_server_free);
+ /* cleanup pkgcache */
+ _alpm_db_free_pkgcache(db);
+ /* cleanup server list */
+ for(tmp = db->servers; tmp; tmp = alpm_list_next(tmp)) {
+ _alpm_server_free(tmp->data);
+ }
+ alpm_list_free(db->servers);
FREE(db->path);
FREE(db);
@@ -97,9 +478,10 @@ int _alpm_db_cmp(const void *db1, const void *db2)
return(strcmp(((pmdb_t *)db1)->treename, ((pmdb_t *)db2)->treename));
}
-alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles)
+alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles)
{
- alpm_list_t *i, *j, *k, *ret = NULL;
+ const alpm_list_t *i, *j, *k;
+ alpm_list_t *ret = NULL;
ALPM_LOG_FUNC;
@@ -111,8 +493,8 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles)
continue;
}
targ = i->data;
- _alpm_log(PM_LOG_DEBUG, "searching for target '%s'", targ);
-
+ _alpm_log(PM_LOG_DEBUG, "searching for target '%s'\n", targ);
+
if(regcomp(&reg, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
RET_ERR(PM_ERR_INVALID_REGEX, NULL);
}
@@ -125,6 +507,10 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles)
if (regexec(&reg, alpm_pkg_get_name(pkg), 0, 0, 0) == 0) {
matched = alpm_pkg_get_name(pkg);
}
+ /* check plain text name */
+ else if (strstr(alpm_pkg_get_name(pkg), targ)) {
+ matched = alpm_pkg_get_name(pkg);
+ }
/* check desc */
else if (regexec(&reg, alpm_pkg_get_desc(pkg), 0, 0, 0) == 0) {
matched = alpm_pkg_get_desc(pkg);
@@ -142,7 +528,7 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles)
}
if(matched != NULL) {
- _alpm_log(PM_LOG_DEBUG, " search target '%s' matched '%s'",
+ _alpm_log(PM_LOG_DEBUG, " search target '%s' matched '%s'\n",
targ, matched);
ret = alpm_list_add(ret, pkg);
}
@@ -154,90 +540,150 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles)
return(ret);
}
-pmdb_t *_alpm_db_register(const char *treename, alpm_cb_db_register callback)
+pmdb_t *_alpm_db_register_local(void)
{
struct stat buf;
pmdb_t *db;
+ const char *dbpath;
char path[PATH_MAX];
ALPM_LOG_FUNC;
- if(strcmp(treename, "local") == 0) {
- if(handle->db_local != NULL) {
- _alpm_log(PM_LOG_WARNING, _("attempt to re-register the 'local' DB"));
- RET_ERR(PM_ERR_DB_NOT_NULL, NULL);
- }
- } else {
- alpm_list_t *i;
- for(i = handle->dbs_sync; i; i = i->next) {
- pmdb_t *sdb = i->data;
- if(strcmp(treename, sdb->treename) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("attempt to re-register the '%s' database, using existing"), sdb->treename);
- return sdb;
- }
- }
+ if(handle->db_local != NULL) {
+ _alpm_log(PM_LOG_WARNING, _("attempt to re-register the 'local' DB\n"));
+ RET_ERR(PM_ERR_DB_NOT_NULL, NULL);
}
-
- _alpm_log(PM_LOG_DEBUG, _("registering database '%s'"), treename);
+
+ _alpm_log(PM_LOG_DEBUG, "registering local database\n");
/* make sure the database directory exists */
- snprintf(path, PATH_MAX, "%s%s/%s", handle->root, handle->dbpath, treename);
+ dbpath = alpm_option_get_dbpath();
+ if(!dbpath) {
+ _alpm_log(PM_LOG_ERROR, _("database path is undefined\n"));
+ RET_ERR(PM_ERR_DB_OPEN, NULL);
+ }
+ snprintf(path, PATH_MAX, "%slocal", dbpath);
+ /* TODO this is rediculous, we try to do this even if we can't */
if(stat(path, &buf) != 0 || !S_ISDIR(buf.st_mode)) {
- _alpm_log(PM_LOG_DEBUG, _("database directory '%s' does not exist, creating it"), path);
+ _alpm_log(PM_LOG_DEBUG, "database dir '%s' does not exist, creating it\n",
+ path);
if(_alpm_makepath(path) != 0) {
RET_ERR(PM_ERR_SYSTEM, NULL);
}
}
- db = _alpm_db_new(handle->root, handle->dbpath, treename);
+ db = _alpm_db_new(dbpath, "local");
if(db == NULL) {
RET_ERR(PM_ERR_DB_CREATE, NULL);
}
- _alpm_log(PM_LOG_DEBUG, _("opening database '%s'"), db->treename);
+ _alpm_log(PM_LOG_DEBUG, "opening database '%s'\n", db->treename);
if(_alpm_db_open(db) == -1) {
_alpm_db_free(db);
RET_ERR(PM_ERR_DB_OPEN, NULL);
}
- /* Only call callback on NEW registration. */
- if(callback) callback(treename, db);
+ handle->db_local = db;
+ return(db);
+}
- if(strcmp(treename, "local") == 0) {
- handle->db_local = db;
- } else {
- handle->dbs_sync = alpm_list_add(handle->dbs_sync, db);
+pmdb_t *_alpm_db_register_sync(const char *treename)
+{
+ struct stat buf;
+ pmdb_t *db;
+ const char *dbpath;
+ char path[PATH_MAX];
+ alpm_list_t *i;
+
+ ALPM_LOG_FUNC;
+
+ for(i = handle->dbs_sync; i; i = i->next) {
+ pmdb_t *sdb = i->data;
+ if(strcmp(treename, sdb->treename) == 0) {
+ _alpm_log(PM_LOG_DEBUG, "attempt to re-register the '%s' database, using existing\n", sdb->treename);
+ return sdb;
+ }
+ }
+
+ _alpm_log(PM_LOG_DEBUG, "registering sync database '%s'\n", treename);
+
+ /* make sure the database directory exists */
+ dbpath = alpm_option_get_dbpath();
+ if(!dbpath) {
+ _alpm_log(PM_LOG_ERROR, _("database path is undefined\n"));
+ RET_ERR(PM_ERR_DB_OPEN, NULL);
+ }
+ /* all sync DBs now reside in the sync/ subdir of the dbpath */
+ snprintf(path, PATH_MAX, "%ssync/%s", dbpath, treename);
+ /* TODO this is rediculous, we try to do this even if we can't */
+ if(stat(path, &buf) != 0 || !S_ISDIR(buf.st_mode)) {
+ _alpm_log(PM_LOG_DEBUG, "database dir '%s' does not exist, creating it\n",
+ path);
+ if(_alpm_makepath(path) != 0) {
+ RET_ERR(PM_ERR_SYSTEM, NULL);
+ }
+ }
+
+ /* Ensure the db gets the real path. */
+ path[0] = '\0';
+ snprintf(path, PATH_MAX, "%ssync/", dbpath);
+
+ db = _alpm_db_new(path, treename);
+ if(db == NULL) {
+ RET_ERR(PM_ERR_DB_CREATE, NULL);
+ }
+
+ _alpm_log(PM_LOG_DEBUG, "opening database '%s'\n", db->treename);
+ if(_alpm_db_open(db) == -1) {
+ _alpm_db_free(db);
+ RET_ERR(PM_ERR_DB_OPEN, NULL);
}
+ handle->dbs_sync = alpm_list_add(handle->dbs_sync, db);
return(db);
}
-const char SYMEXPORT *alpm_db_get_name(pmdb_t *db)
+/* helper function for alpm_list_find and _alpm_db_whatprovides
+ *
+ * @return "provision.name" == needle (as string)
+ */
+int _alpm_prov_cmp(const void *provision, const void *needle)
{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
+ char *tmpptr;
+ char *provname = strdup(provision);
+ int retval = 0;
+ tmpptr = strchr(provname, ' ');
- return db->treename;
+ if(tmpptr != NULL) { /* provision-version */
+ *tmpptr='\0';
+ }
+ retval = strcmp(provname, needle);
+ free(provname);
+ return(retval);
}
-const char *alpm_db_get_url(pmdb_t *db)
+/* return a alpm_list_t of packages in "db" that provide "package"
+ */
+alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, const char *package)
{
- char path[PATH_MAX];
- pmserver_t *s;
+ alpm_list_t *pkgs = NULL;
+ alpm_list_t *lp;
ALPM_LOG_FUNC;
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(db != NULL, return(NULL));
+ if(db == NULL || package == NULL || strlen(package) == 0) {
+ return(NULL);
+ }
- s = (pmserver_t*)db->servers->data;
+ for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
+ pmpkg_t *info = lp->data;
- snprintf(path, PATH_MAX, "%s://%s%s", s->s_url->scheme, s->s_url->host, s->s_url->doc);
- return strdup(path);
+ if(alpm_list_find(alpm_pkg_get_provides(info), (const void *)package, _alpm_prov_cmp)) {
+ pkgs = alpm_list_add(pkgs, info);
+ }
+ }
+
+ return(pkgs);
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 26f1fdf4..3916e848 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -1,10 +1,10 @@
/*
* db.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_DB_H
@@ -25,6 +25,7 @@
#include "alpm.h"
#include <limits.h>
+#include <time.h>
/* Database entries */
typedef enum _pmdbinfrq_t {
@@ -33,8 +34,9 @@ typedef enum _pmdbinfrq_t {
INFRQ_DEPENDS = 0x04,
INFRQ_FILES = 0x08,
INFRQ_SCRIPTLET = 0x10,
+ INFRQ_DELTAS = 0x20,
/* ALL should be sum of all above */
- INFRQ_ALL = 0x1F
+ INFRQ_ALL = 0x3F
} pmdbinfrq_t;
/* Database */
@@ -48,11 +50,16 @@ struct __pmdb_t {
};
/* db.c, database general calls */
-pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename);
+pmdb_t *_alpm_db_new(const char *dbpath, const char *treename);
void _alpm_db_free(pmdb_t *db);
int _alpm_db_cmp(const void *db1, const void *db2);
-alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles);
-pmdb_t *_alpm_db_register(const char *treename, alpm_cb_db_register callback);
+alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
+pmdb_t *_alpm_db_register_local(void);
+pmdb_t *_alpm_db_register_sync(const char *treename);
+
+/* Provision */
+int _alpm_prov_cmp(const void *provision, const void *needle);
+alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, const char *package);
/* be.c, backend specific calls */
int _alpm_db_install(pmdb_t *db, const char *dbfile);
@@ -63,8 +70,8 @@ pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target);
int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
int _alpm_db_remove(pmdb_t *db, pmpkg_t *info);
-int _alpm_db_getlastupdate(pmdb_t *db, char *ts);
-int _alpm_db_setlastupdate(pmdb_t *db, char *ts);
+time_t _alpm_db_getlastupdate(const pmdb_t *db);
+int _alpm_db_setlastupdate(const pmdb_t *db, time_t time);
#endif /* _ALPM_DB_H */
diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c
new file mode 100644
index 00000000..8daac0c5
--- /dev/null
+++ b/lib/libalpm/delta.c
@@ -0,0 +1,266 @@
+/*
+ * delta.c
+ *
+ * Copyright (c) 2007 by Judd Vinet <jvinet@zeroflux.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+/* libalpm */
+#include "delta.h"
+#include "error.h"
+#include "util.h"
+#include "log.h"
+#include "alpm_list.h"
+#include "alpm.h"
+
+/** \addtogroup alpm_deltas Delta Functions
+ * @brief Functions to manipulate libalpm deltas
+ * @{
+ */
+
+const char SYMEXPORT *alpm_delta_get_from(pmdelta_t *delta)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(delta != NULL, return(NULL));
+
+ return(delta->from);
+}
+
+const char SYMEXPORT *alpm_delta_get_to(pmdelta_t *delta)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(delta != NULL, return(NULL));
+
+ return(delta->to);
+}
+
+unsigned long SYMEXPORT alpm_delta_get_size(pmdelta_t *delta)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(delta != NULL, return(-1));
+
+ return(delta->size);
+}
+
+const char SYMEXPORT *alpm_delta_get_filename(pmdelta_t *delta)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(delta != NULL, return(NULL));
+
+ return(delta->filename);
+}
+
+const char SYMEXPORT *alpm_delta_get_md5sum(pmdelta_t *delta)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(delta != NULL, return(NULL));
+
+ return(delta->md5sum);
+}
+
+/** @} */
+
+/** Calculates the combined size of a list of delta files.
+ *
+ * @param deltas the list of pmdelta_t * objects
+ *
+ * @return the combined size
+ */
+unsigned long _alpm_delta_path_size(alpm_list_t *deltas)
+{
+ unsigned long sum = 0;
+ alpm_list_t *dlts = deltas;
+
+ while(dlts) {
+ pmdelta_t *d = (pmdelta_t *)alpm_list_getdata(dlts);
+ sum += d->size;
+
+ dlts = alpm_list_next(dlts);
+ }
+
+ return(sum);
+}
+
+/** Calculates the combined size of a list of delta files that are not
+ * in the cache.
+ *
+ * @param deltas the list of pmdelta_t * objects
+ *
+ * @return the combined size
+ */
+unsigned long _alpm_delta_path_size_uncached(alpm_list_t *deltas)
+{
+ unsigned long sum = 0;
+ alpm_list_t *dlts = deltas;
+
+ while(dlts) {
+ pmdelta_t *d = (pmdelta_t *)alpm_list_getdata(dlts);
+ char *fname = _alpm_filecache_find(d->filename);
+
+ if(!fname) {
+ sum += d->size;
+ }
+
+ FREE(fname);
+
+ dlts = alpm_list_next(dlts);
+ }
+
+ return(sum);
+}
+
+/** Calculates the shortest path from one version to another.
+ *
+ * The shortest path is defined as the path with the smallest combined
+ * size, not the length of the path.
+ *
+ * The algorithm is based on Dijkstra's shortest path algorithm.
+ *
+ * @param deltas the list of pmdelta_t * objects that a package has
+ * @param from the version to start from
+ * @param to the version to end at
+ * @param path the current path
+ *
+ * @return the list of pmdelta_t * objects that has the smallest size.
+ * NULL (the empty list) is returned if there is no path between the
+ * versions.
+ */
+static alpm_list_t *shortest_delta_path(alpm_list_t *deltas,
+ const char *from, const char *to, alpm_list_t *path)
+{
+ alpm_list_t *d;
+ alpm_list_t *shortest = NULL;
+
+ /* Found the 'to' version, this is a good path so return it. */
+ if(strcmp(from, to) == 0) {
+ return(path);
+ }
+
+ for(d = deltas; d; d = alpm_list_next(d)) {
+ pmdelta_t *v = alpm_list_getdata(d);
+
+ /* If this vertex has already been visited in the path, go to the
+ * next vertex. */
+ if(alpm_list_find_ptr(path, v))
+ continue;
+
+ /* Once we find a vertex that starts at the 'from' version,
+ * recursively find the shortest path using the 'to' version of this
+ * current vertex as the 'from' version in the function call. */
+ if(strcmp(v->from, from) == 0) {
+ alpm_list_t *newpath = alpm_list_copy(path);
+ alpm_list_free(path);
+ newpath = alpm_list_add(newpath, v);
+ newpath = shortest_delta_path(deltas, v->to, to, newpath);
+
+ if(newpath != NULL) {
+ /* The path returned works, now use it unless there is already a
+ * shorter path found. */
+ if(shortest == NULL) {
+ shortest = newpath;
+ } else if(_alpm_delta_path_size(shortest) > _alpm_delta_path_size(newpath)) {
+ alpm_list_free(shortest);
+ shortest = newpath;
+ } else {
+ alpm_list_free(newpath);
+ }
+ }
+ }
+ }
+
+ return(shortest);
+}
+
+/** Calculates the shortest path from one version to another.
+ *
+ * The shortest path is defined as the path with the smallest combined
+ * size, not the length of the path.
+ *
+ * @param deltas the list of pmdelta_t * objects that a package has
+ * @param from the version to start from
+ * @param to the version to end at
+ *
+ * @return the list of pmdelta_t * objects that has the smallest size.
+ * NULL (the empty list) is returned if there is no path between the
+ * versions.
+ */
+alpm_list_t *_alpm_shortest_delta_path(alpm_list_t *deltas, const char *from,
+ const char *to)
+{
+ alpm_list_t *path = NULL;
+
+ path = shortest_delta_path(deltas, from, to, path);
+
+ return(path);
+}
+
+/** Parses the string representation of a pmdelta_t object.
+ *
+ * This function assumes that the string is in the correct format.
+ *
+ * @param line the string to parse
+ *
+ * @return A pointer to the new pmdelta_t object
+ */
+pmdelta_t *_alpm_delta_parse(char *line)
+{
+ pmdelta_t *delta;
+ char *tmp = line, *tmp2;
+
+ CALLOC(delta, 1, sizeof(pmdelta_t), RET_ERR(PM_ERR_MEMORY, NULL));
+
+ tmp2 = tmp;
+ tmp = strchr(tmp, ' ');
+ *(tmp++) = '\0';
+ strncpy(delta->from, tmp2, DLT_VERSION_LEN);
+
+ tmp2 = tmp;
+ tmp = strchr(tmp, ' ');
+ *(tmp++) = '\0';
+ strncpy(delta->to, tmp2, DLT_VERSION_LEN);
+
+ tmp2 = tmp;
+ tmp = strchr(tmp, ' ');
+ *(tmp++) = '\0';
+ delta->size = atol(tmp2);
+
+ tmp2 = tmp;
+ tmp = strchr(tmp, ' ');
+ *(tmp++) = '\0';
+ strncpy(delta->filename, tmp2, DLT_FILENAME_LEN);
+
+ strncpy(delta->md5sum, tmp, DLT_MD5SUM_LEN);
+
+ return(delta);
+}
+
+/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/versioncmp.h b/lib/libalpm/delta.h
index 13a2d5a7..d2dd361f 100644
--- a/lib/libalpm/versioncmp.h
+++ b/lib/libalpm/delta.h
@@ -1,10 +1,8 @@
/*
- * versioncmp.h
- *
- * Copyright (c) 2005 by Judd Vinet <jvinet@zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
- * Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ * delta.h
+ *
+ * Copyright (c) 2007 by Judd Vinet <jvinet@zeroflux.org>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -17,17 +15,31 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
-#ifndef _ALPM_VERSIONCMP_H
-#define _ALPM_VERSIONCMP_H
+#ifndef _ALPM_DELTA_H
+#define _ALPM_DELTA_H
+
+#include "alpm.h"
+
+#define DLT_FILENAME_LEN 512
+#define DLT_VERSION_LEN 64
+#define DLT_MD5SUM_LEN 33
-#include "deps.h"
-#include "package.h"
+struct __pmdelta_t {
+ char from[DLT_VERSION_LEN];
+ char to[DLT_VERSION_LEN];
+ unsigned long size;
+ char filename[DLT_FILENAME_LEN];
+ char md5sum[DLT_MD5SUM_LEN];
+};
-int _alpm_versioncmp(const char *a, const char *b);
+unsigned long _alpm_delta_path_size(alpm_list_t *deltas);
+unsigned long _alpm_delta_path_size_uncached(alpm_list_t *deltas);
+pmdelta_t *_alpm_delta_parse(char *line);
+alpm_list_t *_alpm_shortest_delta_path(alpm_list_t *deltas, const char *from, const char *to);
-#endif /* _ALPM_VERSIONCMP_H */
+#endif /* _ALPM_DELTA_H */
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 9295fabe..7529ec98 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -1,10 +1,10 @@
/*
* deps.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -26,11 +26,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#ifdef __sun__
-#include <strings.h>
-#endif
-#include <libintl.h>
-#include <math.h>
/* libalpm */
#include "deps.h"
@@ -41,32 +36,45 @@
#include "package.h"
#include "db.h"
#include "cache.h"
-#include "provide.h"
-#include "versioncmp.h"
#include "handle.h"
-extern pmhandle_t *handle;
+static pmgraph_t *_alpm_graph_new(void)
+{
+ pmgraph_t *graph = NULL;
+
+ MALLOC(graph, sizeof(pmgraph_t), RET_ERR(PM_ERR_MEMORY, NULL));
+
+ if(graph) {
+ graph->state = 0;
+ graph->data = NULL;
+ graph->parent = NULL;
+ graph->children = NULL;
+ graph->childptr = NULL;
+ }
+ return(graph);
+}
+
+static void _alpm_graph_free(void *data)
+{
+ pmgraph_t *graph = data;
+ alpm_list_free(graph->children);
+ free(graph);
+}
-pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdeptype_t type,
- pmdepmod_t depmod, const char *depname,
- const char *depversion)
+pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepmod_t depmod,
+ const char *depname, const char *depversion)
{
pmdepmissing_t *miss;
ALPM_LOG_FUNC;
- miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t));
- if(miss == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmdepmissing_t));
- RET_ERR(PM_ERR_MEMORY, NULL);
- }
+ MALLOC(miss, sizeof(pmdepmissing_t), RET_ERR(PM_ERR_MEMORY, NULL));
- STRNCPY(miss->target, target, PKG_NAME_LEN);
- miss->type = type;
+ strncpy(miss->target, target, PKG_NAME_LEN);
miss->depend.mod = depmod;
- STRNCPY(miss->depend.name, depname, PKG_NAME_LEN);
+ strncpy(miss->depend.name, depname, PKG_NAME_LEN);
if(depversion) {
- STRNCPY(miss->depend.version, depversion, PKG_VERSION_LEN);
+ strncpy(miss->depend.version, depversion, PKG_VERSION_LEN);
} else {
miss->depend.version[0] = 0;
}
@@ -74,21 +82,43 @@ pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdeptype_t type,
return(miss);
}
-int _alpm_depmiss_isin(pmdepmissing_t *needle, alpm_list_t *haystack)
+/* Convert a list of pmpkg_t * to a graph structure,
+ * with a edge for each dependency.
+ * Returns a list of vertices (one vertex = one package)
+ * (used by alpm_sortbydeps)
+ */
+static alpm_list_t *_alpm_graph_init(alpm_list_t *targets)
{
- alpm_list_t *i;
-
- ALPM_LOG_FUNC;
+ alpm_list_t *i, *j, *k;
+ alpm_list_t *vertices = NULL;
+ /* We create the vertices */
+ for(i = targets; i; i = i->next) {
+ pmgraph_t *vertex = _alpm_graph_new();
+ vertex->data = (void *)i->data;
+ vertices = alpm_list_add(vertices, vertex);
+ }
- for(i = haystack; i; i = i->next) {
- pmdepmissing_t *miss = i->data;
- if(!memcmp(needle, miss, sizeof(pmdepmissing_t))
- && !memcmp(&needle->depend, &miss->depend, sizeof(pmdepend_t))) {
- return(1);
+ /* We compute the edges */
+ for(i = vertices; i; i = i->next) {
+ pmgraph_t *vertex_i = i->data;
+ pmpkg_t *p_i = vertex_i->data;
+ /* TODO this should be somehow combined with alpm_checkdeps */
+ for(j = vertices; j; j = j->next) {
+ pmgraph_t *vertex_j = j->data;
+ pmpkg_t *p_j = vertex_j->data;
+ int child = 0;
+ for(k = alpm_pkg_get_depends(p_i); k && !child; k = k->next) {
+ pmdepend_t *depend = k->data;
+ child = alpm_depcmp(p_j, depend);
+ }
+ if(child) {
+ vertex_i->children =
+ alpm_list_add(vertex_i->children, vertex_j);
+ }
}
+ vertex_i->childptr = vertex_i->children;
}
-
- return(0);
+ return(vertices);
}
/* Re-order a list of target packages with respect to their dependencies.
@@ -99,21 +129,19 @@ int _alpm_depmiss_isin(pmdepmissing_t *needle, alpm_list_t *haystack)
* Target order is A,B,C,D
*
* Should be re-ordered to C,A,B,D
- *
+ *
* mode should be either PM_TRANS_TYPE_ADD or PM_TRANS_TYPE_REMOVE. This
* affects the dependency order sortbydeps() will use.
*
* This function returns the new alpm_list_t* target list.
*
- */
+ */
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode)
{
alpm_list_t *newtargs = NULL;
- alpm_list_t *i, *j, *k, *l;
- int change = 1;
- int numscans = 0;
- int numtargs = 0;
- int maxscans;
+ alpm_list_t *vertices = NULL;
+ alpm_list_t *vptr;
+ pmgraph_t *vertex;
ALPM_LOG_FUNC;
@@ -121,90 +149,86 @@ alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode)
return(NULL);
}
- for(i = targets; i; i = i->next) {
- newtargs = alpm_list_add(newtargs, i->data);
- numtargs++;
- }
+ _alpm_log(PM_LOG_DEBUG, "started sorting dependencies\n");
- maxscans = (int)sqrt(numtargs);
+ vertices = _alpm_graph_init(targets);
- _alpm_log(PM_LOG_DEBUG, _("started sorting dependencies"));
- while(change) {
- alpm_list_t *tmptargs = NULL;
- change = 0;
- if(numscans > maxscans) {
- _alpm_log(PM_LOG_DEBUG, _("possible dependency cycle detected"));
- continue;
- }
- numscans++;
- /* run thru targets, moving up packages as necessary */
- for(i = newtargs; i; i = i->next) {
- pmpkg_t *p = i->data;
- _alpm_log(PM_LOG_DEBUG, " sorting %s", alpm_pkg_get_name(p));
- for(j = alpm_pkg_get_depends(p); j; j = j->next) {
- pmdepend_t *depend = alpm_splitdep(j->data);
- pmpkg_t *q = NULL;
- if(depend == NULL) {
- continue;
- }
- /* look for depend->name -- if it's farther down in the list, then
- * move it up above p
- */
- for(k = i->next; k; k = k->next) {
- q = k->data;
- const char *qname = alpm_pkg_get_name(q);
- if(!strcmp(depend->name, qname)) {
- if(!_alpm_pkg_find(qname, tmptargs)) {
- change = 1;
- tmptargs = alpm_list_add(tmptargs, q);
- }
- break;
- }
- for(l = alpm_pkg_get_provides(q); l; l = l->next) {
- const char *provname = l->data;
- if(!strcmp(depend->name, provname)) {
- if(!_alpm_pkg_find(qname, tmptargs)) {
- change = 1;
- tmptargs = alpm_list_add(tmptargs, q);
- }
- break;
- }
- }
+ vptr = vertices;
+ vertex = vertices->data;
+ while(vptr) {
+ /* mark that we touched the vertex */
+ vertex->state = -1;
+ int found = 0;
+ while(vertex->childptr && !found) {
+ pmgraph_t *nextchild = (vertex->childptr)->data;
+ vertex->childptr = (vertex->childptr)->next;
+ if (nextchild->state == 0) {
+ found = 1;
+ nextchild->parent = vertex;
+ vertex = nextchild;
+ }
+ else if(nextchild->state == -1) {
+ pmpkg_t *vertexpkg = vertex->data;
+ pmpkg_t *childpkg = nextchild->data;
+ _alpm_log(PM_LOG_WARNING, _("dependency cycle detected:\n"));
+ if(mode == PM_TRANS_TYPE_REMOVE) {
+ _alpm_log(PM_LOG_WARNING, _("%s will be removed after its %s dependency\n"), vertexpkg->name, childpkg->name);
+ } else {
+ _alpm_log(PM_LOG_WARNING, _("%s will be installed before its %s dependency\n"), vertexpkg->name, childpkg->name);
}
- free(depend);
}
- if(!_alpm_pkg_find(alpm_pkg_get_name(p), tmptargs)) {
- tmptargs = alpm_list_add(tmptargs, p);
+ }
+ if(!found) {
+ newtargs = alpm_list_add(newtargs, vertex->data);
+ /* mark that we've left this vertex */
+ vertex->state = 1;
+ vertex = vertex->parent;
+ if(!vertex) {
+ vptr = vptr->next;
+ while(vptr) {
+ vertex = vptr->data;
+ if (vertex->state == 0) break;
+ vptr = vptr->next;
+ }
}
}
- FREELISTPTR(newtargs);
- newtargs = tmptargs;
}
- _alpm_log(PM_LOG_DEBUG, _("sorting dependencies finished"));
+
+ _alpm_log(PM_LOG_DEBUG, "sorting dependencies finished\n");
if(mode == PM_TRANS_TYPE_REMOVE) {
/* we're removing packages, so reverse the order */
alpm_list_t *tmptargs = alpm_list_reverse(newtargs);
/* free the old one */
- FREELISTPTR(newtargs);
+ alpm_list_free(newtargs);
newtargs = tmptargs;
}
+ alpm_list_free_inner(vertices, _alpm_graph_free);
+ alpm_list_free(vertices);
+
return(newtargs);
}
-/** Checks dependencies and returns missing ones in a list. Dependencies can include versions with depmod operators.
- * @param trans pointer to the transaction object
+/* Little helper function for alpm_list_find */
+static int satisfycmp(const void *pkg, const void *depend)
+{
+ return(!alpm_depcmp((pmpkg_t*) pkg, (pmdepend_t*) depend));
+}
+
+/** Checks dependencies and returns missing ones in a list.
+ * Dependencies can include versions with depmod operators.
* @param db pointer to the local package database
- * @param op transaction type
- * @param packages an alpm_list_t* of packages to be checked
- * @return an alpm_list_t* of missing_t pointers.
+ * @param reversedeps handles the backward dependencies
+ * @param remove an alpm_list_t* of packages to be removed
+ * @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)
+ * @return an alpm_list_t* of pmpkg_t* of missing_t pointers.
*/
-alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
- alpm_list_t *packages)
+alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
+ alpm_list_t *remove, alpm_list_t *upgrade)
{
- alpm_list_t *i, *j, *k, *l;
- int found = 0;
+ alpm_list_t *i, *j;
+ alpm_list_t *joined, *dblist;
alpm_list_t *baddeps = NULL;
pmdepmissing_t *miss = NULL;
@@ -214,376 +238,271 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
return(NULL);
}
- if(op == PM_TRANS_TYPE_UPGRADE) {
- /* PM_TRANS_TYPE_UPGRADE handles the backwards dependencies, ie, the packages
- * listed in the requiredby field.
- */
- for(i = packages; i; i = i->next) {
- pmpkg_t *newpkg = i->data;
- pmpkg_t *oldpkg;
- if(newpkg == NULL) {
- _alpm_log(PM_LOG_DEBUG, _("null package found in package list"));
- continue;
+ joined = alpm_list_join(alpm_list_copy(remove), alpm_list_copy(upgrade));
+ dblist = alpm_list_diff(_alpm_db_get_pkgcache(db), joined, _alpm_pkg_cmp);
+ alpm_list_free(joined);
+
+ /* look for unsatisfied dependencies of the upgrade list */
+ for(i = upgrade; i; i = i->next) {
+ pmpkg_t *tp = i->data;
+ _alpm_log(PM_LOG_DEBUG, "checkdeps: package %s-%s\n",
+ alpm_pkg_get_name(tp), alpm_pkg_get_version(tp));
+
+ for(j = alpm_pkg_get_depends(tp); j; j = j->next) {
+ pmdepend_t *depend = j->data;
+ /* 1. we check the upgrade list */
+ /* 2. we check database for untouched satisfying packages */
+ if(!alpm_list_find(upgrade, depend, satisfycmp) &&
+ !alpm_list_find(dblist, depend, satisfycmp)) {
+ /* Unsatisfied dependency in the upgrade list */
+ char *missdepstring = alpm_dep_get_string(depend);
+ _alpm_log(PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n",
+ missdepstring, alpm_pkg_get_name(tp));
+ free(missdepstring);
+ miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), depend->mod,
+ depend->name, depend->version);
+ baddeps = alpm_list_add(baddeps, miss);
}
+ }
+ }
- if((oldpkg = _alpm_db_get_pkgfromcache(db, alpm_pkg_get_name(newpkg))) == NULL) {
- _alpm_log(PM_LOG_DEBUG, _("cannot find package installed '%s'"),
- alpm_pkg_get_name(newpkg));
- continue;
- }
- for(j = alpm_pkg_get_requiredby(oldpkg); j; j = j->next) {
- pmpkg_t *p;
- found = 0;
- if((p = _alpm_db_get_pkgfromcache(db, j->data)) == NULL) {
- /* hmmm... package isn't installed.. */
- continue;
- }
- if(_alpm_pkg_find(alpm_pkg_get_name(p), packages)) {
- /* this package also in the upgrade list, so don't worry about it */
- continue;
- }
- for(k = alpm_pkg_get_depends(p); k; k = k->next) {
- /* don't break any existing dependencies (possible provides) */
- pmdepend_t *depend = alpm_splitdep(k->data);
- if(depend == NULL) {
- continue;
- }
-
- /* if oldpkg satisfied this dep, and newpkg doesn't */
- if(alpm_depcmp(oldpkg, depend) && !alpm_depcmp(newpkg, depend)) {
- /* we've found a dep that was removed... see if any other package
- * still contains/provides the dep */
- int satisfied = 0;
- for(l = packages; l; l = l->next) {
- pmpkg_t *pkg = l->data;
-
- if(alpm_depcmp(pkg, depend)) {
- _alpm_log(PM_LOG_DEBUG, _("checkdeps: dependency '%s' has moved from '%s' to '%s'"),
- depend->name, alpm_pkg_get_name(oldpkg), alpm_pkg_get_name(pkg));
- satisfied = 1;
- break;
- }
- }
-
- if(!satisfied) {
- /* worst case... check installed packages to see if anything else
- * satisfies this... */
- for(l = _alpm_db_get_pkgcache(db); l; l = l->next) {
- pmpkg_t *pkg = l->data;
-
- if(strcmp(alpm_pkg_get_name(pkg), alpm_pkg_get_name(oldpkg)) == 0) {
- /* well, we know this one succeeds, but we're removing it... skip it */
- continue;
- }
-
- if(alpm_depcmp(pkg, depend)) {
- _alpm_log(PM_LOG_DEBUG, _("checkdeps: dependency '%s' satisfied by installed package '%s'"),
- depend->name, alpm_pkg_get_name(pkg));
- satisfied = 1;
- break;
- }
- }
- }
-
- if(!satisfied) {
- _alpm_log(PM_LOG_DEBUG, _("checkdeps: updated '%s' won't satisfy a dependency of '%s'"),
- alpm_pkg_get_name(oldpkg), alpm_pkg_get_name(p));
- miss = _alpm_depmiss_new(p->name, PM_DEP_TYPE_DEPEND, depend->mod,
- depend->name, depend->version);
- if(!_alpm_depmiss_isin(miss, baddeps)) {
- baddeps = alpm_list_add(baddeps, miss);
- } else {
- FREE(miss);
- }
- }
- }
- free(depend);
+ if(reversedeps) {
+ /* reversedeps handles the backwards dependencies, ie,
+ * the packages listed in the requiredby field. */
+
+ alpm_list_t *modified = alpm_list_diff(_alpm_db_get_pkgcache(db), dblist, _alpm_pkg_cmp);
+
+ for(i = dblist; i; i = i->next) {
+ pmpkg_t *lp = i->data;
+ for(j = alpm_pkg_get_depends(lp); j; j = j->next) {
+ pmdepend_t *depend = j->data;
+ /* we won't break this depend, if it is already broken, we ignore it */
+ /* 1. check upgrade list for satisfiers */
+ /* 2. check dblist for satisfiers */
+ if(alpm_list_find(modified, depend, satisfycmp) &&
+ !alpm_list_find(upgrade, depend, satisfycmp) &&
+ !alpm_list_find(dblist, depend, satisfycmp)) {
+ char *missdepstring = alpm_dep_get_string(depend);
+ _alpm_log(PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n",
+ missdepstring, alpm_pkg_get_name(lp));
+ free(missdepstring);
+ miss = _alpm_depmiss_new(lp->name, depend->mod,
+ depend->name, depend->version);
+ baddeps = alpm_list_add(baddeps, miss);
}
}
}
+ alpm_list_free(modified);
}
- if(op == PM_TRANS_TYPE_ADD || op == PM_TRANS_TYPE_UPGRADE) {
- /* DEPENDENCIES -- look for unsatisfied dependencies */
- for(i = packages; i; i = i->next) {
- pmpkg_t *tp = i->data;
- if(tp == NULL) {
- _alpm_log(PM_LOG_DEBUG, _("null package found in package list"));
- continue;
- }
+ alpm_list_free(dblist);
- for(j = alpm_pkg_get_depends(tp); j; j = j->next) {
- /* split into name/version pairs */
- pmdepend_t *depend = alpm_splitdep((char*)j->data);
- if(depend == NULL) {
- continue;
- }
-
- found = 0;
- /* check database for literal packages */
- for(k = _alpm_db_get_pkgcache(db); k && !found; k = k->next) {
- pmpkg_t *p = (pmpkg_t *)k->data;
- found = alpm_depcmp(p, depend);
- }
- /* check database for provides matches */
- if(!found) {
- alpm_list_t *m;
- for(m = _alpm_db_whatprovides(db, depend->name); m && !found; m = m->next) {
- /* look for a match that isn't one of the packages we're trying
- * to install. this way, if we match against a to-be-installed
- * package, we'll defer to the NEW one, not the one already
- * installed. */
- pmpkg_t *p = m->data;
- alpm_list_t *n;
- int skip = 0;
- for(n = packages; n && !skip; n = n->next) {
- pmpkg_t *ptp = n->data;
- if(strcmp(alpm_pkg_get_name(ptp), alpm_pkg_get_name(p)) == 0) {
- skip = 1;
- }
- }
- if(skip) {
- continue;
- }
-
- found = alpm_depcmp(p, depend);
- }
- FREELISTPTR(k);
- }
- /* check other targets */
- for(k = packages; k && !found; k = k->next) {
- pmpkg_t *p = k->data;
- found = alpm_depcmp(p, depend);
- }
- /* else if still not found... */
- if(!found) {
- _alpm_log(PM_LOG_DEBUG, _("missing dependency '%s' for package '%s'"),
- depend->name, alpm_pkg_get_name(tp));
- miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), PM_DEP_TYPE_DEPEND, depend->mod,
- depend->name, depend->version);
- if(!_alpm_depmiss_isin(miss, baddeps)) {
- baddeps = alpm_list_add(baddeps, miss);
- } else {
- FREE(miss);
- }
- }
- free(depend);
- }
+ return(baddeps);
+}
+
+static int dep_vercmp(const char *version1, pmdepmod_t mod,
+ const char *version2)
+{
+ int equal = 0;
+
+ if(mod == PM_DEP_MOD_ANY) {
+ equal = 1;
+ } else {
+ int cmp = _alpm_versioncmp(version1, version2);
+ switch(mod) {
+ case PM_DEP_MOD_EQ: equal = (cmp == 0); break;
+ case PM_DEP_MOD_GE: equal = (cmp >= 0); break;
+ case PM_DEP_MOD_LE: equal = (cmp <= 0); break;
+ default: equal = 1; break;
}
- } else if(op == PM_TRANS_TYPE_REMOVE) {
- /* check requiredby fields */
- for(i = packages; i; i = i->next) {
- pmpkg_t *tp = i->data;
- if(tp == NULL) {
- continue;
- }
+ }
+ return(equal);
+}
- found=0;
- for(j = alpm_pkg_get_requiredby(tp); j; j = j->next) {
- /* Search for 'reqname' in packages for removal */
- char *reqname = j->data;
- alpm_list_t *x = NULL;
- for(x = packages; x; x = x->next) {
- pmpkg_t *xp = x->data;
- if(strcmp(reqname, alpm_pkg_get_name(xp)) == 0) {
- found = 1;
- break;
- }
- }
- if(!found) {
- /* check if a package in trans->packages provides this package */
- for(k = trans->packages; !found && k; k=k->next) {
- pmpkg_t *spkg = NULL;
- if(trans->type == PM_TRANS_TYPE_SYNC) {
- pmsyncpkg_t *sync = k->data;
- spkg = sync->pkg;
- } else {
- spkg = k->data;
- }
- if(spkg) {
- if(alpm_list_find_str(alpm_pkg_get_provides(spkg), tp->name)) {
- found = 1;
- }
- }
- }
- if(!found) {
- _alpm_log(PM_LOG_DEBUG, _("checkdeps: found %s as required by %s"),
- reqname, alpm_pkg_get_name(tp));
- miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), PM_DEP_TYPE_DEPEND,
- PM_DEP_MOD_ANY, j->data, NULL);
- if(!_alpm_depmiss_isin(miss, baddeps)) {
- baddeps = alpm_list_add(baddeps, miss);
- } else {
- FREE(miss);
- }
- }
- }
- }
+int SYMEXPORT alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
+{
+ alpm_list_t *i;
+
+ ALPM_LOG_FUNC;
+
+ const char *pkgname = alpm_pkg_get_name(pkg);
+ const char *pkgversion = alpm_pkg_get_version(pkg);
+ int satisfy = 0;
+
+ /* check (pkg->name, pkg->version) */
+ satisfy = (strcmp(pkgname, dep->name) == 0
+ && dep_vercmp(pkgversion, dep->mod, dep->version));
+
+ /* check provisions, format : "name version" */
+ for(i = alpm_pkg_get_provides(pkg); i && !satisfy; i = i->next) {
+ char *provname = strdup(i->data);
+ char *provver = strchr(provname, ' ');
+
+ if(provver == NULL) { /* no provision version */
+ satisfy = (dep->mod == PM_DEP_MOD_ANY
+ && strcmp(provname, dep->name) == 0);
+ } else {
+ /* replace the space with a NULL byte, and advance ptr the version */
+ *provver = '\0';
+ provver += 1;
+ satisfy = (strcmp(provname, dep->name) == 0
+ && dep_vercmp(provver, dep->mod, dep->version));
}
+ free(provname);
}
- return(baddeps);
+ return(satisfy);
}
pmdepend_t SYMEXPORT *alpm_splitdep(const char *depstring)
{
pmdepend_t *depend;
char *ptr = NULL;
+ char *newstr = NULL;
if(depstring == NULL) {
return(NULL);
}
-
- depend = (pmdepend_t *)malloc(sizeof(pmdepend_t));
- if(depend == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmdepend_t));
- return(NULL);
- }
+ newstr = strdup(depstring);
+
+ MALLOC(depend, sizeof(pmdepend_t), return(NULL));
/* Find a version comparator if one exists. If it does, set the type and
* increment the ptr accordingly so we can copy the right strings. */
- if((ptr = strstr(depstring, ">="))) {
+ if((ptr = strstr(newstr, ">="))) {
depend->mod = PM_DEP_MOD_GE;
*ptr = '\0';
ptr += 2;
- } else if((ptr = strstr(depstring, "<="))) {
+ } else if((ptr = strstr(newstr, "<="))) {
depend->mod = PM_DEP_MOD_LE;
*ptr = '\0';
ptr += 2;
- } else if((ptr = strstr(depstring, "="))) {
+ } else if((ptr = strstr(newstr, "="))) {
depend->mod = PM_DEP_MOD_EQ;
*ptr = '\0';
ptr += 1;
} else {
/* no version specified - copy in the name and return it */
depend->mod = PM_DEP_MOD_ANY;
- strncpy(depend->name, depstring, PKG_NAME_LEN);
+ strncpy(depend->name, newstr, PKG_NAME_LEN);
depend->version[0] = '\0';
+ free(newstr);
return(depend);
}
/* if we get here, we have a version comparator, copy the right parts
* to the right places */
- strncpy(depend->name, depstring, PKG_NAME_LEN);
+ strncpy(depend->name, newstr, PKG_NAME_LEN);
strncpy(depend->version, ptr, PKG_VERSION_LEN);
+ free(newstr);
return(depend);
}
-/* These parameters are messy. We check if this package, given a list of
- * targets (and a db), is safe to remove. We do NOT remove it if it is in the
- * target list */
-static int can_remove_package(pmdb_t *db, pmpkg_t *pkg, alpm_list_t *targets)
+/* These parameters are messy. We check if this package, given a list of
+ * targets and a db is safe to remove. We do NOT remove it if it is in the
+ * target list, or if if the package was explictly installed and
+ * include_explicit == 0 */
+static int can_remove_package(pmdb_t *db, pmpkg_t *pkg, alpm_list_t *targets,
+ int include_explicit)
{
- alpm_list_t *i;
+ alpm_list_t *i, *requiredby;
if(_alpm_pkg_find(alpm_pkg_get_name(pkg), targets)) {
return(0);
}
- /* see if it was explicitly installed */
- if(alpm_pkg_get_reason(pkg) == PM_PKG_REASON_EXPLICIT) {
- _alpm_log(PM_LOG_DEBUG, _("excluding %s -- explicitly installed"), alpm_pkg_get_name(pkg));
- return(0);
+ if(!include_explicit) {
+ /* see if it was explicitly installed */
+ if(alpm_pkg_get_reason(pkg) == PM_PKG_REASON_EXPLICIT) {
+ _alpm_log(PM_LOG_DEBUG, "excluding %s -- explicitly installed\n",
+ alpm_pkg_get_name(pkg));
+ return(0);
+ }
}
+ /* TODO: checkdeps could be used here, it handles multiple providers
+ * better, but that also makes it slower.
+ * Also this would require to first add the package to the targets list,
+ * then call checkdeps with it, then remove the package from the targets list
+ * if checkdeps detected it would break something */
+
/* see if other packages need it */
- for(i = alpm_pkg_get_requiredby(pkg); i; i = i->next) {
+ requiredby = alpm_pkg_compute_requiredby(pkg);
+ for(i = requiredby; i; i = i->next) {
pmpkg_t *reqpkg = _alpm_db_get_pkgfromcache(db, i->data);
if(reqpkg && !_alpm_pkg_find(alpm_pkg_get_name(reqpkg), targets)) {
+ FREELIST(requiredby);
return(0);
}
}
+ FREELIST(requiredby);
/* it's ok to remove */
return(1);
}
-/* return a new alpm_list_t target list containing all packages in the original
- * target list, as well as all their un-needed dependencies. By un-needed,
- * I mean dependencies that are *only* required for packages in the target
- * list, so they can be safely removed. This function is recursive.
+/**
+ * @brief Adds unneeded dependencies to an existing list of packages.
+ * By unneeded, we mean dependencies that are only required by packages in the
+ * target list, so they can be safely removed.
+ * If the input list was topo sorted, the output list will be topo sorted too.
+ *
+ * @param db package database to do dependency tracing in
+ * @param *targs pointer to a list of packages
+ * @param include_explicit if 0, explicitly installed packages are not included
*/
-alpm_list_t *_alpm_removedeps(pmdb_t *db, alpm_list_t *targs)
+void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit)
{
alpm_list_t *i, *j, *k;
- alpm_list_t *newtargs = targs;
ALPM_LOG_FUNC;
- if(db == NULL) {
- return(newtargs);
+ if(db == NULL || targs == NULL) {
+ return;
}
for(i = targs; i; i = i->next) {
pmpkg_t *pkg = i->data;
for(j = alpm_pkg_get_depends(pkg); j; j = j->next) {
- pmdepend_t *depend = alpm_splitdep(j->data);
- pmpkg_t *deppkg;
- if(depend == NULL) {
- continue;
- }
-
- deppkg = _alpm_db_get_pkgfromcache(db, depend->name);
- if(deppkg == NULL) {
- /* package not found... look for a provision instead */
- alpm_list_t *provides = _alpm_db_whatprovides(db, depend->name);
- if(!provides) {
- /* Not found, that's fine, carry on */
- _alpm_log(PM_LOG_DEBUG, _("cannot find package \"%s\" or anything that provides it!"), depend->name);
- continue;
- }
- for(k = provides; k; k = k->next) {
- pmpkg_t *provpkg = k->data;
- if(can_remove_package(db, provpkg, newtargs)) {
- pmpkg_t *pkg = _alpm_pkg_dup(provpkg);
-
- _alpm_log(PM_LOG_DEBUG, _("adding '%s' to the targets"), alpm_pkg_get_name(pkg));
-
+ pmdepend_t *depend = j->data;
+
+ for(k = _alpm_db_get_pkgcache(db); k; k = k->next) {
+ pmpkg_t *deppkg = k->data;
+ if(alpm_depcmp(deppkg,depend)
+ && can_remove_package(db, deppkg, targs, include_explicit)) {
+ _alpm_log(PM_LOG_DEBUG, "adding '%s' to the targets\n",
+ alpm_pkg_get_name(deppkg));
/* add it to the target list */
- newtargs = alpm_list_add(newtargs, pkg);
- newtargs = _alpm_removedeps(db, newtargs);
- }
+ targs = alpm_list_add(targs, _alpm_pkg_dup(deppkg));
}
- FREELISTPTR(provides);
- } else if(can_remove_package(db, deppkg, newtargs)) {
- pmpkg_t *pkg = _alpm_pkg_dup(deppkg);
-
- _alpm_log(PM_LOG_DEBUG, _("adding '%s' to the targets"), alpm_pkg_get_name(pkg));
-
- /* add it to the target list */
- newtargs = alpm_list_add(newtargs, pkg);
- newtargs = _alpm_removedeps(db, newtargs);
}
- free(depend);
}
}
-
- return(newtargs);
}
/* populates *list with packages that need to be installed to satisfy all
* dependencies (recursive) for syncpkg
*
- * make sure *list and *trail are already initialized
+ * @param remove contains packages elected for removal
+ * make sure **list is already initialized
*/
int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
- alpm_list_t *list, alpm_list_t *trail, pmtrans_t *trans,
- alpm_list_t **data)
+ alpm_list_t **list, alpm_list_t *remove, pmtrans_t *trans, alpm_list_t **data)
{
- alpm_list_t *i, *j;
+ alpm_list_t *i, *j, *k;
alpm_list_t *targ;
alpm_list_t *deps = NULL;
ALPM_LOG_FUNC;
- if(local == NULL || dbs_sync == NULL || syncpkg == NULL) {
+ if(local == NULL || dbs_sync == NULL || syncpkg == NULL || list == NULL) {
return(-1);
}
- _alpm_log(PM_LOG_DEBUG, _("started resolving dependencies"));
+ _alpm_log(PM_LOG_DEBUG, "started resolving dependencies\n");
targ = alpm_list_add(NULL, syncpkg);
- deps = _alpm_checkdeps(trans, local, PM_TRANS_TYPE_ADD, targ);
- FREELISTPTR(targ);
+ deps = alpm_checkdeps(local, 0, remove, targ);
+ alpm_list_free(targ);
if(deps == NULL) {
return(0);
@@ -592,14 +511,17 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
for(i = deps; i; i = i->next) {
int found = 0;
pmdepmissing_t *miss = i->data;
+ pmdepend_t *missdep = &(miss->depend);
pmpkg_t *sync = NULL;
- /* check if one of the packages in *list already provides this dependency */
- for(j = list; j && !found; j = j->next) {
+ /* check if one of the packages in *list already satisfies this dependency */
+ for(j = *list; j && !found; j = j->next) {
pmpkg_t *sp = j->data;
- if(alpm_list_find_str(alpm_pkg_get_provides(sp), miss->depend.name)) {
- _alpm_log(PM_LOG_DEBUG, _("%s provides dependency %s -- skipping"),
- alpm_pkg_get_name(sp), miss->depend.name);
+ if(alpm_depcmp(sp, missdep)) {
+ char *missdepstring = alpm_dep_get_string(missdep);
+ _alpm_log(PM_LOG_DEBUG, "%s satisfies dependency %s -- skipping\n",
+ alpm_pkg_get_name(sp), missdepstring);
+ free(missdepstring);
found = 1;
}
}
@@ -609,31 +531,53 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
/* find the package in one of the repositories */
/* check literals */
- for(j = dbs_sync; !sync && j; j = j->next) {
- sync = _alpm_db_get_pkgfromcache(j->data, miss->depend.name);
+ for(j = dbs_sync; j && !found; j = j->next) {
+ sync = _alpm_db_get_pkgfromcache(j->data, missdep->name);
+ if(!sync) {
+ continue;
+ }
+ found = alpm_depcmp(sync, missdep) && !_alpm_pkg_find(alpm_pkg_get_name(sync), remove);
+ if(!found) {
+ continue;
+ }
+ /* If package is in the ignorepkg list, ask before we pull it */
+ if(_alpm_pkg_should_ignore(sync)) {
+ pmpkg_t *dummypkg = _alpm_pkg_new(miss->target, NULL);
+ QUESTION(trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, dummypkg, sync, NULL, &found);
+ _alpm_pkg_free(dummypkg);
+ }
}
- /*TODO this autoresolves the first 'provides' package... we should fix this
+ /*TODO this autoresolves the first 'satisfier' package... we should fix this
* somehow */
/* check provides */
- if(!sync) {
- for(j = dbs_sync; !sync && j; j = j->next) {
- alpm_list_t *provides;
- provides = _alpm_db_whatprovides(j->data, miss->depend.name);
- if(provides) {
- sync = provides->data;
+ for(j = dbs_sync; j && !found; j = j->next) {
+ for(k = _alpm_db_get_pkgcache(j->data); k && !found; k = k->next) {
+ sync = k->data;
+ if(!sync) {
+ continue;
+ }
+ found = alpm_depcmp(sync, missdep) && !_alpm_pkg_find(alpm_pkg_get_name(sync), remove);
+ if(!found) {
+ continue;
+ }
+ if(_alpm_pkg_should_ignore(sync)) {
+ pmpkg_t *dummypkg = _alpm_pkg_new(miss->target, NULL);
+ QUESTION(trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, dummypkg, sync, NULL, &found);
+ _alpm_pkg_free(dummypkg);
}
- FREELISTPTR(provides);
}
}
- if(!sync) {
- _alpm_log(PM_LOG_ERROR, _("cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"),
- miss->target, miss->depend.name);
+ if(!found) {
+ char *missdepstring = alpm_dep_get_string(missdep);
+ _alpm_log(PM_LOG_ERROR, _("cannot resolve \"%s\", a dependency of \"%s\"\n"),
+ missdepstring, miss->target);
+ free(missdepstring);
if(data) {
- if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmdepmissing_t));
- FREELIST(*data);
+ MALLOC(miss, sizeof(pmdepmissing_t),/*nothing*/);
+ if(!miss) {
pm_errno = PM_ERR_MEMORY;
+ FREELIST(*data);
goto error;
}
*miss = *(pmdepmissing_t *)i->data;
@@ -641,54 +585,17 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
}
pm_errno = PM_ERR_UNSATISFIED_DEPS;
goto error;
- }
- if(_alpm_pkg_find(alpm_pkg_get_name(sync), list)) {
- /* this dep is already in the target list */
- _alpm_log(PM_LOG_DEBUG, _("dependency %s is already in the target list -- skipping"),
- alpm_pkg_get_name(sync));
- continue;
- }
-
- if(!_alpm_pkg_find(alpm_pkg_get_name(sync), trail)) {
- /* check pmo_ignorepkg and pmo_s_ignore to make sure we haven't pulled in
- * something we're not supposed to.
- */
- int usedep = 1;
- if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(sync))) {
- pmpkg_t *dummypkg = _alpm_pkg_new(miss->target, NULL);
- QUESTION(trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, dummypkg, sync, NULL, &usedep);
- FREEPKG(dummypkg);
- }
- if(usedep) {
- trail = alpm_list_add(trail, sync);
- if(_alpm_resolvedeps(local, dbs_sync, sync, list, trail, trans, data)) {
- goto error;
- }
- _alpm_log(PM_LOG_DEBUG, _("pulling dependency %s (needed by %s)"),
- alpm_pkg_get_name(sync), alpm_pkg_get_name(syncpkg));
- list = alpm_list_add(list, sync);
- } else {
- _alpm_log(PM_LOG_ERROR, _("cannot resolve dependencies for \"%s\""), miss->target);
- if(data) {
- if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmdepmissing_t));
- FREELIST(*data);
- pm_errno = PM_ERR_MEMORY;
- goto error;
- }
- *miss = *(pmdepmissing_t *)i->data;
- *data = alpm_list_add(*data, miss);
- }
- pm_errno = PM_ERR_UNSATISFIED_DEPS;
+ } else {
+ _alpm_log(PM_LOG_DEBUG, "pulling dependency %s (needed by %s)\n",
+ alpm_pkg_get_name(sync), alpm_pkg_get_name(syncpkg));
+ *list = alpm_list_add(*list, sync);
+ if(_alpm_resolvedeps(local, dbs_sync, sync, list, remove, trans, data)) {
goto error;
}
- } else {
- /* cycle detected -- skip it */
- _alpm_log(PM_LOG_DEBUG, _("dependency cycle detected: %s"), sync->name);
}
}
-
- _alpm_log(PM_LOG_DEBUG, _("finished resolving dependencies"));
+
+ _alpm_log(PM_LOG_DEBUG, "finished resolving dependencies\n");
FREELIST(deps);
@@ -699,58 +606,95 @@ error:
return(-1);
}
-const char SYMEXPORT *alpm_dep_get_target(pmdepmissing_t *miss)
+const char SYMEXPORT *alpm_miss_get_target(const pmdepmissing_t *miss)
{
ALPM_LOG_FUNC;
/* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
ASSERT(miss != NULL, return(NULL));
return miss->target;
}
-pmdeptype_t SYMEXPORT alpm_dep_get_type(pmdepmissing_t *miss)
+pmdepend_t SYMEXPORT *alpm_miss_get_dep(pmdepmissing_t *miss)
{
ALPM_LOG_FUNC;
/* Sanity checks */
- ASSERT(handle != NULL, return(-1));
- ASSERT(miss != NULL, return(-1));
+ ASSERT(miss != NULL, return(NULL));
- return miss->type;
+ return &(miss->depend);
}
-pmdepmod_t SYMEXPORT alpm_dep_get_mod(pmdepmissing_t *miss)
+pmdepmod_t SYMEXPORT alpm_dep_get_mod(const pmdepend_t *dep)
{
ALPM_LOG_FUNC;
/* Sanity checks */
- ASSERT(handle != NULL, return(-1));
- ASSERT(miss != NULL, return(-1));
+ ASSERT(dep != NULL, return(-1));
- return miss->depend.mod;
+ return dep->mod;
}
-const char SYMEXPORT *alpm_dep_get_name(pmdepmissing_t *miss)
+const char SYMEXPORT *alpm_dep_get_name(const pmdepend_t *dep)
{
ALPM_LOG_FUNC;
/* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(miss != NULL, return(NULL));
+ ASSERT(dep != NULL, return(NULL));
- return miss->depend.name;
+ return dep->name;
}
-const char SYMEXPORT *alpm_dep_get_version(pmdepmissing_t *miss)
+const char SYMEXPORT *alpm_dep_get_version(const pmdepend_t *dep)
{
ALPM_LOG_FUNC;
/* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(miss != NULL, return(NULL));
+ ASSERT(dep != NULL, return(NULL));
+
+ return dep->version;
+}
+
+/** Reverse of splitdep; make a dep string from a pmdepend_t struct.
+ * The string must be freed!
+ * @param dep the depend to turn into a string
+ * @return a string-formatted dependency with operator if necessary
+ */
+char SYMEXPORT *alpm_dep_get_string(const pmdepend_t *dep)
+{
+ char *opr, *str = NULL;
+ size_t len;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(dep != NULL, return(NULL));
+
+ switch(dep->mod) {
+ case PM_DEP_MOD_ANY:
+ opr = "";
+ break;
+ case PM_DEP_MOD_GE:
+ opr = ">=";
+ break;
+ case PM_DEP_MOD_LE:
+ opr = "<=";
+ break;
+ case PM_DEP_MOD_EQ:
+ opr = "=";
+ break;
+ default:
+ opr = "";
+ break;
+ }
+
+ /* we can always compute len and print the string like this because opr
+ * and ver will be empty when PM_DEP_MOD_ANY is the depend type */
+ len = strlen(dep->name) + strlen(opr) + strlen(dep->version) + 1;
+ MALLOC(str, len, RET_ERR(PM_ERR_MEMORY, NULL));
+ snprintf(str, len, "%s%s%s", dep->name, opr, dep->version);
- return miss->depend.version;
+ return(str);
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h
index 8f3a9b91..2da39b8b 100644
--- a/lib/libalpm/deps.h
+++ b/lib/libalpm/deps.h
@@ -1,10 +1,10 @@
/*
* deps.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_DEPS_H
@@ -38,21 +38,24 @@ struct __pmdepend_t {
/* Missing dependency */
struct __pmdepmissing_t {
char target[PKG_NAME_LEN];
- pmdeptype_t type;
pmdepend_t depend;
};
-pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdeptype_t type,
- pmdepmod_t depmod, const char *depname,
- const char *depversion);
-int _alpm_depmiss_isin(pmdepmissing_t *needle, alpm_list_t *haystack);
+/* Graphs */
+struct __pmgraph_t {
+ int state; /* 0: untouched, -1: entered, other: leaving time */
+ void *data;
+ struct __pmgraph_t *parent; /* where did we come from? */
+ alpm_list_t *children;
+ alpm_list_t *childptr; /* points to a child in children list */
+};
+
+pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepmod_t depmod,
+ const char *depname, const char *depversion);
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode);
-alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
- alpm_list_t *packages);
-alpm_list_t *_alpm_removedeps(pmdb_t *db, alpm_list_t *targs);
+void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit);
int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
- alpm_list_t *list, alpm_list_t *trail, pmtrans_t *trans,
- alpm_list_t **data);
+ alpm_list_t **list, alpm_list_t *remove, pmtrans_t *trans, alpm_list_t **data);
#endif /* _ALPM_DEPS_H */
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index ece8a521..9ced6775 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -1,11 +1,11 @@
/*
* error.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,21 +18,24 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include "config.h"
-#include <libintl.h>
-
/* libalpm */
#include "error.h"
#include "util.h"
#include "alpm.h"
/* TODO does this really need a file all on its own? */
-char SYMEXPORT *alpm_strerror(int err)
+const char SYMEXPORT *alpm_strerrorlast(void)
+{
+ return alpm_strerror(pm_errno);
+}
+
+const char SYMEXPORT *alpm_strerror(int err)
{
switch(err) {
/* System */
@@ -44,6 +47,8 @@ char SYMEXPORT *alpm_strerror(int err)
return _("insufficient privileges");
case PM_ERR_NOT_A_FILE:
return _("could not find or read file");
+ case PM_ERR_NOT_A_DIR:
+ return _("could not find or read directory");
case PM_ERR_WRONG_ARGS:
return _("wrong or NULL argument passed");
/* Interface */
@@ -118,6 +123,11 @@ char SYMEXPORT *alpm_strerror(int err)
return _("corrupted package");
case PM_ERR_PKG_REPO_NOT_FOUND:
return _("no such repository");
+ /* Deltas */
+ case PM_ERR_DLT_CORRUPTED:
+ return _("corrupted delta");
+ case PM_ERR_DLT_PATCHFAILED:
+ return _("delta patch failed");
/* Groups */
case PM_ERR_GRP_NOT_FOUND:
return _("group not found");
@@ -135,20 +145,9 @@ char SYMEXPORT *alpm_strerror(int err)
return _("internal error");
case PM_ERR_LIBARCHIVE_ERROR:
return _("libarchive error");
- case PM_ERR_DISK_FULL:
- return _("not enough space on disk");
case PM_ERR_PKG_HOLD:
/* TODO wow this is not descriptive at all... what does this mean? */
return _("not confirmed");
- /* Configuration file */
- case PM_ERR_CONF_BAD_SECTION:
- return _("bad configuration section name");
- case PM_ERR_CONF_LOCAL:
- return _("'local' is reserved and cannot be used as a repository name");
- case PM_ERR_CONF_BAD_SYNTAX:
- return _("syntax error in config file");
- case PM_ERR_CONF_DIRECTIVE_OUTSIDE_SECTION:
- return _("all directives must belong to a section");
case PM_ERR_INVALID_REGEX:
return _("invalid regular expression");
/* Downloading */
diff --git a/lib/libalpm/error.h b/lib/libalpm/error.h
index 6294f05b..7692a944 100644
--- a/lib/libalpm/error.h
+++ b/lib/libalpm/error.h
@@ -1,8 +1,8 @@
/*
* error.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_ERROR_H
#define _ALPM_ERROR_H
#define RET_ERR(err, ret) do { pm_errno = (err); \
- _alpm_log(PM_LOG_DEBUG, _("returning error %d from %s : %s\n"), err, __func__, alpm_strerror(err)); \
+ _alpm_log(PM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerrorlast()); \
return(ret); } while(0)
#endif /* _ALPM_ERROR_H */
diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c
index cce05213..4ad39d6d 100644
--- a/lib/libalpm/group.c
+++ b/lib/libalpm/group.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <libintl.h>
/* libalpm */
#include "group.h"
@@ -40,20 +39,13 @@ pmgrp_t *_alpm_grp_new()
ALPM_LOG_FUNC;
- grp = calloc(1, sizeof(pmgrp_t));
- if(grp == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"),
- sizeof(pmgrp_t));
- RET_ERR(PM_ERR_MEMORY, NULL);
- }
+ CALLOC(grp, 1, sizeof(pmgrp_t), RET_ERR(PM_ERR_MEMORY, NULL));
return(grp);
}
-void _alpm_grp_free(void *data)
+void _alpm_grp_free(pmgrp_t *grp)
{
- pmgrp_t *grp = data;
-
ALPM_LOG_FUNC;
if(grp == NULL) {
@@ -62,8 +54,6 @@ void _alpm_grp_free(void *data)
FREELIST(grp->packages);
FREE(grp);
-
- return;
}
/* Helper function for sorting groups
@@ -76,7 +66,7 @@ int _alpm_grp_cmp(const void *g1, const void *g2)
return(strcmp(grp1->name, grp2->name));
}
-const char SYMEXPORT *alpm_grp_get_name(pmgrp_t *grp)
+const char SYMEXPORT *alpm_grp_get_name(const pmgrp_t *grp)
{
ALPM_LOG_FUNC;
@@ -86,7 +76,7 @@ const char SYMEXPORT *alpm_grp_get_name(pmgrp_t *grp)
return grp->name;
}
-alpm_list_t SYMEXPORT *alpm_grp_get_pkgs(pmgrp_t *grp)
+const alpm_list_t SYMEXPORT *alpm_grp_get_pkgs(const pmgrp_t *grp)
{
ALPM_LOG_FUNC;
diff --git a/lib/libalpm/group.h b/lib/libalpm/group.h
index c5366e64..477e701c 100644
--- a/lib/libalpm/group.h
+++ b/lib/libalpm/group.h
@@ -1,8 +1,8 @@
/*
* group.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_GROUP_H
@@ -31,11 +31,8 @@ struct __pmgrp_t {
alpm_list_t *packages; /* List of strings */
};
-#define FREEGRP(p) do { if(p) { _alpm_grp_free(p); p = NULL; } } while(0)
-#define FREELISTGRPS(p) _FREELIST(p, _alpm_grp_free)
-
pmgrp_t *_alpm_grp_new(void);
-void _alpm_grp_free(void *data);
+void _alpm_grp_free(pmgrp_t *grp);
int _alpm_grp_cmp(const void *g1, const void *g2);
#endif /* _ALPM_GROUP_H */
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index a6bb5bc8..755eefb3 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -1,10 +1,10 @@
/*
* handle.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -29,8 +29,9 @@
#include <limits.h>
#include <sys/types.h>
#include <syslog.h>
-#include <libintl.h>
#include <time.h>
+#include <sys/stat.h>
+#include <errno.h>
/* libalpm */
#include "handle.h"
@@ -42,62 +43,44 @@
#include "alpm.h"
#include "server.h"
+/* global var for handle (private to libalpm) */
+pmhandle_t *handle = NULL;
+
pmhandle_t *_alpm_handle_new()
{
pmhandle_t *handle;
- handle = (pmhandle_t *)malloc(sizeof(pmhandle_t));
- if(handle == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmhandle_t));
- RET_ERR(PM_ERR_MEMORY, NULL);
- }
+ ALPM_LOG_FUNC;
+
+ CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL));
- memset(handle, 0, sizeof(pmhandle_t));
handle->lckfd = -1;
+ handle->logstream = NULL;
-#ifndef CYGWIN
/* see if we're root or not */
handle->uid = geteuid();
-//#ifndef FAKEROOT
-// if(!handle->uid && getenv("FAKEROOTKEY")) {
-// /* fakeroot doesn't count, we're non-root */
-// handle->uid = 99;
-// }
-//#endif
-//
-// /* see if we're root or not (fakeroot does not count) */
-//#ifndef FAKEROOT
-// if(handle->uid == 0 && !getenv("FAKEROOTKEY")) {
-// /* } make vim indent work - stupid ifdef's */
-//#else
-// if(handle->uid == 0) {
-//#endif
-// handle->access = PM_ACCESS_RW;
-// } else {
-// handle->access = PM_ACCESS_RO;
-// }
-//#else
- handle->access = PM_ACCESS_RW;
-#endif
-
- handle->root = strdup(PM_ROOT);
- handle->dbpath = strdup(PM_DBPATH);
- handle->cachedir = strdup(PM_CACHEDIR);
- handle->logmask = PM_LOG_ERROR | PM_LOG_WARNING;
+ handle->root = NULL;
+ handle->dbpath = NULL;
+ handle->cachedirs = NULL;
+ handle->lockfile = NULL;
+ handle->logfile = NULL;
+ handle->usedelta = 0;
return(handle);
}
-int _alpm_handle_free(pmhandle_t *handle)
+void _alpm_handle_free(pmhandle_t *handle)
{
ALPM_LOG_FUNC;
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ if(handle == NULL) {
+ return;
+ }
- /* close logfiles */
- if(handle->logfd) {
- fclose(handle->logfd);
- handle->logfd = NULL;
+ /* close logfile */
+ if(handle->logstream) {
+ fclose(handle->logstream);
+ handle->logstream= NULL;
}
if(handle->usesyslog) {
handle->usesyslog = 0;
@@ -105,197 +88,419 @@ int _alpm_handle_free(pmhandle_t *handle)
}
/* free memory */
- FREETRANS(handle->trans);
+ _alpm_trans_free(handle->trans);
FREE(handle->root);
FREE(handle->dbpath);
- FREE(handle->cachedir);
+ FREELIST(handle->cachedirs);
FREE(handle->logfile);
+ FREE(handle->lockfile);
FREE(handle->xfercommand);
FREELIST(handle->dbs_sync);
FREELIST(handle->noupgrade);
FREELIST(handle->noextract);
FREELIST(handle->ignorepkg);
FREELIST(handle->holdpkg);
+ FREELIST(handle->ignoregrp);
FREE(handle);
+}
- return(0);
+alpm_cb_log SYMEXPORT alpm_option_get_logcb()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->logcb;
+}
+
+alpm_cb_download SYMEXPORT alpm_option_get_dlcb()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->dlcb;
+}
+
+const char SYMEXPORT *alpm_option_get_root()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->root;
+}
+
+const char SYMEXPORT *alpm_option_get_dbpath()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->dbpath;
+}
+
+alpm_list_t SYMEXPORT *alpm_option_get_cachedirs()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->cachedirs;
+}
+
+const char SYMEXPORT *alpm_option_get_logfile()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->logfile;
+}
+
+const char SYMEXPORT *alpm_option_get_lockfile()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->lockfile;
+}
+
+unsigned short SYMEXPORT alpm_option_get_usesyslog()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return -1;
+ }
+ return handle->usesyslog;
+}
+
+alpm_list_t SYMEXPORT *alpm_option_get_noupgrades()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->noupgrade;
+}
+
+alpm_list_t SYMEXPORT *alpm_option_get_noextracts()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->noextract;
+}
+
+alpm_list_t SYMEXPORT *alpm_option_get_ignorepkgs()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->ignorepkg;
+}
+
+alpm_list_t SYMEXPORT *alpm_option_get_holdpkgs()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->holdpkg;
+}
+
+alpm_list_t SYMEXPORT *alpm_option_get_ignoregrps()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->ignoregrp;
+}
+
+time_t SYMEXPORT alpm_option_get_upgradedelay()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return -1;
+ }
+ return handle->upgradedelay;
+}
+
+const char SYMEXPORT *alpm_option_get_xfercommand()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->xfercommand;
+}
+
+unsigned short SYMEXPORT alpm_option_get_nopassiveftp()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return -1;
+ }
+ return handle->nopassiveftp;
+}
+
+pmdb_t SYMEXPORT *alpm_option_get_localdb()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->db_local;
}
-alpm_cb_log alpm_option_get_logcb() { return (handle ? handle->logcb : NULL); }
-alpm_cb_download alpm_option_get_dlcb() { return (handle ? handle->dlcb : NULL); }
-unsigned short SYMEXPORT alpm_option_get_logmask() { return handle->logmask; }
-const char SYMEXPORT *alpm_option_get_root() { return handle->root; }
-const char SYMEXPORT *alpm_option_get_dbpath() { return handle->dbpath; }
-const char SYMEXPORT *alpm_option_get_cachedir() { return handle->cachedir; }
-const char *alpm_option_get_logfile() { return handle->logfile; }
-unsigned short alpm_option_get_usesyslog() { return handle->usesyslog; }
-alpm_list_t *alpm_option_get_noupgrades() { return handle->noupgrade; }
-alpm_list_t *alpm_option_get_noextracts() { return handle->noextract; }
-alpm_list_t *alpm_option_get_ignorepkgs() { return handle->ignorepkg; }
-alpm_list_t *alpm_option_get_holdpkgs() { return handle->holdpkg; }
-time_t alpm_option_get_upgradedelay() { return handle->upgradedelay; }
-const char *alpm_option_get_xfercommand() { return handle->xfercommand; }
-unsigned short alpm_option_get_nopassiveftp() { return handle->nopassiveftp; }
-unsigned short SYMEXPORT alpm_option_get_chomp() { return handle->chomp; }
-unsigned short alpm_option_get_usecolor() { return handle->use_color; }
-
-pmdb_t SYMEXPORT *alpm_option_get_localdb() { return handle->db_local; }
alpm_list_t SYMEXPORT *alpm_option_get_syncdbs()
{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
return handle->dbs_sync;
}
-void SYMEXPORT alpm_option_set_logcb(alpm_cb_log cb) { handle->logcb = cb; }
-
-void SYMEXPORT alpm_option_set_dlcb(alpm_cb_download cb) { handle->dlcb = cb; }
+void SYMEXPORT alpm_option_set_logcb(alpm_cb_log cb)
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return;
+ }
+ handle->logcb = cb;
+}
-void SYMEXPORT alpm_option_set_logmask(unsigned short mask) { handle->logmask = mask; }
+void SYMEXPORT alpm_option_set_dlcb(alpm_cb_download cb)
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return;
+ }
+ handle->dlcb = cb;
+}
-void SYMEXPORT alpm_option_set_root(const char *root)
+int SYMEXPORT alpm_option_set_root(const char *root)
{
- if(handle->root) FREE(handle->root);
- /* According to the man page, realpath is safe to use IFF the second arg is
- * NULL. */
- char *realroot = realpath(root, NULL);
- if(realroot) {
- root = realroot;
- } else {
- _alpm_log(PM_LOG_ERROR, _("cannot canonicalize specified root path '%s'"), root);
+ struct stat st;
+ char *realroot;
+ size_t rootlen;
+
+ ALPM_LOG_FUNC;
+
+ if(!root) {
+ pm_errno = PM_ERR_WRONG_ARGS;
+ return(-1);
+ }
+ if(stat(root, &st) == -1 || !S_ISDIR(st.st_mode)) {
+ pm_errno = PM_ERR_NOT_A_DIR;
+ return(-1);
}
- if(root) {
- /* verify root ends in a '/' */
- int rootlen = strlen(realroot);
- if(realroot[rootlen-1] != '/') {
- rootlen += 1;
- }
- handle->root = calloc(rootlen+1, sizeof(char));
- strncpy(handle->root, realroot, rootlen);
- handle->root[rootlen-1] = '/';
- _alpm_log(PM_LOG_DEBUG, _("option 'root' = %s"), handle->root);
+ realroot = calloc(PATH_MAX+1, sizeof(char));
+ if(!realpath(root, realroot)) {
+ pm_errno = PM_ERR_NOT_A_DIR;
+ return(-1);
+ }
+ /* verify root ends in a '/' */
+ rootlen = strlen(realroot);
+ if(realroot[rootlen-1] != '/') {
+ rootlen += 1;
}
- if(realroot) {
- free(realroot);
+ if(handle->root) {
+ FREE(handle->root);
}
+ handle->root = calloc(rootlen + 1, sizeof(char));
+ strncpy(handle->root, realroot, rootlen);
+ handle->root[rootlen-1] = '/';
+ FREE(realroot);
+ _alpm_log(PM_LOG_DEBUG, "option 'root' = %s\n", handle->root);
+ return(0);
}
-void SYMEXPORT alpm_option_set_dbpath(const char *dbpath)
+int SYMEXPORT alpm_option_set_dbpath(const char *dbpath)
{
- if(handle->dbpath) FREE(handle->dbpath);
- if(dbpath) {
- /* verify dbpath ends in a '/' */
- int dbpathlen = strlen(dbpath);
- if(dbpath[dbpathlen-1] != '/') {
- dbpathlen += 1;
- }
- handle->dbpath = calloc(dbpathlen+1, sizeof(char));
- strncpy(handle->dbpath, dbpath, dbpathlen);
- handle->dbpath[dbpathlen-1] = '/';
- _alpm_log(PM_LOG_DEBUG, _("option 'dbpath' = %s"), handle->dbpath);
+ struct stat st;
+ size_t dbpathlen, lockfilelen;
+ const char *lf = "db.lck";
+
+ ALPM_LOG_FUNC;
+
+ if(!dbpath) {
+ pm_errno = PM_ERR_WRONG_ARGS;
+ return(-1);
+ }
+ if(stat(dbpath, &st) == -1 || !S_ISDIR(st.st_mode)) {
+ pm_errno = PM_ERR_NOT_A_DIR;
+ return(-1);
+ }
+ /* verify dbpath ends in a '/' */
+ dbpathlen = strlen(dbpath);
+ if(dbpath[dbpathlen-1] != '/') {
+ dbpathlen += 1;
+ }
+ if(handle->dbpath) {
+ FREE(handle->dbpath);
}
+ handle->dbpath = calloc(dbpathlen+1, sizeof(char));
+ strncpy(handle->dbpath, dbpath, dbpathlen);
+ handle->dbpath[dbpathlen-1] = '/';
+ _alpm_log(PM_LOG_DEBUG, "option 'dbpath' = %s\n", handle->dbpath);
+
+ if(handle->lockfile) {
+ FREE(handle->lockfile);
+ }
+ lockfilelen = strlen(handle->dbpath) + strlen(lf) + 1;
+ handle->lockfile = calloc(lockfilelen, sizeof(char));
+ snprintf(handle->lockfile, lockfilelen, "%s%s", handle->dbpath, lf);
+ _alpm_log(PM_LOG_DEBUG, "option 'lockfile' = %s\n", handle->lockfile);
+ return(0);
}
-void SYMEXPORT alpm_option_set_cachedir(const char *cachedir)
+int SYMEXPORT alpm_option_add_cachedir(const char *cachedir)
{
- if(handle->cachedir) FREE(handle->cachedir);
- if(cachedir) {
- /* verify cachedir ends in a '/' */
- int cachedirlen = strlen(cachedir);
- if(cachedir[cachedirlen-1] != '/') {
- cachedirlen += 1;
- }
- handle->cachedir = calloc(cachedirlen+1, sizeof(char));
- strncpy(handle->cachedir, cachedir, cachedirlen);
- handle->cachedir[cachedirlen-1] = '/';
- _alpm_log(PM_LOG_DEBUG, _("option 'cachedir' = %s"), handle->cachedir);
+ struct stat st;
+ char *newcachedir;
+ size_t cachedirlen;
+
+ ALPM_LOG_FUNC;
+
+ if(!cachedir) {
+ pm_errno = PM_ERR_WRONG_ARGS;
+ return(-1);
+ }
+ if(stat(cachedir, &st) == -1 || !S_ISDIR(st.st_mode)) {
+ pm_errno = PM_ERR_NOT_A_DIR;
+ return(-1);
+ }
+ /* verify cachedir ends in a '/' */
+ cachedirlen = strlen(cachedir);
+ if(cachedir[cachedirlen-1] != '/') {
+ cachedirlen += 1;
}
+ newcachedir = calloc(cachedirlen + 1, sizeof(char));
+ strncpy(newcachedir, cachedir, cachedirlen);
+ newcachedir[cachedirlen-1] = '/';
+ handle->cachedirs = alpm_list_add(handle->cachedirs, newcachedir);
+ _alpm_log(PM_LOG_DEBUG, "option 'cachedir' = %s\n", newcachedir);
+ return(0);
+}
+
+void SYMEXPORT alpm_option_set_cachedirs(alpm_list_t *cachedirs)
+{
+ if(handle->cachedirs) FREELIST(handle->cachedirs);
+ if(cachedirs) handle->cachedirs = cachedirs;
}
-void alpm_option_set_logfile(const char *logfile)
+int SYMEXPORT alpm_option_set_logfile(const char *logfile)
{
+ char *oldlogfile = handle->logfile;
+
ALPM_LOG_FUNC;
- if(handle->logfile) {
- FREE(handle->logfile);
- if(handle->logfd) {
- fclose(handle->logfd);
- handle->logfd = NULL;
- }
+ if(!logfile) {
+ pm_errno = PM_ERR_WRONG_ARGS;
+ return(-1);
+ }
+
+ handle->logfile = strdup(logfile);
+
+ /* free the old logfile path string, and close the stream so logaction
+ * will reopen a new stream on the new logfile */
+ if(oldlogfile) {
+ FREE(oldlogfile);
}
- if(logfile) {
- handle->logfile = strdup(logfile);
- handle->logfd = fopen(logfile, "a");
+ if(handle->logstream) {
+ fclose(handle->logstream);
}
+ _alpm_log(PM_LOG_DEBUG, "option 'logfile' = %s\n", handle->logfile);
+ return(0);
}
-void alpm_option_set_usesyslog(unsigned short usesyslog)
+void SYMEXPORT alpm_option_set_usesyslog(unsigned short usesyslog)
{
handle->usesyslog = usesyslog;
}
-void alpm_option_add_noupgrade(char *pkg)
+void SYMEXPORT alpm_option_add_noupgrade(const char *pkg)
{
handle->noupgrade = alpm_list_add(handle->noupgrade, strdup(pkg));
}
-void alpm_option_set_noupgrades(alpm_list_t *noupgrade)
+void SYMEXPORT alpm_option_set_noupgrades(alpm_list_t *noupgrade)
{
if(handle->noupgrade) FREELIST(handle->noupgrade);
if(noupgrade) handle->noupgrade = noupgrade;
}
-void alpm_option_add_noextract(char *pkg)
+void SYMEXPORT alpm_option_add_noextract(const char *pkg)
{
handle->noextract = alpm_list_add(handle->noextract, strdup(pkg));
}
-void alpm_option_set_noextracts(alpm_list_t *noextract)
+
+void SYMEXPORT alpm_option_set_noextracts(alpm_list_t *noextract)
{
if(handle->noextract) FREELIST(handle->noextract);
if(noextract) handle->noextract = noextract;
}
-void SYMEXPORT alpm_option_add_ignorepkg(char *pkg)
+void SYMEXPORT alpm_option_add_ignorepkg(const char *pkg)
{
handle->ignorepkg = alpm_list_add(handle->ignorepkg, strdup(pkg));
}
+
void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs)
{
if(handle->ignorepkg) FREELIST(handle->ignorepkg);
if(ignorepkgs) handle->ignorepkg = ignorepkgs;
}
-void alpm_option_add_holdpkg(char *pkg)
+void SYMEXPORT alpm_option_add_holdpkg(const char *pkg)
{
handle->holdpkg = alpm_list_add(handle->holdpkg, strdup(pkg));
}
-void alpm_option_set_holdpkgs(alpm_list_t *holdpkgs)
+
+void SYMEXPORT alpm_option_set_holdpkgs(alpm_list_t *holdpkgs)
{
if(handle->holdpkg) FREELIST(handle->holdpkg);
if(holdpkgs) handle->holdpkg = holdpkgs;
}
-void alpm_option_set_upgradedelay(time_t delay)
+void SYMEXPORT alpm_option_add_ignoregrp(const char *grp)
+{
+ handle->ignoregrp = alpm_list_add(handle->ignoregrp, strdup(grp));
+}
+
+void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps)
+{
+ if(handle->ignoregrp) FREELIST(handle->ignoregrp);
+ if(ignoregrps) handle->ignoregrp = ignoregrps;
+}
+
+void SYMEXPORT alpm_option_set_upgradedelay(time_t delay)
{
handle->upgradedelay = delay;
}
-void alpm_option_set_xfercommand(const char *cmd)
+void SYMEXPORT alpm_option_set_xfercommand(const char *cmd)
{
if(handle->xfercommand) FREE(handle->xfercommand);
if(cmd) handle->xfercommand = strdup(cmd);
}
-void alpm_option_set_nopassiveftp(unsigned short nopasv)
+void SYMEXPORT alpm_option_set_nopassiveftp(unsigned short nopasv)
{
handle->nopassiveftp = nopasv;
}
-void alpm_option_set_chomp(unsigned short chomp) { handle->chomp = chomp; }
-
-void alpm_option_set_usecolor(unsigned short usecolor)
+void SYMEXPORT alpm_option_set_usedelta(unsigned short usedelta)
{
- handle->use_color = usecolor;
+ handle->usedelta = usedelta;
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index 35e5eb23..fb3ced3c 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -1,8 +1,8 @@
/*
* handle.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,13 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_HANDLE_H
#define _ALPM_HANDLE_H
-#include <stdio.h>
+#include <stdio.h>
+#include <sys/types.h>
#include "alpm_list.h"
#include "db.h"
@@ -29,50 +30,46 @@
#include "alpm.h"
#include "trans.h"
-typedef enum _pmaccess_t {
- PM_ACCESS_RO,
- PM_ACCESS_RW
-} pmaccess_t;
-
typedef struct _pmhandle_t {
- /* Internal */
- pmaccess_t access;
- uid_t uid;
- pmdb_t *db_local;
- alpm_list_t *dbs_sync; /* List of (pmdb_t *) */
- FILE *logfd;
- int lckfd;
+ /* internal usage */
+ uid_t uid; /* current UID */ /* TODO is this used? */
+ pmdb_t *db_local; /* local db pointer */
+ alpm_list_t *dbs_sync; /* List of (pmdb_t *) */
+ FILE *logstream; /* log file stream pointer */
+ int lckfd; /* lock file descriptor if one exists */
pmtrans_t *trans;
-
- /* options */
- alpm_cb_log logcb; /* Log callback function */
- alpm_cb_download dlcb; /* Download callback function */
- unsigned short logmask; /* Output mask for logging functions */
- char *root; /* Root path, default '/' */
- char *dbpath; /* Base path to pacman's DBs */
- char *cachedir; /* Base path to pacman's cache */
- char *logfile; /* Name of the file to log to */ /*TODO is this used?*/
- unsigned short usesyslog; /* Use syslog instead of logfile? */
-
- alpm_list_t *noupgrade; /* List of packages NOT to be upgraded */
- alpm_list_t *noextract; /* List of packages NOT to extrace */ /*TODO is this used?*/
- alpm_list_t *ignorepkg; /* List of packages to ignore */
- alpm_list_t *holdpkg; /* List of packages which 'hold' pacman */
- time_t upgradedelay; /* Amount of time to wait before upgrading a package*/
- /* servers */
- char *xfercommand; /* External download command */
+ /* callback functions */
+ alpm_cb_log logcb; /* Log callback function */
+ alpm_cb_download dlcb; /* Download callback function */
+
+ /* filesystem paths */
+ char *root; /* Root path, default '/' */
+ char *dbpath; /* Base path to pacman's DBs */
+ char *logfile; /* Name of the log file */
+ char *lockfile; /* Name of the lock file */
+ alpm_list_t *cachedirs; /* Paths to pacman cache directories */
+
+ /* package lists */
+ alpm_list_t *noupgrade; /* List of packages NOT to be upgraded */
+ alpm_list_t *noextract; /* List of packages NOT to extract */ /*TODO is this used?*/
+ alpm_list_t *ignorepkg; /* List of packages to ignore */
+ alpm_list_t *holdpkg; /* List of packages which 'hold' pacman */
+ alpm_list_t *ignoregrp; /* List of groups to ignore */
+
+ /* options */
+ unsigned short usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */
unsigned short nopassiveftp; /* Don't use PASV ftp connections */
- unsigned short chomp; /* I Love Candy! */
- unsigned short use_color; /* enable colorful output */
+ time_t upgradedelay; /* Time to wait before upgrading a package */
+ char *xfercommand; /* External download command */
+ unsigned short usedelta; /* Download deltas if possible */
} pmhandle_t;
+/* global handle variable */
extern pmhandle_t *handle;
-#define FREEHANDLE(p) do { if (p) { _alpm_handle_free(p); p = NULL; } } while (0)
-
pmhandle_t *_alpm_handle_new();
-int _alpm_handle_free(pmhandle_t *handle);
+void _alpm_handle_free(pmhandle_t *handle);
#endif /* _ALPM_HANDLE_H */
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index b59ec64e..f666a099 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -1,8 +1,8 @@
/*
* log.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -23,29 +23,85 @@
#include <stdio.h>
#include <stdarg.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
#include <time.h>
/* libalpm */
#include "log.h"
+#include "handle.h"
+#include "util.h"
+#include "error.h"
#include "alpm.h"
+/** \addtogroup alpm_log Logging Functions
+ * @brief Functions to log using libalpm
+ * @{
+ */
+
+/** A printf-like function for logging.
+ * @param fmt output format
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_logaction(char *fmt, ...)
+{
+ int ret;
+ va_list args;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+
+ /* check if the logstream is open already, opening it if needed */
+ if(handle->logstream == NULL) {
+ handle->logstream = fopen(handle->logfile, "a");
+ /* if we couldn't open it, we have an issue */
+ if(handle->logstream == NULL) {
+ if(errno == EACCES) {
+ pm_errno = PM_ERR_BADPERMS;
+ } else if(errno == ENOENT) {
+ pm_errno = PM_ERR_NOT_A_DIR;
+ } else {
+ pm_errno = PM_ERR_SYSTEM;
+ }
+ return(-1);
+ }
+ }
+
+ va_start(args, fmt);
+ ret = _alpm_logaction(handle->usesyslog, handle->logstream, fmt, args);
+ va_end(args);
+
+ /* TODO We should add a prefix to log strings depending on who called us.
+ * If logaction was called by the frontend:
+ * USER: <the frontend log>
+ * and if called internally:
+ * ALPM: <the library log>
+ * Moreover, the frontend should be able to choose its prefix
+ * (USER by default?):
+ * pacman: "PACMAN"
+ * kpacman: "KPACMAN"
+ * This would allow us to share the log file between several frontends
+ * and know who does what */
+ return(ret);
+}
+
+/** @} */
+
void _alpm_log(pmloglevel_t flag, char *fmt, ...)
{
+ va_list args;
alpm_cb_log logcb = alpm_option_get_logcb();
+
if(logcb == NULL) {
return;
}
- if(flag & alpm_option_get_logmask()) {
- char str[LOG_STR_LEN];
- va_list args;
-
- va_start(args, fmt);
- vsnprintf(str, LOG_STR_LEN, fmt, args);
- va_end(args);
-
- logcb(flag, str);
- }
+ va_start(args, fmt);
+ logcb(flag, fmt, args);
+ va_end(args);
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/log.h b/lib/libalpm/log.h
index eb0b718d..00bb8152 100644
--- a/lib/libalpm/log.h
+++ b/lib/libalpm/log.h
@@ -1,8 +1,8 @@
/*
* log.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_LOG_H
@@ -23,16 +23,14 @@
#include "alpm.h"
-#define LOG_STR_LEN 1024
-
#ifdef PACMAN_DEBUG
/* Log funtion entry points if debugging is enabled */
-#define ALPM_LOG_FUNC _alpm_log(PM_LOG_FUNCTION, "Enter %s", __func__)
+#define ALPM_LOG_FUNC _alpm_log(PM_LOG_FUNCTION, "Enter %s\n", __func__)
#else
#define ALPM_LOG_FUNC
#endif
-void _alpm_log(pmloglevel_t flag, char *fmt, ...);
+void _alpm_log(pmloglevel_t flag, char *fmt, ...) __attribute__((format(printf,2,3)));
#endif /* _ALPM_LOG_H */
diff --git a/lib/libalpm/md5.c b/lib/libalpm/md5.c
index 6d5aa6a3..2d111c9d 100644
--- a/lib/libalpm/md5.c
+++ b/lib/libalpm/md5.c
@@ -1,307 +1,335 @@
-/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
+/*
+ * RFC 1321 compliant MD5 implementation
+ *
+ * Copyright (C) 2006-2007 Christophe Devine
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License, version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
-
-/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
-rights reserved.
-
-License to copy and use this software is granted provided that it
-is identified as the "RSA Data Security, Inc. MD5 Message-Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
-
-License is also granted to make and use derivative works provided
-that such works are identified as "derived from the RSA Data
-Security, Inc. MD5 Message-Digest Algorithm" in all material
-mentioning or referencing the derived work.
-
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-
-These notices must be retained in any copies of any part of this
-documentation and/or software.
+/*
+ * The MD5 algorithm was designed by Ron Rivest in 1991.
+ *
+ * http://www.ietf.org/rfc/rfc1321.txt
*/
+/*
+ * Pacman Notes:
+ *
+ * Taken from the XySSL project at www.xyssl.org under terms of the
+ * LGPL. This is from version 0.7 of the library, and has been modified
+ * as following, which may be helpful for future updates:
+ * * change include from "xyssl/md5.h" to "md5.h"
+ * * removal of HMAC code
+ * * removal of SELF_TEST code
+ * * removal of ipad and opad from the md5_context struct in md5.h
+ * * change of md5_file prototype from
+ * int md5_file( char *path, unsigned char *output )
+ * to
+ * int md5_file( const char *path, unsigned char *output )
+ */
+
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE 1
+#endif
#include <string.h>
+#include <stdio.h>
#include "md5.h"
-/* Constants for MD5Transform routine.
+/*
+ * 32-bit integer manipulation macros (little endian)
*/
+#ifndef GET_UINT32_LE
+#define GET_UINT32_LE(n,b,i) \
+{ \
+ (n) = ( (unsigned long) (b)[(i) ] ) \
+ | ( (unsigned long) (b)[(i) + 1] << 8 ) \
+ | ( (unsigned long) (b)[(i) + 2] << 16 ) \
+ | ( (unsigned long) (b)[(i) + 3] << 24 ); \
+}
+#endif
+
+#ifndef PUT_UINT32_LE
+#define PUT_UINT32_LE(n,b,i) \
+{ \
+ (b)[(i) ] = (unsigned char) ( (n) ); \
+ (b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \
+ (b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \
+ (b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \
+}
+#endif
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
-
-static void MD5Transform(UINT4 [4], unsigned char [64]);
-static void Encode(unsigned char *, UINT4 *, unsigned int);
-static void Decode(UINT4 *, unsigned char *, unsigned int);
-
-static unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/* F, G, H and I are basic MD5 functions.
+/*
+ * MD5 context setup
*/
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
+static inline void md5_starts( md5_context *ctx )
+{
+ ctx->total[0] = 0;
+ ctx->total[1] = 0;
-/* ROTATE_LEFT rotates x left n bits.
- */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+ ctx->state[0] = 0x67452301;
+ ctx->state[1] = 0xEFCDAB89;
+ ctx->state[2] = 0x98BADCFE;
+ ctx->state[3] = 0x10325476;
+}
-/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
-Rotation is separate from addition to prevent recomputation.
- */
-#define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-
-/* MD5 initialization. Begins an MD5 operation, writing a new context.
- */
-void _alpm_MD5Init (context)
-MD5_CTX *context; /* context */
+static inline void md5_process( md5_context *ctx, unsigned char data[64] )
{
- context->count[0] = context->count[1] = 0;
- /* Load magic initialization constants.
-*/
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
+ unsigned long X[16], A, B, C, D;
+
+ GET_UINT32_LE( X[ 0], data, 0 );
+ GET_UINT32_LE( X[ 1], data, 4 );
+ GET_UINT32_LE( X[ 2], data, 8 );
+ GET_UINT32_LE( X[ 3], data, 12 );
+ GET_UINT32_LE( X[ 4], data, 16 );
+ GET_UINT32_LE( X[ 5], data, 20 );
+ GET_UINT32_LE( X[ 6], data, 24 );
+ GET_UINT32_LE( X[ 7], data, 28 );
+ GET_UINT32_LE( X[ 8], data, 32 );
+ GET_UINT32_LE( X[ 9], data, 36 );
+ GET_UINT32_LE( X[10], data, 40 );
+ GET_UINT32_LE( X[11], data, 44 );
+ GET_UINT32_LE( X[12], data, 48 );
+ GET_UINT32_LE( X[13], data, 52 );
+ GET_UINT32_LE( X[14], data, 56 );
+ GET_UINT32_LE( X[15], data, 60 );
+
+#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
+
+#define P(a,b,c,d,k,s,t) \
+{ \
+ a += F(b,c,d) + X[k] + t; a = S(a,s) + b; \
+}
+
+ A = ctx->state[0];
+ B = ctx->state[1];
+ C = ctx->state[2];
+ D = ctx->state[3];
+
+#define F(x,y,z) (z ^ (x & (y ^ z)))
+
+ P( A, B, C, D, 0, 7, 0xD76AA478 );
+ P( D, A, B, C, 1, 12, 0xE8C7B756 );
+ P( C, D, A, B, 2, 17, 0x242070DB );
+ P( B, C, D, A, 3, 22, 0xC1BDCEEE );
+ P( A, B, C, D, 4, 7, 0xF57C0FAF );
+ P( D, A, B, C, 5, 12, 0x4787C62A );
+ P( C, D, A, B, 6, 17, 0xA8304613 );
+ P( B, C, D, A, 7, 22, 0xFD469501 );
+ P( A, B, C, D, 8, 7, 0x698098D8 );
+ P( D, A, B, C, 9, 12, 0x8B44F7AF );
+ P( C, D, A, B, 10, 17, 0xFFFF5BB1 );
+ P( B, C, D, A, 11, 22, 0x895CD7BE );
+ P( A, B, C, D, 12, 7, 0x6B901122 );
+ P( D, A, B, C, 13, 12, 0xFD987193 );
+ P( C, D, A, B, 14, 17, 0xA679438E );
+ P( B, C, D, A, 15, 22, 0x49B40821 );
+
+#undef F
+
+#define F(x,y,z) (y ^ (z & (x ^ y)))
+
+ P( A, B, C, D, 1, 5, 0xF61E2562 );
+ P( D, A, B, C, 6, 9, 0xC040B340 );
+ P( C, D, A, B, 11, 14, 0x265E5A51 );
+ P( B, C, D, A, 0, 20, 0xE9B6C7AA );
+ P( A, B, C, D, 5, 5, 0xD62F105D );
+ P( D, A, B, C, 10, 9, 0x02441453 );
+ P( C, D, A, B, 15, 14, 0xD8A1E681 );
+ P( B, C, D, A, 4, 20, 0xE7D3FBC8 );
+ P( A, B, C, D, 9, 5, 0x21E1CDE6 );
+ P( D, A, B, C, 14, 9, 0xC33707D6 );
+ P( C, D, A, B, 3, 14, 0xF4D50D87 );
+ P( B, C, D, A, 8, 20, 0x455A14ED );
+ P( A, B, C, D, 13, 5, 0xA9E3E905 );
+ P( D, A, B, C, 2, 9, 0xFCEFA3F8 );
+ P( C, D, A, B, 7, 14, 0x676F02D9 );
+ P( B, C, D, A, 12, 20, 0x8D2A4C8A );
+
+#undef F
+
+#define F(x,y,z) (x ^ y ^ z)
+
+ P( A, B, C, D, 5, 4, 0xFFFA3942 );
+ P( D, A, B, C, 8, 11, 0x8771F681 );
+ P( C, D, A, B, 11, 16, 0x6D9D6122 );
+ P( B, C, D, A, 14, 23, 0xFDE5380C );
+ P( A, B, C, D, 1, 4, 0xA4BEEA44 );
+ P( D, A, B, C, 4, 11, 0x4BDECFA9 );
+ P( C, D, A, B, 7, 16, 0xF6BB4B60 );
+ P( B, C, D, A, 10, 23, 0xBEBFBC70 );
+ P( A, B, C, D, 13, 4, 0x289B7EC6 );
+ P( D, A, B, C, 0, 11, 0xEAA127FA );
+ P( C, D, A, B, 3, 16, 0xD4EF3085 );
+ P( B, C, D, A, 6, 23, 0x04881D05 );
+ P( A, B, C, D, 9, 4, 0xD9D4D039 );
+ P( D, A, B, C, 12, 11, 0xE6DB99E5 );
+ P( C, D, A, B, 15, 16, 0x1FA27CF8 );
+ P( B, C, D, A, 2, 23, 0xC4AC5665 );
+
+#undef F
+
+#define F(x,y,z) (y ^ (x | ~z))
+
+ P( A, B, C, D, 0, 6, 0xF4292244 );
+ P( D, A, B, C, 7, 10, 0x432AFF97 );
+ P( C, D, A, B, 14, 15, 0xAB9423A7 );
+ P( B, C, D, A, 5, 21, 0xFC93A039 );
+ P( A, B, C, D, 12, 6, 0x655B59C3 );
+ P( D, A, B, C, 3, 10, 0x8F0CCC92 );
+ P( C, D, A, B, 10, 15, 0xFFEFF47D );
+ P( B, C, D, A, 1, 21, 0x85845DD1 );
+ P( A, B, C, D, 8, 6, 0x6FA87E4F );
+ P( D, A, B, C, 15, 10, 0xFE2CE6E0 );
+ P( C, D, A, B, 6, 15, 0xA3014314 );
+ P( B, C, D, A, 13, 21, 0x4E0811A1 );
+ P( A, B, C, D, 4, 6, 0xF7537E82 );
+ P( D, A, B, C, 11, 10, 0xBD3AF235 );
+ P( C, D, A, B, 2, 15, 0x2AD7D2BB );
+ P( B, C, D, A, 9, 21, 0xEB86D391 );
+
+#undef F
+
+ ctx->state[0] += A;
+ ctx->state[1] += B;
+ ctx->state[2] += C;
+ ctx->state[3] += D;
}
-/* MD5 block update operation. Continues an MD5 message-digest
- operation, processing another message block, and updating the
- context.
+/*
+ * MD5 process buffer
*/
-void _alpm_MD5Update (context, input, inputLen)
-MD5_CTX *context; /* context */
-unsigned char *input; /* input block */
-unsigned int inputLen; /* length of input block */
+static inline void md5_update( md5_context *ctx, unsigned char *input, int ilen )
{
- unsigned int i, index, partLen;
-
- /* Compute number of bytes mod 64 */
- index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+ int fill;
+ unsigned long left;
+
+ if( ilen <= 0 )
+ return;
+
+ left = ctx->total[0] & 0x3F;
+ fill = 64 - left;
+
+ ctx->total[0] += ilen;
+ ctx->total[0] &= 0xFFFFFFFF;
+
+ if( ctx->total[0] < (unsigned long) ilen )
+ ctx->total[1]++;
+
+ if( left && ilen >= fill )
+ {
+ memcpy( (void *) (ctx->buffer + left),
+ (void *) input, fill );
+ md5_process( ctx, ctx->buffer );
+ input += fill;
+ ilen -= fill;
+ left = 0;
+ }
+
+ while( ilen >= 64 )
+ {
+ md5_process( ctx, input );
+ input += 64;
+ ilen -= 64;
+ }
+
+ if( ilen > 0 )
+ {
+ memcpy( (void *) (ctx->buffer + left),
+ (void *) input, ilen );
+ }
+}
- /* Update number of bits */
- if ((context->count[0] += ((UINT4)inputLen << 3))
+static unsigned char md5_padding[64] =
+{
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
- < ((UINT4)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((UINT4)inputLen >> 29);
+/*
+ * MD5 final digest
+ */
+static inline void md5_finish( md5_context *ctx, unsigned char *output )
+{
+ unsigned long last, padn;
+ unsigned long high, low;
+ unsigned char msglen[8];
- partLen = 64 - index;
+ high = ( ctx->total[0] >> 29 )
+ | ( ctx->total[1] << 3 );
+ low = ( ctx->total[0] << 3 );
- /* Transform as many times as possible.
-*/
- if (inputLen >= partLen) {
- memcpy ((POINTER)&context->buffer[index], (POINTER)input, partLen);
- MD5Transform (context->state, context->buffer);
+ PUT_UINT32_LE( low, msglen, 0 );
+ PUT_UINT32_LE( high, msglen, 4 );
- for (i = partLen; i + 63 < inputLen; i += 64)
- MD5Transform (context->state, &input[i]);
+ last = ctx->total[0] & 0x3F;
+ padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
- index = 0;
- }
- else
- i = 0;
+ md5_update( ctx, (unsigned char *) md5_padding, padn );
+ md5_update( ctx, msglen, 8 );
- /* Buffer remaining input */
- memcpy ((POINTER)&context->buffer[index], (POINTER)&input[i], inputLen-i);
+ PUT_UINT32_LE( ctx->state[0], output, 0 );
+ PUT_UINT32_LE( ctx->state[1], output, 4 );
+ PUT_UINT32_LE( ctx->state[2], output, 8 );
+ PUT_UINT32_LE( ctx->state[3], output, 12 );
}
-/* MD5 finalization. Ends an MD5 message-digest operation, writing the
- the message digest and zeroizing the context.
+/*
+ * Output = MD5( input buffer )
*/
-void _alpm_MD5Final (digest, context)
-unsigned char digest[16]; /* message digest */
-MD5_CTX *context; /* context */
+void md5( unsigned char *input, int ilen,
+ unsigned char *output )
{
- unsigned char bits[8];
- unsigned int index, padLen;
+ md5_context ctx;
- /* Save number of bits */
- Encode (bits, context->count, 8);
+ md5_starts( &ctx );
+ md5_update( &ctx, input, ilen );
+ md5_finish( &ctx, output );
- /* Pad out to 56 mod 64.
-*/
- index = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (index < 56) ? (56 - index) : (120 - index);
- _alpm_MD5Update (context, PADDING, padLen);
-
- /* Append length (before padding) */
- _alpm_MD5Update (context, bits, 8);
-
- /* Store state in digest */
- Encode (digest, context->state, 16);
-
- /* Zeroize sensitive information.
-*/
- memset ((POINTER)context, 0, sizeof (*context));
+ memset( &ctx, 0, sizeof( md5_context ) );
}
-/* MD5 basic transformation. Transforms state based on block.
+/*
+ * Output = MD5( file contents )
*/
-static void MD5Transform (state, block)
-UINT4 state[4];
-unsigned char block[64];
+int md5_file( const char *path, unsigned char *output )
{
- UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode (x, block, 64);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
-
- GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
- II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information.
-
-*/
- memset ((POINTER)x, 0, sizeof (x));
-}
+ FILE *f;
+ size_t n;
+ md5_context ctx;
+ unsigned char buf[1024];
-/* Encodes input (UINT4) into output (unsigned char). Assumes len is
- a multiple of 4.
- */
-static void Encode (output, input, len)
-unsigned char *output;
-UINT4 *input;
-unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- }
-}
+ if( ( f = fopen( path, "rb" ) ) == NULL )
+ return( 1 );
-/* Decodes input (unsigned char) into output (UINT4). Assumes len is
- a multiple of 4.
- */
-static void Decode (output, input, len)
-UINT4 *output;
-unsigned char *input;
-unsigned int len;
-{
- unsigned int i, j;
+ md5_starts( &ctx );
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
-}
+ while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
+ md5_update( &ctx, buf, (int) n );
-/* vim: set ts=2 sw=2 noet: */
+ md5_finish( &ctx, output );
+
+ memset( &ctx, 0, sizeof( md5_context ) );
+
+ if( ferror( f ) != 0 )
+ {
+ fclose( f );
+ return( 2 );
+ }
+
+ fclose( f );
+ return( 0 );
+}
diff --git a/lib/libalpm/md5.h b/lib/libalpm/md5.h
index 8ae324e3..08dad1ec 100644
--- a/lib/libalpm/md5.h
+++ b/lib/libalpm/md5.h
@@ -1,53 +1,67 @@
-/* MD5.H - header file for MD5C.C
+/*
+ * RFC 1321 compliant MD5 implementation
+ *
+ * Copyright (C) 2006-2007 Christophe Devine
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License, version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
-/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
-rights reserved.
+#ifndef _MD5_H
+#define _MD5_H
-License to copy and use this software is granted provided that it
-is identified as the "RSA Data Security, Inc. MD5 Message-Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
+#ifdef __cplusplus
+extern "C" {
+#endif
-License is also granted to make and use derivative works provided
-that such works are identified as "derived from the RSA Data
-Security, Inc. MD5 Message-Digest Algorithm" in all material
-mentioning or referencing the derived work.
-
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-
-These notices must be retained in any copies of any part of this
-documentation and/or software. */
-#ifndef _ALPM_MD5_H
-#define _ALPM_MD5_H
-
-/* POINTER defines a generic pointer type */
-typedef unsigned char *POINTER;
-
-/* UINT2 defines a two byte word */
-typedef unsigned short int UINT2;
-
-/* UINT4 defines a four byte word */
-typedef unsigned int UINT4;
-
-
-/* MD5 context. */
-typedef struct {
- UINT4 state[4]; /* state (ABCD) */
- UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
-} MD5_CTX;
+/**
+ * \internal
+ * \brief MD5 context structure
+ */
+typedef struct
+{
+ unsigned long total[2]; /*!< number of bytes processed */
+ unsigned long state[4]; /*!< intermediate digest state */
+ unsigned char buffer[64]; /*!< data block being processed */
+}
+md5_context;
-void _alpm_MD5Init(MD5_CTX *);
-void _alpm_MD5Update(MD5_CTX *, unsigned char *, unsigned int);
-void _alpm_MD5Final(unsigned char [16], MD5_CTX *);
+/**
+ * \internal
+ * \brief Output = MD5( input buffer )
+ *
+ * \param input buffer holding the data
+ * \param ilen length of the input data
+ * \param output MD5 checksum result
+ */
+void md5( unsigned char *input, int ilen,
+ unsigned char *output );
-char* _alpm_MDFile(char *);
-void _alpm_MDPrint(unsigned char [16]);
+/**
+ * \internal
+ * \brief Output = MD5( file contents )
+ *
+ * \param path input file name
+ * \param output MD5 checksum result
+ *
+ * \return 0 if successful, 1 if fopen failed,
+ * or 2 if fread failed
+ */
+int md5_file( const char *path, unsigned char *output );
-#endif /* _ALPM_MD5_H */
+#ifdef __cplusplus
+}
+#endif
-/* vim: set ts=2 sw=2 noet: */
+#endif /* md5.h */
diff --git a/lib/libalpm/md5driver.c b/lib/libalpm/md5driver.c
deleted file mode 100644
index 66071052..00000000
--- a/lib/libalpm/md5driver.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* MD5DRIVER.C - taken and modified from MDDRIVER.C (license below) */
-/* for use in pacman. */
-/*********************************************************************/
-
-/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
-rights reserved.
-
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-
-These notices must be retained in any copies of any part of this
-documentation and/or software.
- */
-
-/* The following makes MD default to MD5 if it has not already been
- defined with C compiler flags.
- */
-#define MD MD5
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <libintl.h>
-
-/* libalpm */
-#include "alpm.h"
-#include "log.h"
-#include "util.h"
-#include "md5.h"
-
-/* Length of test block, number of test blocks.
- */
-#define TEST_BLOCK_LEN 1000
-#define TEST_BLOCK_COUNT 1000
-
-#define MD_CTX MD5_CTX
-#define MDInit _alpm_MD5Init
-#define MDUpdate _alpm_MD5Update
-#define MDFinal _alpm_MD5Final
-
-char* _alpm_MDFile(char *filename)
-{
- FILE *file;
- MD_CTX context;
- int len;
- char hex[3];
- unsigned char buffer[1024], digest[16];
-
- ALPM_LOG_FUNC;
-
- if((file = fopen(filename, "rb")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("%s can't be opened\n"), filename);
- } else {
- char *ret;
- int i;
-
- MDInit(&context);
- while((len = fread(buffer, 1, 1024, file))) {
- MDUpdate(&context, buffer, len);
- }
- MDFinal(digest, &context);
- fclose(file);
-
- ret = calloc(33, sizeof(char));
- for(i = 0; i < 16; i++) {
- snprintf(hex, 3, "%02x", digest[i]);
- strncat(ret, hex, 2);
- }
-
- _alpm_log(PM_LOG_DEBUG, _("md5(%s) = %s"), filename, ret);
- return(ret);
- }
- return(NULL);
-}
-
-/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 74adf5cd..172456d6 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -5,7 +5,7 @@
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -28,12 +28,16 @@
#include <stdlib.h>
#include <limits.h>
#include <string.h>
-#include <libintl.h>
-#include <locale.h>
+#include <ctype.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <locale.h> /* setlocale */
+
+/* libarchive */
+#include <archive.h>
+#include <archive_entry.h>
/* libalpm */
#include "package.h"
@@ -43,554 +47,113 @@
#include "error.h"
#include "db.h"
#include "cache.h"
-#include "provide.h"
+#include "delta.h"
#include "handle.h"
-#include "versioncmp.h"
-#include "alpm.h"
-
-pmpkg_t *_alpm_pkg_new(const char *name, const char *version)
-{
- pmpkg_t* pkg;
-
- ALPM_LOG_FUNC;
-
- if((pkg = calloc(1,sizeof(pmpkg_t))) == NULL) {
- RET_ERR(PM_ERR_MEMORY, NULL);
- }
-
- if(name && name[0] != 0) {
- STRNCPY(pkg->name, name, PKG_NAME_LEN);
- } else {
- pkg->name[0] = '\0';
- }
- if(version && version[0] != 0) {
- STRNCPY(pkg->version, version, PKG_VERSION_LEN);
- } else {
- pkg->version[0] = '\0';
- }
-
- return(pkg);
-}
-
-pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg)
-{
- pmpkg_t* newpkg;
-
- ALPM_LOG_FUNC;
-
- if((newpkg = calloc(1, sizeof(pmpkg_t))) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmpkg_t));
- RET_ERR(PM_ERR_MEMORY, NULL);
- }
-
- memcpy(newpkg, pkg, sizeof(pmpkg_t));
- newpkg->licenses = alpm_list_strdup(alpm_pkg_get_licenses(pkg));
- /*newpkg->desc_localized = alpm_list_strdup(pkg->desc_localized);*/
- newpkg->requiredby = alpm_list_strdup(alpm_pkg_get_requiredby(pkg));
- newpkg->conflicts = alpm_list_strdup(alpm_pkg_get_conflicts(pkg));
- newpkg->files = alpm_list_strdup(alpm_pkg_get_files(pkg));
- newpkg->backup = alpm_list_strdup(alpm_pkg_get_backup(pkg));
- newpkg->depends = alpm_list_strdup(alpm_pkg_get_depends(pkg));
- newpkg->removes = alpm_list_strdup(alpm_pkg_get_removes(pkg));
- newpkg->groups = alpm_list_strdup(alpm_pkg_get_groups(pkg));
- newpkg->provides = alpm_list_strdup(alpm_pkg_get_provides(pkg));
- newpkg->replaces = alpm_list_strdup(alpm_pkg_get_replaces(pkg));
- /* internal */
- newpkg->data = (newpkg->origin == PKG_FROM_FILE) ? strdup(pkg->data) : pkg->data;
-
- return(newpkg);
-}
-
-void _alpm_pkg_free(void *data)
-{
- pmpkg_t *pkg = data;
-
- ALPM_LOG_FUNC;
-
- if(pkg == NULL) {
- return;
- }
-
- FREELIST(pkg->licenses);
- /*FREELIST(pkg->desc_localized);*/
- FREELIST(pkg->files);
- FREELIST(pkg->backup);
- FREELIST(pkg->depends);
- FREELIST(pkg->removes);
- FREELIST(pkg->conflicts);
- FREELIST(pkg->requiredby);
- FREELIST(pkg->groups);
- FREELIST(pkg->provides);
- FREELIST(pkg->replaces);
- if(pkg->origin == PKG_FROM_FILE) {
- FREE(pkg->data);
- }
- FREE(pkg);
-
- return;
-}
-
-/* Is pkgB an upgrade for pkgA ? */
-int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg)
-{
- int cmp = 0;
-
- ALPM_LOG_FUNC;
-
- if(pkg->origin == PKG_FROM_CACHE) {
- /* ensure we have the /desc file, which contains the 'force' option */
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
- }
-
- if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(pkg))) {
- /* package should be ignored (IgnorePkg) */
- _alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (%s)"),
- alpm_pkg_get_name(local_pkg), alpm_pkg_get_version(local_pkg),
- alpm_pkg_get_version(pkg));
- return(0);
- }
-
- /* compare versions and see if we need to upgrade */
- cmp = _alpm_versioncmp(alpm_pkg_get_version(pkg), alpm_pkg_get_version(local_pkg));
-
- if(cmp != 0 && pkg->force) {
- cmp = 1;
- _alpm_log(PM_LOG_WARNING, _("%s: forcing upgrade to version %s"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
- } else if(cmp < 0) {
- /* local version is newer */
- pmdb_t *db = pkg->data;
- _alpm_log(PM_LOG_WARNING, _("%s: local (%s) is newer than %s (%s)"),
- alpm_pkg_get_name(local_pkg), alpm_pkg_get_version(local_pkg),
- alpm_db_get_name(db), alpm_pkg_get_version(pkg));
- cmp = 0;
- } else if(cmp > 0) {
- /* we have an upgrade, make sure we should actually do it */
- if(_alpm_pkg_istoonew(pkg)) {
- /* package too new (UpgradeDelay) */
- _alpm_log(PM_LOG_WARNING, _("%s-%s: delaying upgrade of package (%s)"),
- alpm_pkg_get_name(local_pkg), alpm_pkg_get_version(local_pkg),
- alpm_pkg_get_version(pkg));
- cmp = 0;
- }
- }
+#include "deps.h"
- return(cmp);
-}
-
-/* Helper function for comparing packages
+/** \addtogroup alpm_packages Package Functions
+ * @brief Functions to manipulate libalpm packages
+ * @{
*/
-int _alpm_pkg_cmp(const void *p1, const void *p2)
-{
- pmpkg_t *pk1 = (pmpkg_t *)p1;
- pmpkg_t *pk2 = (pmpkg_t *)p2;
-
- return(strcmp(alpm_pkg_get_name(pk1), alpm_pkg_get_name(pk2)));
-}
-/* Parses the package description file for the current package
- * TODO: this should ALL be in a backend interface (be_files), we should
- * be dealing with the abstracted concepts only in this file
- * Returns: 0 on success, 1 on error
- *
+/** Create a package from a file.
+ * @param filename location of the package tarball
+ * @param full whether to stop the load after metadata is read or continue
+ * through the full archive
+ * @param pkg address of the package pointer
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-static int parse_descfile(const char *descfile, pmpkg_t *info)
+int SYMEXPORT alpm_pkg_load(const char *filename, unsigned short full,
+ pmpkg_t **pkg)
{
- FILE* fp = NULL;
- char line[PATH_MAX];
- char *ptr = NULL;
- char *key = NULL;
- int linenum = 0;
+ _alpm_log(PM_LOG_FUNCTION, "enter alpm_pkg_load\n");
- ALPM_LOG_FUNC;
+ /* Sanity checks */
+ ASSERT(filename != NULL && strlen(filename) != 0,
+ RET_ERR(PM_ERR_WRONG_ARGS, -1));
+ ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- if((fp = fopen(descfile, "r")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s"), descfile, strerror(errno));
+ *pkg = _alpm_pkg_load(filename, full);
+ if(*pkg == NULL) {
+ /* pm_errno is set by pkg_load */
return(-1);
}
- while(!feof(fp)) {
- fgets(line, PATH_MAX, fp);
- linenum++;
- _alpm_strtrim(line);
- if(strlen(line) == 0 || line[0] == '#') {
- continue;
- }
- ptr = line;
- key = strsep(&ptr, "=");
- if(key == NULL || ptr == NULL) {
- _alpm_log(PM_LOG_DEBUG, _("%s: syntax error in description file line %d"),
- info->name[0] != '\0' ? info->name : "error", linenum);
- } else {
- _alpm_strtrim(key);
- key = _alpm_strtoupper(key);
- _alpm_strtrim(ptr);
- if(!strcmp(key, "PKGNAME")) {
- STRNCPY(info->name, ptr, sizeof(info->name));
- } else if(!strcmp(key, "PKGVER")) {
- STRNCPY(info->version, ptr, sizeof(info->version));
- } else if(!strcmp(key, "PKGDESC")) {
- /*
- char *lang_tmp;
- info->desc_localized = alpm_list_add(info->desc_localized, strdup(ptr));
- if((lang_tmp = (char *)malloc(strlen(setlocale(LC_ALL, "")))) == NULL) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
- STRNCPY(lang_tmp, setlocale(LC_ALL, ""), strlen(setlocale(LC_ALL, "")));
- if(info->desc_localized && !info->desc_localized->next) {
- */
- STRNCPY(info->desc, ptr, sizeof(info->desc));
- /*
- } else if (ptr && !strncmp(ptr, lang_tmp, strlen(lang_tmp))) {
- STRNCPY(info->desc, ptr+strlen(lang_tmp)+1, sizeof(info->desc));
- }
- FREE(lang_tmp);
- */
- } else if(!strcmp(key, "GROUP")) {
- info->groups = alpm_list_add(info->groups, strdup(ptr));
- } else if(!strcmp(key, "URL")) {
- STRNCPY(info->url, ptr, sizeof(info->url));
- } else if(!strcmp(key, "LICENSE")) {
- info->licenses = alpm_list_add(info->licenses, strdup(ptr));
- } else if(!strcmp(key, "BUILDDATE")) {
- STRNCPY(info->builddate, ptr, sizeof(info->builddate));
- } else if(!strcmp(key, "BUILDTYPE")) {
- STRNCPY(info->buildtype, ptr, sizeof(info->buildtype));
- } else if(!strcmp(key, "INSTALLDATE")) {
- STRNCPY(info->installdate, ptr, sizeof(info->installdate));
- } else if(!strcmp(key, "PACKAGER")) {
- STRNCPY(info->packager, ptr, sizeof(info->packager));
- } else if(!strcmp(key, "ARCH")) {
- STRNCPY(info->arch, ptr, sizeof(info->arch));
- } else if(!strcmp(key, "SIZE")) {
- /* size in the raw package is uncompressed (installed) size */
- info->isize = atol(ptr);
- } else if(!strcmp(key, "DEPEND")) {
- info->depends = alpm_list_add(info->depends, strdup(ptr));
- } else if(!strcmp(key, "REMOVE")) {
- info->removes = alpm_list_add(info->removes, strdup(ptr));
- } else if(!strcmp(key, "CONFLICT")) {
- info->conflicts = alpm_list_add(info->conflicts, strdup(ptr));
- } else if(!strcmp(key, "REPLACES")) {
- info->replaces = alpm_list_add(info->replaces, strdup(ptr));
- } else if(!strcmp(key, "PROVIDES")) {
- info->provides = alpm_list_add(info->provides, strdup(ptr));
- } else if(!strcmp(key, "BACKUP")) {
- info->backup = alpm_list_add(info->backup, strdup(ptr));
- } else {
- _alpm_log(PM_LOG_DEBUG, _("%s: syntax error in description file line %d"),
- info->name[0] != '\0' ? info->name : "error", linenum);
- }
- }
- line[0] = '\0';
- }
- fclose(fp);
- unlink(descfile);
-
return(0);
}
-pmpkg_t *_alpm_pkg_load(const char *pkgfile)
+/** Free a package.
+ * @param pkg package pointer to free
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_pkg_free(pmpkg_t *pkg)
{
- char *expath;
- int ret = ARCHIVE_OK;
- int config = 0;
- int filelist = 0;
- int scriptcheck = 0;
- struct archive *archive;
- struct archive_entry *entry;
- pmpkg_t *info = NULL;
- char *descfile = NULL;
- int fd = -1;
- alpm_list_t *all_files = NULL;
- struct stat st;
-
- ALPM_LOG_FUNC;
-
- if(pkgfile == NULL || strlen(pkgfile) == 0) {
- RET_ERR(PM_ERR_WRONG_ARGS, NULL);
- }
-
- if((archive = archive_read_new()) == NULL) {
- RET_ERR(PM_ERR_LIBARCHIVE_ERROR, NULL);
- }
-
- archive_read_support_compression_all(archive);
- archive_read_support_format_all(archive);
-
- if (archive_read_open_file(archive, pkgfile, ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
- RET_ERR(PM_ERR_PKG_OPEN, NULL);
- }
-
- info = _alpm_pkg_new(NULL, NULL);
- if(info == NULL) {
- archive_read_finish(archive);
- RET_ERR(PM_ERR_MEMORY, NULL);
- }
-
- if(stat(pkgfile, &st) == 0) {
- info->size = st.st_size;
- }
+ _alpm_log(PM_LOG_FUNCTION, "enter alpm_pkg_free\n");
- /* TODO there is no reason to make temp files to read
- * from a libarchive archive, it can be done by reading
- * directly from the archive
- * See: archive_read_data_into_buffer
- * requires changes 'parse_descfile' as well
- * */
+ ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- /* Read through the entire archive for metadata. We will continue reading
- * even if all metadata is found, to verify the integrity of the archive in
- * full */
- while((ret = archive_read_next_header (archive, &entry)) == ARCHIVE_OK) {
- const char *entry_name = archive_entry_pathname(entry);
-
- if(strcmp(entry_name, ".PKGINFO") == 0) {
- /* extract this file into /tmp. it has info for us */
- descfile = strdup("/tmp/alpm_XXXXXX");
- fd = mkstemp(descfile);
- archive_read_data_into_fd (archive, fd);
- /* parse the info file */
- if(parse_descfile(descfile, info) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not parse the package description file"));
- goto pkg_invalid;
- }
- if(!strlen(info->name)) {
- _alpm_log(PM_LOG_ERROR, _("missing package name in %s"), pkgfile);
- goto pkg_invalid;
- }
- if(!strlen(info->version)) {
- _alpm_log(PM_LOG_ERROR, _("missing package version in %s"), pkgfile);
- goto pkg_invalid;
- }
- config = 1;
- unlink(descfile);
- FREE(descfile);
- close(fd);
- continue;
- } else if(strcmp(entry_name, ".INSTALL") == 0) {
- info->scriptlet = 1;
- scriptcheck = 1;
- } else if(strcmp(entry_name, ".FILELIST") == 0) {
- /* Build info->files from the filelist */
- FILE *fp;
- char *fn;
- char *str;
- int fd;
-
- if((str = (char *)malloc(PATH_MAX)) == NULL) {
- RET_ERR(PM_ERR_MEMORY, (pmpkg_t *)-1);
- }
- fn = strdup("/tmp/alpm_XXXXXX");
- fd = mkstemp(fn);
- archive_read_data_into_fd(archive,fd);
- fp = fopen(fn, "r");
- while(!feof(fp)) {
- if(fgets(str, PATH_MAX, fp) == NULL) {
- continue;
- }
- _alpm_strtrim(str);
- info->files = alpm_list_add(info->files, strdup(str));
- }
- FREE(str);
- fclose(fp);
- if(unlink(fn)) {
- _alpm_log(PM_LOG_WARNING, _("could not remove tempfile %s"), fn);
- }
- FREE(fn);
- close(fd);
- filelist = 1;
- continue;
- } else {
- scriptcheck = 1;
- /* Keep track of all files so we can generate a filelist later if missing */
- all_files = alpm_list_add(all_files, strdup(entry_name));
- }
-
- if(archive_read_data_skip(archive)) {
- _alpm_log(PM_LOG_ERROR, _("error while reading package: %s"), archive_error_string(archive));
- pm_errno = PM_ERR_LIBARCHIVE_ERROR;
- goto error;
- }
- expath = NULL;
- }
- if(ret != ARCHIVE_EOF) { /* An error occured */
- _alpm_log(PM_LOG_ERROR, _("error while reading package: %s"), archive_error_string(archive));
- pm_errno = PM_ERR_LIBARCHIVE_ERROR;
- goto error;
- }
-
- if(!config) {
- _alpm_log(PM_LOG_ERROR, _("missing package metadata"), pkgfile);
- goto error;
- }
-
- archive_read_finish(archive);
-
- if(!filelist) {
- _alpm_log(PM_LOG_ERROR, _("missing package filelist in %s, generating one"), pkgfile);
- info->files = all_files;
- } else {
- alpm_list_free_inner(all_files, free);
- alpm_list_free(all_files);
+ /* Only free packages loaded in user space */
+ if(pkg->origin != PKG_FROM_CACHE) {
+ _alpm_pkg_free(pkg);
}
- /* this is IMPORTANT - "checking for conflicts" requires a sorted list, so we
- * ensure that here */
- info->files = alpm_list_msort(info->files, alpm_list_count(info->files), _alpm_str_cmp);
-
- /* internal */
- info->origin = PKG_FROM_FILE;
- info->data = strdup(pkgfile);
- info->infolevel = 0xFF;
-
- return(info);
-
-pkg_invalid:
- pm_errno = PM_ERR_PKG_INVALID;
- if(descfile) {
- unlink(descfile);
- FREE(descfile);
- }
- if(fd != -1) {
- close(fd);
- }
-error:
- FREEPKG(info);
- archive_read_finish(archive);
-
- return(NULL);
+ return(0);
}
-/* Test for existence of a package in a alpm_list_t*
- * of pmpkg_t*
+/** Check the integrity (with md5) of a package from the sync cache.
+ * @param pkg package pointer
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack)
+int SYMEXPORT alpm_pkg_checkmd5sum(pmpkg_t *pkg)
{
- alpm_list_t *lp;
+ char *fpath;
+ char *md5sum = NULL;
+ int retval = 0;
ALPM_LOG_FUNC;
- if(needle == NULL || haystack == NULL) {
- return(NULL);
- }
+ ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
+ /* We only inspect packages from sync repositories */
+ ASSERT(pkg->origin == PKG_FROM_CACHE, RET_ERR(PM_ERR_PKG_INVALID, -1));
+ ASSERT(pkg->origin_data.db != handle->db_local, RET_ERR(PM_ERR_PKG_INVALID, -1));
- for(lp = haystack; lp; lp = lp->next) {
- pmpkg_t *info = lp->data;
+ fpath = _alpm_filecache_find(alpm_pkg_get_filename(pkg));
+ md5sum = alpm_get_md5sum(fpath);
- if(info && strcmp(alpm_pkg_get_name(info), needle) == 0) {
- return(info);
- }
- }
- return(NULL);
-}
-
-int _alpm_pkg_splitname(const char *target, char *name, char *version, int witharch)
-{
- char tmp[PKG_FULLNAME_LEN+7];
- const char *t;
- char *p, *q;
-
- ALPM_LOG_FUNC;
-
- if(target == NULL) {
- return(-1);
- }
-
- /* trim path name (if any) */
- if((t = strrchr(target, '/')) == NULL) {
- t = target;
+ if(md5sum == NULL) {
+ _alpm_log(PM_LOG_ERROR, _("could not get md5sum for package %s-%s\n"),
+ alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
+ pm_errno = PM_ERR_NOT_A_FILE;
+ retval = -1;
} else {
- t++;
- }
- STRNCPY(tmp, t, PKG_FULLNAME_LEN+7);
- /* trim file extension (if any) */
- if((p = strstr(tmp, PM_EXT_PKG))) {
- *p = '\0';
- }
-
- if(witharch) {
- /* trim architecture */
- if((p = alpm_pkg_name_hasarch(tmp))) {
- *p = 0;
+ if(strcmp(md5sum, alpm_pkg_get_md5sum(pkg)) == 0) {
+ _alpm_log(PM_LOG_DEBUG, "md5sums for package %s-%s match\n",
+ alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
+ } else {
+ _alpm_log(PM_LOG_ERROR, _("md5sums do not match for package %s-%s\n"),
+ alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
+ pm_errno = PM_ERR_PKG_INVALID;
+ retval = -1;
}
}
- p = tmp + strlen(tmp);
+ FREE(fpath);
+ FREE(md5sum);
- for(q = --p; *q && *q != '-'; q--);
- if(*q != '-' || q == tmp) {
- return(-1);
- }
- for(p = --q; *p && *p != '-'; p--);
- if(*p != '-' || p == tmp) {
- return(-1);
- }
- if(version) {
- STRNCPY(version, p+1, PKG_VERSION_LEN);
- }
- *p = '\0';
-
- if(name) {
- STRNCPY(name, tmp, PKG_NAME_LEN);
- }
-
- return(0);
+ return(retval);
}
-
-void _alpm_pkg_update_requiredby(pmpkg_t *pkg)
+/** Compare versions.
+ * @param ver1 first version
+ * @param ver2 secont version
+ * @return postive, 0 or negative if ver1 is less, equal or more
+ * than ver2, respectively.
+ */
+int SYMEXPORT alpm_pkg_vercmp(const char *ver1, const char *ver2)
{
- alpm_list_t *i, *j, *k;
- const char *pkgname = alpm_pkg_get_name(pkg);
-
- pmdb_t *localdb = alpm_option_get_localdb();
- for(i = _alpm_db_get_pkgcache(localdb); i; i = i->next) {
- if(!i->data) {
- continue;
- }
- pmpkg_t *cachepkg = i->data;
- const char *cachepkgname = alpm_pkg_get_name(cachepkg);
-
- for(j = alpm_pkg_get_depends(cachepkg); j; j = j->next) {
- pmdepend_t *dep;
- if(!j->data) {
- continue;
- }
- dep = alpm_splitdep(j->data);
- if(dep == NULL) {
- continue;
- }
-
- /* check the actual package itself */
- if(strcmp(dep->name, pkgname) == 0) {
- alpm_list_t *reqs = alpm_pkg_get_requiredby(pkg);
-
- if(!alpm_list_find_str(reqs, cachepkgname)) {
- _alpm_log(PM_LOG_DEBUG, _("adding '%s' in requiredby field for '%s'"),
- cachepkgname, pkg->name);
- reqs = alpm_list_add(reqs, strdup(cachepkgname));
- pkg->requiredby = reqs;
- }
- }
+ ALPM_LOG_FUNC;
- /* check for provisions as well */
- for(k = alpm_pkg_get_provides(pkg); k; k = k->next) {
- const char *provname = k->data;
- if(strcmp(dep->name, provname) == 0) {
- alpm_list_t *reqs = alpm_pkg_get_requiredby(pkg);
-
- if(!alpm_list_find_str(reqs, cachepkgname)) {
- _alpm_log(PM_LOG_DEBUG, _("adding '%s' in requiredby field for '%s' (provides: %s)"),
- cachepkgname, pkgname, provname);
- reqs = alpm_list_add(reqs, strdup(cachepkgname));
- pkg->requiredby = reqs;
- }
- }
- }
- free(dep);
- }
- }
+ return(_alpm_versioncmp(ver1, ver2));
}
const char SYMEXPORT *alpm_pkg_get_filename(pmpkg_t *pkg)
@@ -604,13 +167,13 @@ const char SYMEXPORT *alpm_pkg_get_filename(pmpkg_t *pkg)
if(!strlen(pkg->filename)) {
/* construct the file name, it's not in the desc file */
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
if(pkg->arch && strlen(pkg->arch) > 0) {
- snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s-%s" PM_EXT_PKG,
+ snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s-%s" PKGEXT,
pkg->name, pkg->version, pkg->arch);
} else {
- snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s" PM_EXT_PKG,
+ snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s" PKGEXT,
pkg->name, pkg->version);
}
}
@@ -627,7 +190,7 @@ const char SYMEXPORT *alpm_pkg_get_name(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_BASE)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_BASE);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_BASE);
}
return pkg->name;
}
@@ -641,7 +204,7 @@ const char SYMEXPORT *alpm_pkg_get_version(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_BASE)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_BASE);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_BASE);
}
return pkg->version;
}
@@ -655,7 +218,7 @@ const char SYMEXPORT *alpm_pkg_get_desc(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->desc;
}
@@ -669,49 +232,35 @@ const char SYMEXPORT *alpm_pkg_get_url(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->url;
}
-const char SYMEXPORT *alpm_pkg_get_builddate(pmpkg_t *pkg)
+time_t SYMEXPORT alpm_pkg_get_builddate(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
/* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(pkg != NULL, return(NULL));
+ ASSERT(handle != NULL, return(0));
+ ASSERT(pkg != NULL, return(0));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->builddate;
}
-const char SYMEXPORT *alpm_pkg_get_buildtype(pmpkg_t *pkg)
+time_t SYMEXPORT alpm_pkg_get_installdate(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
/* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(pkg != NULL, return(NULL));
+ ASSERT(handle != NULL, return(0));
+ ASSERT(pkg != NULL, return(0));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
- }
- return pkg->buildtype;
-}
-
-const char SYMEXPORT *alpm_pkg_get_installdate(pmpkg_t *pkg)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(pkg != NULL, return(NULL));
-
- if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->installdate;
}
@@ -725,7 +274,7 @@ const char SYMEXPORT *alpm_pkg_get_packager(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->packager;
}
@@ -739,25 +288,11 @@ const char SYMEXPORT *alpm_pkg_get_md5sum(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->md5sum;
}
-const char SYMEXPORT *alpm_pkg_get_sha1sum(pmpkg_t *pkg)
-{
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(handle != NULL, return(NULL));
- ASSERT(pkg != NULL, return(NULL));
-
- if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
- }
- return pkg->sha1sum;
-}
-
const char SYMEXPORT *alpm_pkg_get_arch(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
@@ -767,7 +302,7 @@ const char SYMEXPORT *alpm_pkg_get_arch(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->arch;
}
@@ -781,7 +316,7 @@ unsigned long SYMEXPORT alpm_pkg_get_size(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(-1));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->size;
}
@@ -795,7 +330,7 @@ unsigned long SYMEXPORT alpm_pkg_get_isize(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(-1));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->isize;
}
@@ -809,7 +344,7 @@ pmpkgreason_t SYMEXPORT alpm_pkg_get_reason(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(-1));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->reason;
}
@@ -823,7 +358,7 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_licenses(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->licenses;
}
@@ -837,12 +372,11 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_groups(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->groups;
}
-/* depends */
alpm_list_t SYMEXPORT *alpm_pkg_get_depends(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
@@ -852,12 +386,12 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_depends(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DEPENDS);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DEPENDS);
}
return pkg->depends;
}
-alpm_list_t SYMEXPORT *alpm_pkg_get_removes(pmpkg_t *pkg)
+alpm_list_t SYMEXPORT *alpm_pkg_get_optdepends(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
@@ -866,12 +400,12 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_removes(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DEPENDS);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DEPENDS);
}
- return pkg->removes;
+ return pkg->optdepends;
}
-alpm_list_t SYMEXPORT *alpm_pkg_get_requiredby(pmpkg_t *pkg)
+alpm_list_t SYMEXPORT *alpm_pkg_get_conflicts(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
@@ -880,12 +414,12 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_requiredby(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DEPENDS);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DEPENDS);
}
- return pkg->requiredby;
+ return pkg->conflicts;
}
-alpm_list_t SYMEXPORT *alpm_pkg_get_conflicts(pmpkg_t *pkg)
+alpm_list_t SYMEXPORT *alpm_pkg_get_provides(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
@@ -894,12 +428,12 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_conflicts(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DEPENDS);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DEPENDS);
}
- return pkg->conflicts;
+ return pkg->provides;
}
-alpm_list_t SYMEXPORT *alpm_pkg_get_provides(pmpkg_t *pkg)
+alpm_list_t SYMEXPORT *alpm_pkg_get_deltas(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
@@ -907,10 +441,10 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_provides(pmpkg_t *pkg)
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
- if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DEPENDS);
+ if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DELTAS)) {
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DELTAS);
}
- return pkg->provides;
+ return pkg->deltas;
}
alpm_list_t SYMEXPORT *alpm_pkg_get_replaces(pmpkg_t *pkg)
@@ -922,7 +456,7 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_replaces(pmpkg_t *pkg)
ASSERT(pkg != NULL, return(NULL));
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_DESC);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
}
return pkg->replaces;
}
@@ -935,9 +469,9 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_files(pmpkg_t *pkg)
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
- if(pkg->origin == PKG_FROM_CACHE && pkg->data == handle->db_local
+ if(pkg->origin == PKG_FROM_CACHE && pkg->origin_data.db == handle->db_local
&& !(pkg->infolevel & INFRQ_FILES)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_FILES);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_FILES);
}
return pkg->files;
}
@@ -950,9 +484,9 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_backup(pmpkg_t *pkg)
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
- if(pkg->origin == PKG_FROM_CACHE && pkg->data == handle->db_local
+ if(pkg->origin == PKG_FROM_CACHE && pkg->origin_data.db == handle->db_local
&& !(pkg->infolevel & INFRQ_FILES)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_FILES);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_FILES);
}
return pkg->backup;
}
@@ -965,13 +499,572 @@ unsigned short SYMEXPORT alpm_pkg_has_scriptlet(pmpkg_t *pkg)
ASSERT(handle != NULL, return(-1));
ASSERT(pkg != NULL, return(-1));
- if(pkg->origin == PKG_FROM_CACHE && pkg->data == handle->db_local
+ if(pkg->origin == PKG_FROM_CACHE && pkg->origin_data.db == handle->db_local
&& !(pkg->infolevel & INFRQ_SCRIPTLET)) {
- _alpm_db_read(pkg->data, pkg, INFRQ_SCRIPTLET);
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_SCRIPTLET);
}
return pkg->scriptlet;
}
+/**
+ * @brief Compute the packages requiring a given package.
+ * @param pkg a package
+ * @return the list of packages requiring pkg
+ *
+ * A depends on B through n depends <=> A listed in B's requiredby n times
+ * n == 0 or 1 in almost all cases */
+alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg)
+{
+ const alpm_list_t *i, *j;
+ alpm_list_t *reqs = NULL;
+
+ pmdb_t *localdb = alpm_option_get_localdb();
+ for(i = _alpm_db_get_pkgcache(localdb); i; i = i->next) {
+ if(!i->data) {
+ continue;
+ }
+ pmpkg_t *cachepkg = i->data;
+ const char *cachepkgname = alpm_pkg_get_name(cachepkg);
+
+ for(j = alpm_pkg_get_depends(cachepkg); j; j = j->next) {
+ pmdepend_t *dep = j->data;
+
+ if(alpm_depcmp(pkg, dep)) {
+ _alpm_log(PM_LOG_DEBUG, "adding '%s' in requiredby field for '%s'\n",
+ cachepkgname, pkg->name);
+ reqs = alpm_list_add(reqs, strdup(cachepkgname));
+ }
+ }
+ }
+ return(reqs);
+}
+
+/** @} */
+
+/* this function was taken from rpm 4.0.4 and rewritten */
+int _alpm_versioncmp(const char *a, const char *b)
+{
+ char str1[64], str2[64];
+ char *ptr1, *ptr2;
+ char *one, *two;
+ char *rel1 = NULL, *rel2 = NULL;
+ char oldch1, oldch2;
+ int is1num, is2num;
+ int rc;
+
+ ALPM_LOG_FUNC;
+
+ if(!strcmp(a,b)) {
+ return(0);
+ }
+
+ strncpy(str1, a, 64);
+ str1[63] = 0;
+ strncpy(str2, b, 64);
+ str2[63] = 0;
+
+ /* lose the release number */
+ for(one = str1; *one && *one != '-'; one++);
+ if(one) {
+ *one = '\0';
+ rel1 = ++one;
+ }
+ for(two = str2; *two && *two != '-'; two++);
+ if(two) {
+ *two = '\0';
+ rel2 = ++two;
+ }
+
+ one = str1;
+ two = str2;
+
+ while(*one || *two) {
+ while(*one && !isalnum((int)*one)) one++;
+ while(*two && !isalnum((int)*two)) two++;
+
+ ptr1 = one;
+ ptr2 = two;
+
+ /* find the next segment for each string */
+ if(isdigit((int)*ptr1)) {
+ is1num = 1;
+ while(*ptr1 && isdigit((int)*ptr1)) ptr1++;
+ } else {
+ is1num = 0;
+ while(*ptr1 && isalpha((int)*ptr1)) ptr1++;
+ }
+ if(isdigit((int)*ptr2)) {
+ is2num = 1;
+ while(*ptr2 && isdigit((int)*ptr2)) ptr2++;
+ } else {
+ is2num = 0;
+ while(*ptr2 && isalpha((int)*ptr2)) ptr2++;
+ }
+
+ oldch1 = *ptr1;
+ *ptr1 = '\0';
+ oldch2 = *ptr2;
+ *ptr2 = '\0';
+
+ /* see if we ran out of segments on one string */
+ if(one == ptr1 && two != ptr2) {
+ return(is2num ? -1 : 1);
+ }
+ if(one != ptr1 && two == ptr2) {
+ return(is1num ? 1 : -1);
+ }
+
+ /* see if we have a type mismatch (ie, one is alpha and one is digits) */
+ if(is1num && !is2num) return(1);
+ if(!is1num && is2num) return(-1);
+
+ if(is1num) while(*one == '0') one++;
+ if(is2num) while(*two == '0') two++;
+
+ rc = strverscmp(one, two);
+ if(rc) return(rc);
+
+ *ptr1 = oldch1;
+ *ptr2 = oldch2;
+ one = ptr1;
+ two = ptr2;
+ }
+
+ if((!*one) && (!*two)) {
+ /* compare release numbers */
+ if(rel1 && rel2 && strlen(rel1) && strlen(rel2)) return(_alpm_versioncmp(rel1, rel2));
+ return(0);
+ }
+
+ return(*one ? 1 : -1);
+}
+
+
+pmpkg_t *_alpm_pkg_new(const char *name, const char *version)
+{
+ pmpkg_t* pkg;
+
+ ALPM_LOG_FUNC;
+
+ CALLOC(pkg, 1, sizeof(pmpkg_t), RET_ERR(PM_ERR_MEMORY, NULL));
+
+ if(name && name[0] != 0) {
+ strncpy(pkg->name, name, PKG_NAME_LEN);
+ } else {
+ pkg->name[0] = '\0';
+ }
+ if(version && version[0] != 0) {
+ strncpy(pkg->version, version, PKG_VERSION_LEN);
+ } else {
+ pkg->version[0] = '\0';
+ }
+
+ return(pkg);
+}
+
+pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg)
+{
+ pmpkg_t* newpkg;
+
+ ALPM_LOG_FUNC;
+
+ CALLOC(newpkg, 1, sizeof(pmpkg_t), RET_ERR(PM_ERR_MEMORY, NULL));
+
+ memcpy(newpkg, pkg, sizeof(pmpkg_t));
+ newpkg->licenses = alpm_list_strdup(alpm_pkg_get_licenses(pkg));
+ newpkg->conflicts = alpm_list_strdup(alpm_pkg_get_conflicts(pkg));
+ newpkg->files = alpm_list_strdup(alpm_pkg_get_files(pkg));
+ newpkg->backup = alpm_list_strdup(alpm_pkg_get_backup(pkg));
+ newpkg->depends = alpm_list_copy_data(alpm_pkg_get_depends(pkg),
+ sizeof(pmdepend_t));
+ newpkg->optdepends = alpm_list_strdup(alpm_pkg_get_optdepends(pkg));
+ newpkg->groups = alpm_list_strdup(alpm_pkg_get_groups(pkg));
+ newpkg->provides = alpm_list_strdup(alpm_pkg_get_provides(pkg));
+ newpkg->replaces = alpm_list_strdup(alpm_pkg_get_replaces(pkg));
+ newpkg->deltas = alpm_list_copy_data(alpm_pkg_get_deltas(pkg),
+ sizeof(pmdelta_t));
+ /* internal */
+ if(newpkg->origin == PKG_FROM_FILE) {
+ newpkg->origin_data.file = strdup(pkg->origin_data.file);
+ } else {
+ newpkg->origin_data.db = pkg->origin_data.db;
+ }
+
+ return(newpkg);
+}
+
+void _alpm_pkg_free(pmpkg_t *pkg)
+{
+ ALPM_LOG_FUNC;
+
+ if(pkg == NULL) {
+ return;
+ }
+
+ FREELIST(pkg->licenses);
+ FREELIST(pkg->files);
+ FREELIST(pkg->backup);
+ FREELIST(pkg->depends);
+ FREELIST(pkg->optdepends);
+ FREELIST(pkg->conflicts);
+ FREELIST(pkg->groups);
+ FREELIST(pkg->provides);
+ FREELIST(pkg->replaces);
+ FREELIST(pkg->deltas);
+ if(pkg->origin == PKG_FROM_FILE) {
+ FREE(pkg->origin_data.file);
+ }
+ FREE(pkg);
+}
+
+/* Is pkgB an upgrade for pkgA ? */
+int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg)
+{
+ int cmp = 0;
+
+ ALPM_LOG_FUNC;
+
+ if(pkg->origin == PKG_FROM_CACHE) {
+ /* ensure we have the /desc file, which contains the 'force' option */
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
+ }
+
+ /* compare versions and see if we need to upgrade */
+ cmp = _alpm_versioncmp(alpm_pkg_get_version(pkg), alpm_pkg_get_version(local_pkg));
+
+ if(cmp != 0 && pkg->force) {
+ cmp = 1;
+ _alpm_log(PM_LOG_WARNING, _("%s: forcing upgrade to version %s\n"),
+ alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
+ } else if(cmp < 0) {
+ /* local version is newer */
+ pmdb_t *db = pkg->origin_data.db;
+ _alpm_log(PM_LOG_WARNING, _("%s: local (%s) is newer than %s (%s)\n"),
+ alpm_pkg_get_name(local_pkg), alpm_pkg_get_version(local_pkg),
+ alpm_db_get_name(db), alpm_pkg_get_version(pkg));
+ cmp = 0;
+ } else if(cmp > 0) {
+ /* we have an upgrade, make sure we should actually do it */
+ if(_alpm_pkg_istoonew(pkg)) {
+ /* package too new (UpgradeDelay) */
+ _alpm_log(PM_LOG_WARNING, _("%s-%s: delaying upgrade of package (%s)\n"),
+ alpm_pkg_get_name(local_pkg), alpm_pkg_get_version(local_pkg),
+ alpm_pkg_get_version(pkg));
+ cmp = 0;
+ }
+ }
+
+ return(cmp);
+}
+
+/* Helper function for comparing packages
+ */
+int _alpm_pkg_cmp(const void *p1, const void *p2)
+{
+ pmpkg_t *pk1 = (pmpkg_t *)p1;
+ pmpkg_t *pk2 = (pmpkg_t *)p2;
+
+ return(strcmp(alpm_pkg_get_name(pk1), alpm_pkg_get_name(pk2)));
+}
+
+/* Parses the package description file for the current package
+ * TODO: this should ALL be in a backend interface (be_files), we should
+ * be dealing with the abstracted concepts only in this file
+ * Returns: 0 on success, 1 on error
+ *
+ */
+static int parse_descfile(const char *descfile, pmpkg_t *info)
+{
+ FILE* fp = NULL;
+ char line[PATH_MAX];
+ char *ptr = NULL;
+ char *key = NULL;
+ int linenum = 0;
+
+ ALPM_LOG_FUNC;
+
+ if((fp = fopen(descfile, "r")) == NULL) {
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), descfile, strerror(errno));
+ return(-1);
+ }
+
+ while(!feof(fp)) {
+ fgets(line, PATH_MAX, fp);
+ linenum++;
+ _alpm_strtrim(line);
+ if(strlen(line) == 0 || line[0] == '#') {
+ continue;
+ }
+ ptr = line;
+ key = strsep(&ptr, "=");
+ if(key == NULL || ptr == NULL) {
+ _alpm_log(PM_LOG_DEBUG, "%s: syntax error in description file line %d\n",
+ info->name[0] != '\0' ? info->name : "error", linenum);
+ } else {
+ _alpm_strtrim(key);
+ _alpm_strtrim(ptr);
+ if(!strcmp(key, "pkgname")) {
+ strncpy(info->name, ptr, sizeof(info->name));
+ } else if(!strcmp(key, "pkgver")) {
+ strncpy(info->version, ptr, sizeof(info->version));
+ } else if(!strcmp(key, "pkgdesc")) {
+ strncpy(info->desc, ptr, sizeof(info->desc));
+ } else if(!strcmp(key, "group")) {
+ info->groups = alpm_list_add(info->groups, strdup(ptr));
+ } else if(!strcmp(key, "url")) {
+ strncpy(info->url, ptr, sizeof(info->url));
+ } else if(!strcmp(key, "license")) {
+ info->licenses = alpm_list_add(info->licenses, strdup(ptr));
+ } else if(!strcmp(key, "builddate")) {
+ char first = tolower(ptr[0]);
+ if(first > 'a' && first < 'z') {
+ struct tm tmp_tm = {0}; //initialize to null incase of failure
+ setlocale(LC_TIME, "C");
+ strptime(ptr, "%a %b %e %H:%M:%S %Y", &tmp_tm);
+ info->builddate = mktime(&tmp_tm);
+ setlocale(LC_TIME, "");
+ } else {
+ info->builddate = atol(ptr);
+ }
+ } else if(!strcmp(key, "packager")) {
+ strncpy(info->packager, ptr, sizeof(info->packager));
+ } else if(!strcmp(key, "arch")) {
+ strncpy(info->arch, ptr, sizeof(info->arch));
+ } else if(!strcmp(key, "size")) {
+ /* size in the raw package is uncompressed (installed) size */
+ info->isize = atol(ptr);
+ } else if(!strcmp(key, "depend")) {
+ pmdepend_t *dep = alpm_splitdep(ptr);
+ info->depends = alpm_list_add(info->depends, dep);
+ } else if(!strcmp(key, "optdepend")) {
+ info->optdepends = alpm_list_add(info->optdepends, strdup(ptr));
+ } else if(!strcmp(key, "conflict")) {
+ info->conflicts = alpm_list_add(info->conflicts, strdup(ptr));
+ } else if(!strcmp(key, "replaces")) {
+ info->replaces = alpm_list_add(info->replaces, strdup(ptr));
+ } else if(!strcmp(key, "provides")) {
+ info->provides = alpm_list_add(info->provides, strdup(ptr));
+ } else if(!strcmp(key, "backup")) {
+ info->backup = alpm_list_add(info->backup, strdup(ptr));
+ } else {
+ _alpm_log(PM_LOG_DEBUG, "%s: syntax error in description file line %d\n",
+ info->name[0] != '\0' ? info->name : "error", linenum);
+ }
+ }
+ line[0] = '\0';
+ }
+ fclose(fp);
+ unlink(descfile);
+
+ return(0);
+}
+
+
+/**
+ * Load a package and create the corresponding pmpkg_t struct.
+ * @param pkgfile path to the package file
+ * @param full whether to stop the load after metadata is read or continue
+ * through the full archive
+ * @return An information filled pmpkg_t struct
+ */
+pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full)
+{
+ int ret = ARCHIVE_OK;
+ int config = 0;
+ int filelist = 0;
+ struct archive *archive;
+ struct archive_entry *entry;
+ pmpkg_t *info = NULL;
+ char *descfile = NULL;
+ int fd = -1;
+ alpm_list_t *all_files = NULL;
+ struct stat st;
+
+ ALPM_LOG_FUNC;
+
+ if(pkgfile == NULL || strlen(pkgfile) == 0) {
+ RET_ERR(PM_ERR_WRONG_ARGS, NULL);
+ }
+
+ if((archive = archive_read_new()) == NULL) {
+ RET_ERR(PM_ERR_LIBARCHIVE_ERROR, NULL);
+ }
+
+ archive_read_support_compression_all(archive);
+ archive_read_support_format_all(archive);
+
+ if (archive_read_open_filename(archive, pkgfile,
+ ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
+ RET_ERR(PM_ERR_PKG_OPEN, NULL);
+ }
+
+ info = _alpm_pkg_new(NULL, NULL);
+ if(info == NULL) {
+ archive_read_finish(archive);
+ RET_ERR(PM_ERR_MEMORY, NULL);
+ }
+
+ if(stat(pkgfile, &st) == 0) {
+ info->size = st.st_size;
+ }
+
+ /* TODO there is no reason to make temp files to read
+ * from a libarchive archive, it can be done by reading
+ * directly from the archive
+ * See: archive_read_data_into_buffer
+ * requires changes 'parse_descfile' as well
+ * */
+
+ /* If full is false, only read through the archive until we find our needed
+ * metadata. If it is true, read through the entire archive, which serves
+ * as a verfication of integrity. */
+ while((ret = archive_read_next_header(archive, &entry)) == ARCHIVE_OK) {
+ const char *entry_name = archive_entry_pathname(entry);
+
+ if(strcmp(entry_name, ".PKGINFO") == 0) {
+ /* extract this file into /tmp. it has info for us */
+ descfile = strdup("/tmp/alpm_XXXXXX");
+ fd = mkstemp(descfile);
+ archive_read_data_into_fd(archive, fd);
+ /* parse the info file */
+ if(parse_descfile(descfile, info) == -1) {
+ _alpm_log(PM_LOG_ERROR, _("could not parse package description file in %s\n"),
+ pkgfile);
+ goto pkg_invalid;
+ }
+ if(!strlen(info->name)) {
+ _alpm_log(PM_LOG_ERROR, _("missing package name in %s\n"), pkgfile);
+ goto pkg_invalid;
+ }
+ if(!strlen(info->version)) {
+ _alpm_log(PM_LOG_ERROR, _("missing package version in %s\n"), pkgfile);
+ goto pkg_invalid;
+ }
+ config = 1;
+ unlink(descfile);
+ FREE(descfile);
+ close(fd);
+ continue;
+ } else if(strcmp(entry_name, ".INSTALL") == 0) {
+ info->scriptlet = 1;
+ } else if(strcmp(entry_name, ".FILELIST") == 0) {
+ /* Build info->files from the filelist */
+ FILE *fp;
+ char *fn;
+ char str[PATH_MAX+1];
+ int fd;
+
+ fn = strdup("/tmp/alpm_XXXXXX");
+ fd = mkstemp(fn);
+ archive_read_data_into_fd(archive,fd);
+ fp = fopen(fn, "r");
+ while(!feof(fp)) {
+ if(fgets(str, PATH_MAX, fp) == NULL) {
+ continue;
+ }
+ _alpm_strtrim(str);
+ info->files = alpm_list_add(info->files, strdup(str));
+ }
+ fclose(fp);
+ if(unlink(fn)) {
+ _alpm_log(PM_LOG_WARNING, _("could not remove tempfile %s\n"), fn);
+ }
+ FREE(fn);
+ close(fd);
+ filelist = 1;
+ continue;
+ } else if(*entry_name == '.') {
+ /* for now, ignore all files starting with '.' that haven't
+ * already been handled (for future possibilities) */
+ } else {
+ /* Keep track of all files so we can generate a filelist later if missing */
+ all_files = alpm_list_add(all_files, strdup(entry_name));
+ }
+
+ if(archive_read_data_skip(archive)) {
+ _alpm_log(PM_LOG_ERROR, _("error while reading package %s: %s\n"),
+ pkgfile, archive_error_string(archive));
+ pm_errno = PM_ERR_LIBARCHIVE_ERROR;
+ goto error;
+ }
+
+ /* if we are not doing a full read, see if we have all we need */
+ if(!full && config && filelist) {
+ break;
+ }
+ }
+
+ if(ret != ARCHIVE_EOF && ret != ARCHIVE_OK) { /* An error occured */
+ _alpm_log(PM_LOG_ERROR, _("error while reading package %s: %s\n"),
+ pkgfile, archive_error_string(archive));
+ pm_errno = PM_ERR_LIBARCHIVE_ERROR;
+ goto error;
+ }
+
+ if(!config) {
+ _alpm_log(PM_LOG_ERROR, _("missing package metadata in %s\n"), pkgfile);
+ goto error;
+ }
+
+ archive_read_finish(archive);
+
+ if(!filelist) {
+ _alpm_log(PM_LOG_ERROR, _("missing package filelist in %s, generating one\n"), pkgfile);
+ info->files = all_files;
+ } else {
+ FREELIST(all_files);
+ }
+
+ /* this is IMPORTANT - "checking for conflicts" requires a sorted list, so we
+ * ensure that here */
+ info->files = alpm_list_msort(info->files, alpm_list_count(info->files), _alpm_str_cmp);
+
+ /* internal */
+ info->origin = PKG_FROM_FILE;
+ info->origin_data.file = strdup(pkgfile);
+ info->infolevel = 0xFF;
+
+ return(info);
+
+pkg_invalid:
+ pm_errno = PM_ERR_PKG_INVALID;
+ if(descfile) {
+ unlink(descfile);
+ FREE(descfile);
+ }
+ if(fd != -1) {
+ close(fd);
+ }
+error:
+ _alpm_pkg_free(info);
+ archive_read_finish(archive);
+
+ return(NULL);
+}
+
+/* Test for existence of a package in a alpm_list_t*
+ * of pmpkg_t*
+ */
+pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack)
+{
+ alpm_list_t *lp;
+
+ ALPM_LOG_FUNC;
+
+ if(needle == NULL || haystack == NULL) {
+ return(NULL);
+ }
+
+ for(lp = haystack; lp; lp = lp->next) {
+ pmpkg_t *info = lp->data;
+
+ if(info && strcmp(alpm_pkg_get_name(info), needle) == 0) {
+ return(info);
+ }
+ }
+ return(NULL);
+}
+
/* TODO this should either be public, or done somewhere else */
int _alpm_pkg_istoonew(pmpkg_t *pkg)
{
@@ -984,4 +1077,34 @@ int _alpm_pkg_istoonew(pmpkg_t *pkg)
time(&t);
return((pkg->date + handle->upgradedelay) > t);
}
+
+/** Test if a package should be ignored.
+ *
+ * Checks if the package is ignored via IgnorePkg, or if the package is
+ * in a group ignored via IgnoreGrp.
+ *
+ * @param pkg the package to test
+ *
+ * @return 1 if the package should be ignored, 0 otherwise
+ */
+int _alpm_pkg_should_ignore(pmpkg_t *pkg)
+{
+ alpm_list_t *groups = NULL;
+
+ /* first see if the package is ignored */
+ if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(pkg))) {
+ return(1);
+ }
+
+ /* next see if the package is in a group that is ignored */
+ for(groups = handle->ignoregrp; groups; groups = alpm_list_next(groups)) {
+ char *grp = (char *)alpm_list_getdata(groups);
+ if(alpm_list_find_str(alpm_pkg_get_groups(pkg), grp)) {
+ return(1);
+ }
+ }
+
+ return(0);
+}
+
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index 8055c177..5e06785e 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -1,12 +1,12 @@
/*
* package.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -19,15 +19,13 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_PACKAGE_H
#define _ALPM_PACKAGE_H
-#if defined(__APPLE__) || defined(__sun__)
#include <time.h>
-#endif
#include "alpm.h"
#include "db.h"
@@ -48,7 +46,6 @@ typedef enum _pmpkgfrom_t {
#define PKG_TYPE_LEN 32
#define PKG_PACKAGER_LEN 64
#define PKG_MD5SUM_LEN 33
-#define PKG_SHA1SUM_LEN 41
#define PKG_ARCH_LEN 32
struct __pmpkg_t {
@@ -57,12 +54,10 @@ struct __pmpkg_t {
char version[PKG_VERSION_LEN];
char desc[PKG_DESC_LEN];
char url[PKG_URL_LEN];
- char builddate[PKG_DATE_LEN];
- char buildtype[PKG_TYPE_LEN];
- char installdate[PKG_DATE_LEN];
+ time_t builddate;
+ time_t installdate;
char packager[PKG_PACKAGER_LEN];
char md5sum[PKG_MD5SUM_LEN];
- char sha1sum[PKG_SHA1SUM_LEN];
char arch[PKG_ARCH_LEN];
unsigned long size;
unsigned long isize;
@@ -70,44 +65,39 @@ struct __pmpkg_t {
unsigned short force;
time_t date;
pmpkgreason_t reason;
- /* alpm_list_t *desc_localized;*/
alpm_list_t *licenses;
alpm_list_t *replaces;
alpm_list_t *groups;
alpm_list_t *files;
alpm_list_t *backup;
alpm_list_t *depends;
- alpm_list_t *removes;
- alpm_list_t *requiredby;
+ alpm_list_t *optdepends;
alpm_list_t *conflicts;
alpm_list_t *provides;
+ alpm_list_t *deltas;
/* internal */
pmpkgfrom_t origin;
- void *data;
- /* TODO replace 'data' with this:
+ /* Replaced 'void *data' with this union as follows:
origin == PKG_FROM_CACHE, use pkg->origin_data.db
- origin == PKG_FROM_FILE, use pkg->origin_data.fd
+ origin == PKG_FROM_FILE, use pkg->origin_data.file
+ */
union {
- int fd;
pmdb_t *db;
+ char *file;
} origin_data;
- */
pmdbinfrq_t infolevel;
};
-#define FREEPKG(p) do { if(p){_alpm_pkg_free(p); p = NULL;}} while(0)
-#define FREELISTPKGS(p) _FREELIST(p, _alpm_pkg_free)
-
+int _alpm_versioncmp(const char *a, const char *b);
pmpkg_t* _alpm_pkg_new(const char *name, const char *version);
pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg);
-void _alpm_pkg_free(void *data);
+void _alpm_pkg_free(pmpkg_t *pkg);
int _alpm_pkg_cmp(const void *p1, const void *p2);
int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg);
-pmpkg_t *_alpm_pkg_load(const char *pkgfile);
+pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full);
pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack);
-int _alpm_pkg_splitname(const char *target, char *name, char *version, int witharch);
int _alpm_pkg_istoonew(pmpkg_t *pkg);
-void _alpm_pkg_update_requiredby(pmpkg_t *pkg);
+int _alpm_pkg_should_ignore(pmpkg_t *pkg);
#endif /* _ALPM_PACKAGE_H */
diff --git a/lib/libalpm/po/.gitignore b/lib/libalpm/po/.gitignore
index 50a7b2a4..3be83ffa 100644
--- a/lib/libalpm/po/.gitignore
+++ b/lib/libalpm/po/.gitignore
@@ -1,5 +1,3 @@
-Makefile
-Makefile.in
*.gmo
POTFILES
stamp-po
diff --git a/lib/libalpm/po/POTFILES.in b/lib/libalpm/po/POTFILES.in
index e668f661..80130f24 100644
--- a/lib/libalpm/po/POTFILES.in
+++ b/lib/libalpm/po/POTFILES.in
@@ -8,18 +8,16 @@ lib/libalpm/be_files.c
lib/libalpm/cache.c
lib/libalpm/conflict.c
lib/libalpm/db.c
+lib/libalpm/delta.c
lib/libalpm/deps.c
lib/libalpm/error.c
lib/libalpm/group.c
lib/libalpm/handle.c
lib/libalpm/log.c
lib/libalpm/md5.c
-lib/libalpm/md5driver.c
lib/libalpm/package.c
-lib/libalpm/provide.c
lib/libalpm/remove.c
-lib/libalpm/sha1.c
+lib/libalpm/server.c
lib/libalpm/sync.c
lib/libalpm/trans.c
lib/libalpm/util.c
-lib/libalpm/versioncmp.c
diff --git a/lib/libalpm/po/de.po b/lib/libalpm/po/de.po
index 6e699fa1..e444ba18 100644
--- a/lib/libalpm/po/de.po
+++ b/lib/libalpm/po/de.po
@@ -10,9 +10,9 @@ msgid ""
msgstr ""
"Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
"PO-Revision-Date: 2007-04-17 20:26+0200\n"
-"Last-Translator: Pierre Schmitz <pierre@archlinux.de>\n"
+"Last-Translator: Matthias Gorissen <matthias@archlinux.de>\n"
"Language-Team: German <archlinux.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,1499 +20,730 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);X-Generator: KBabel 1.11.4\n"
"X-Generator: KBabel 1.11.4\n"
-#: lib/libalpm/add.c:77
-#, c-format
-msgid "loading target '%s'"
-msgstr "Lade Ziel '%s'"
-
-#: lib/libalpm/add.c:122
-#, c-format
-msgid "replacing older version %s-%s by %s in target list"
+#: lib/libalpm/add.c:88
+#, fuzzy, c-format
+msgid "replacing older version %s-%s by %s in target list\n"
msgstr "Ersetze ältere Version %s-%s durch %s in der Ziel-Liste"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
+#: lib/libalpm/add.c:97
+#, fuzzy, c-format
+msgid "newer version %s-%s is in the target list -- skipping\n"
msgstr "Neuere Version %s-%s ist in der Ziel-Liste -- Überspringe"
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "Lese Metadaten von '%s'"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "Suche nach ungelösten Abhängigkeiten"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
+msgstr ""
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "Suche nach Konflikten"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
+msgstr ""
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
+#: lib/libalpm/add.c:172
+#, fuzzy
+msgid "replacing packages with -A and -U is not supported yet\n"
msgstr "Das Ersetzen von Paketen mit -A und -U wird noch nicht unterstützt"
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "Entfernen Sie bitte zuerst '%s' mit -Rd"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "Sortiere nach Abhängigkeiten"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "Räume auf"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "Suche nach Dateikonflikten"
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "Aktualisiere Paket %s-%s"
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "Füge Paket %s-%s hinzu"
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "Entferne zuerst altes Paket (%s-%s)"
-
-#: lib/libalpm/add.c:411
-#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr "Füge %s temporär zum NoUpgrade-Array hinzu"
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "Entpacke Dateien"
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "Konnte aktuelles Arbeitsverzeichnis nicht ermitteln"
-
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
-#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s ist in NoExtract, wird nicht entpackt"
-
-#: lib/libalpm/add.c:508
-#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
-msgstr "%s ist in trans->skip_add, wird nicht entpackt"
-
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
-msgstr "Konnte %s nicht entpacken (%s)"
-
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "Prüfe MD5-Hashes für %s"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
+msgstr ""
-#: lib/libalpm/add.c:600
+#: lib/libalpm/add.c:365
#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "Prüfe SHA1-Hashes für %s"
+msgid ""
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
+msgstr ""
-#: lib/libalpm/add.c:602
+#: lib/libalpm/add.c:392
#, c-format
-msgid "current: %s"
-msgstr "Aktuell: %s"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr ""
-#: lib/libalpm/add.c:603
+#: lib/libalpm/add.c:399
#, c-format
-msgid "new: %s"
-msgstr "Neu: %s"
+msgid "extract: not overwriting dir with file %s\n"
+msgstr ""
-#: lib/libalpm/add.c:604
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
#, c-format
-msgid "original: %s"
-msgstr "Original: %s"
+msgid "could not extract %s (%s)\n"
+msgstr "Konnte %s nicht entpacken (%s)\n"
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
+#: lib/libalpm/add.c:505
+#, fuzzy, c-format
+msgid "could not rename %s (%s)\n"
msgstr "Konnte %s nicht umbenennen (%s)"
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "Fehler: Konnte %s nicht umbenennen (%s)"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
+#, fuzzy, c-format
+msgid "could not copy tempfile to %s (%s)\n"
msgstr "Konnte temporäre Datei nicht nach %s kopieren (%s)"
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "Fehler: Konnte temporäre Datei nicht nach %s kopieren (%s)"
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
+#, fuzzy, c-format
+msgid "%s saved as %s\n"
msgstr "%s gespeichert als %s"
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "Warnung: %s gespeichert als %s"
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "Aktion: Installiere neue Datei: %s"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "Aktion: Belasse existierende Datei an ihrem Platz"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-"Aktion: Behalte aktuelle Datei und installiere die neue mit der Endung ."
-"pacnew"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
+#: lib/libalpm/add.c:556
+#, fuzzy, c-format
+msgid "could not install %s as %s: %s\n"
msgstr "Konnte %s nicht als %s installieren: %s"
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "Fehler: Konnte %s nicht als %s installieren: %s"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
+#: lib/libalpm/add.c:559
+#, fuzzy, c-format
+msgid "%s installed as %s\n"
msgstr "%s installiert als %s"
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "Warnung: %s installiert als %s"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s ist in NoUpgrade -- Überspringe"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
+#: lib/libalpm/add.c:576
+#, fuzzy, c-format
+msgid "extracting %s as %s.pacnew\n"
msgstr "Entpacke %s als %s.pacnew"
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "Warnung: Entpacke %s als %s.pacnew"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "Entpacke %s"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "Fehler: Konnte %s nicht entpacken (%s)"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr "Hänge Sicherungseintrag für %s an"
-
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
-msgstr "Fehler traten auf, während %s %s"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "Aktualisiere"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "Installiere"
-
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr "'%s' wird nicht mehr von %s bereitgestellt (%s => %s)"
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr "Aktualisiere '%s' aufgrund einer Bereitstellungsänderung (%s)"
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr "Konnte Bereitstellung '%s' von '%s' nicht aktualisieren"
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+#, fuzzy
+msgid "could not get current working directory\n"
+msgstr "Konnte aktuelles Arbeitsverzeichnis nicht ermitteln"
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "Aktualisiere Datenbank"
+#: lib/libalpm/add.c:765
+#, fuzzy, c-format
+msgid "problem occurred while upgrading %s\n"
+msgstr "Fehler traten auf, während %s aktualisiert wurde"
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "Füge Datenbankeintrag '%s' hinzu"
+#: lib/libalpm/add.c:770
+#, fuzzy, c-format
+msgid "problem occurred while installing %s\n"
+msgstr "Fehler traten auf, während %s installiert wurde"
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
+#: lib/libalpm/add.c:785
+#, fuzzy, c-format
+msgid "could not update database entry %s-%s\n"
msgstr "Konnte Datenbankeintrag %s-%s nicht aktualisieren"
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
+#: lib/libalpm/add.c:793
+#, fuzzy, c-format
+msgid "could not add entry '%s' in cache\n"
msgstr "Konnte Eintrag '%s' nicht zum Pufferspeicher hinzufügen"
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "Führe \"ldconfig -r %s\" aus"
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr "Entferne Datenbank %s, %d verbleibend..."
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr "Nicht registrierte Datenbank '%s'"
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "Schließe Datenbank '%s'"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-"Füge neuen Server zur Datenbank '%s' hinzu: Protokoll '%s', Server '%s', "
-"Pfad '%s'"
-
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "Server-Liste geleert für '%s'"
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr "Konnte letzte Update-Zeit für %s nicht ermitteln (nicht schlimm)"
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "Konnte Datenbank nicht synchronisieren: %s [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr "Synchronisation: Neue mtime für %s: %s"
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr "Leere Datenbank %s%s"
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr "Konnte Datenbankeintrag %s%s nicht entfernen"
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "Konnte SHA1-Prüfsumme für Paket %s-%s nicht ermitteln"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "SHA1-Prüfsummen für Paket %s-%s stimmen überein"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "SHA1-Prüfsummen für Paket %s-%s stimmen nicht überein"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "Konnte MD5-Prüfsumme für Paket %s-%s nicht ermitteln"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "MD5-Prüfsummen für Paket %s-%s stimmen überein"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "MD5-Prüfsummen für Paket %s-%s stimmen nicht überein"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "Konnte Sperrdatei %s nicht entfernen"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "Warnung: Konnte Sperrdatei %s nicht entfernen"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "Konfiguration: Neuer Abschnitt '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr "Konfiguration: nopassiveftp"
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr "Konfiguration: usesyslog"
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr "Konfiguration: chomp"
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr "Konfiguration: usecolor"
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr "Konfiguration: including %s"
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr "Konfiguration: noupgrade: %s"
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr "Konfiguration: noextract: %s"
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr "Konfiguration: ignorepkg: %s"
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr "Konfiguration: holdpkg: %s"
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr "Konfiguration: dbpath: %s"
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr "Konfiguration: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1044
-#, c-format
-msgid "config: rootdir: %s"
-msgstr "Konfiguration: rootdir: %s"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr "Konfiguration: logfile: %s"
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr "Konfiguration: xfercommand: %s"
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr "Konfiguration: upgradedelay: %d"
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "Prüfe auf Paketersetzungen"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "Prüfe Ersetzung '%s' für Paket '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s: Ignoriere zu aktualisierendes Packet (zu ersetzen durch %s-%s)"
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s wurde zur Aktualisierung ausgewählt (wird durch %s-%s ersetzt)"
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr "'%s' nicht in Sync-DB gefunden -- Überspringe"
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr "'%s' ist bereits zum Entfernen ausgewählt -- Überspringe"
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr "%s wurde zur Aktualisierung ausgewählt (%s => %s)"
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "Entpacke Datenbank '%s'"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr "Öffne Datenbank aus Pfad '%s'"
-
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
-msgstr "Konnte Paket nicht in Datenbank finden: %s"
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
+#: lib/libalpm/be_files.c:223
+#, fuzzy, c-format
+msgid "invalid name for database entry '%s'\n"
msgstr "Falscher Name für Datenbank-Eintrag '%s'"
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr "Ungültiger Paket-Eintrag wurde an _alpm_db_read übergeben, überspringe"
-
-#: lib/libalpm/be_files.c:226
-#, c-format
-msgid ""
-"request to read database info for a file-based package '%s', skipping..."
-msgstr ""
-"Überspringe das Lesen der Datenbank-Information für das Datei-basierte Paket "
-"'%s'..."
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
+#: lib/libalpm/be_files.c:275
+#, fuzzy, c-format
+msgid "loading package data for %s : level=%d\n"
msgstr "Lade Paket-Daten für %s : level=%d"
-#: lib/libalpm/be_files.c:247
-#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr "Kann %s-%s nicht in der Datenbank '%s' finden"
-
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
+#, fuzzy, c-format
+msgid "could not open file %s: %s\n"
msgstr "Konnte Datei %s nicht öffnen: %s"
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr "Schreibe %s-%s Informationen aus DESC-Datei zurück in die Datenbank"
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr "Schreibe %s-%s Informationen aus FILES-Datei zurück in die Datenbank"
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr "Schreibe %s-%s Informationen aus DEPENDS-Datei zurück in die Datenbank"
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr "Lade Paketpuffer für Repositorium '%s'"
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
+#: lib/libalpm/cache.c:62
+#, fuzzy, c-format
+msgid "adding '%s' to package cache for db '%s'\n"
msgstr "Füge '%s' zum Paketpuffer der Datenbank '%s' hinzu"
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr "Lösche Paketpuffer für Repositorium '%s'"
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr "Fehler: Paketpuffer ist NULL für Datenbank '%s'"
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr "Füge Eintrag '%s' zu '%s'-Puffer hinzu"
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr "Entferne Eintrag '%s' aus '%s'-Puffer"
-
-#: lib/libalpm/cache.c:156
-#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr "Konnte Eintrag '%s' aus '%s'-Puffer nicht entfernen: nicht gefunden"
-
-#: lib/libalpm/cache.c:178
-#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr "Fehler: Konnte Eintrag '%s' nicht aus dem NULL Paketpuffer laden"
-
-#: lib/libalpm/cache.c:201
-#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr "Lade Gruppenpuffer für Repositorium '%s'"
-
-#: lib/libalpm/conflict.c:69
-#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr " Konflikt gefunden '%s' : Paket '%s'"
-
-#: lib/libalpm/conflict.c:78
-#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr " Konflikt '%s' gefunden: Paket '%s' stellt '%s' bereit"
-
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
-#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr "Paket '%s' steht im Konflikt mit sich selbst - ist falsch gepackt"
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr "checkconflicts: Ziel '%s' gegen Datenbank"
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr "checkconflicts: Ziel '%s' gegen alle Ziele"
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr "checkconflicts: Datenbank gegen Ziel '%s'"
-
-#: lib/libalpm/conflict.c:201
-#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr "Ziel '%s' ist auch in der Ziel-Liste, benutze neue Konflikte"
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr "\tCONFLICTS:: %s steht im Konflikt mit %s"
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr "malloc-Fehler: Konnte %d Bytes nicht zuweisen"
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr "malloc fehlgeschlagen: Konnte %d Bytes nicht zuweisen"
+#: lib/libalpm/db.c:285
+#, fuzzy, c-format
+msgid "could not remove database entry %s%s\n"
+msgstr "Konnte Datenbankeintrag %s%s nicht entfernen"
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
+#: lib/libalpm/db.c:553
+#, fuzzy
+msgid "attempt to re-register the 'local' DB\n"
msgstr "Versuche die lokale Datenbank neu zu registrieren"
-#: lib/libalpm/db.c:175
-#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr "Versuche die %s Datenbank neu zu registrieren, verwende die bestehende"
-
-#: lib/libalpm/db.c:181
-#, c-format
-msgid "registering database '%s'"
-msgstr "Registriere Datenbank '%s'"
-
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr "Datenbank-Verzeichnis '%s' ist nicht vorhanden, erstelle es"
-
-#: lib/libalpm/db.c:197
-#, c-format
-msgid "opening database '%s'"
-msgstr "Öffne Datenbank '%s'"
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr "Sortieren von Abhängigkeiten gestartet"
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr "Möglicher Abhängigkeitszyklus gefunden"
-
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr "Sortieren von Abhängigkeiten beendet"
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr "Ein leeres Paket wurde in der Paketliste gefunden"
-
-#: lib/libalpm/deps.c:230
-#, c-format
-msgid "cannot find package installed '%s'"
-msgstr "Konnte installiertes Paket '%s' nicht finden"
-
-#: lib/libalpm/deps.c:261
-#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr "checkdeps: Abhängigkeit'%s' wurde von '%s' nach '%s' verschoben"
-
-#: lib/libalpm/deps.c:280
-#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
-msgstr "checkdeps: Abhängigkeit '%s' von installiertem Paket '%s' erfüllt"
-
-#: lib/libalpm/deps.c:289
-#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
-msgstr ""
-"checkdeps: aktualisiertes '%s' wird die Abhängigkeit von '%s' nicht erfüllen"
-
-#: lib/libalpm/deps.c:359
-#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr "Abhängigkeit '%s' für Paket '%s' fehlt"
-
-#: lib/libalpm/deps.c:409
-#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr "checkdeps: %s wird von %s benötigt"
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+#, fuzzy
+msgid "database path is undefined\n"
+msgstr "Datenbank-Pfad ist nicht definiert"
-#: lib/libalpm/deps.c:485
-#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr "Schließe %s aus -- Ausdrücklich installiert"
+#: lib/libalpm/deps.c:173
+#, fuzzy
+msgid "dependency cycle detected:\n"
+msgstr "Abhängigkeits-Zyklus entdeckt\n"
-#: lib/libalpm/deps.c:532
+#: lib/libalpm/deps.c:175
#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-"Kann Paket \"%s\" oder irgendwas, das es zur Verfügung stellt, nicht finden!"
-
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
-#, c-format
-msgid "adding '%s' to the targets"
-msgstr "Füge '%s' zu der Ziel-Liste hinzu"
-
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
-msgstr "Starte das Auflösen der Abhängigkeiten"
-#: lib/libalpm/deps.c:601
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "%s provides dependency %s -- skipping"
-msgstr "%s stellt Abhängigkeit %s zur Verfügung -- Überspringe"
-
-#: lib/libalpm/deps.c:630
-#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-"Kann Abhängigkeiten für \"%s\" nicht auflösen (\"%s\" ist nicht in "
-"Paketliste enthalten)"
-#: lib/libalpm/deps.c:647
-#, c-format
-msgid "dependency %s is already in the target list -- skipping"
-msgstr "Abhängigkeit %s ist bereits in der Ziel-Liste -- Überspringe"
-
-#: lib/libalpm/deps.c:667
-#, c-format
-msgid "pulling dependency %s (needed by %s)"
-msgstr "Ziehe Abhängigkeit %s (benötigt von %s)"
-
-#: lib/libalpm/deps.c:671
-#, c-format
-msgid "cannot resolve dependencies for \"%s\""
+#: lib/libalpm/deps.c:573
+#, fuzzy, c-format
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "Kann Abhängigkeiten für \"%s\" nicht auflösen"
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr "Abhängigkeits-Zyklus entdeckt: %s"
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr "Auflösen von Abhängigkeiten beendet"
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr "Speicher ist voll!"
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr "Unerwarteter Systemfehler"
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr "Unzureichende Rechte"
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr "Konnte Datei nicht finden oder lesen"
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+#, fuzzy
+msgid "could not find or read directory"
+msgstr "Konnte Datei nicht finden oder lesen"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr "Falsches oder NULL-Argument übergeben"
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr "Bibliothek nicht initialisiert"
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr "Bibliothek bereits initialisiert"
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr "Kann Datenbank nicht sperren"
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "Konnte Datenbank nicht öffnen"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "Konnte Datenbank nicht erstellen"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "Datenbank nicht initialisiert"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "Datenbank bereits registriert"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "Konnte Datenbank nicht finden"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "Konnte Datenbank nicht aktualisieren"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "Konnte Datenbank-Eintrag nicht entfernen"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr "Ungültige URL für den Server"
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr "Konnte Parameter nicht setzen"
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
-msgstr "Vorgang wurde schon gestartet"
+msgstr "Vorgang bereits gestartet"
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr "Vorgang nicht gestartet"
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr "Doppelte Ziele"
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr "Vorgang nicht vorbereitet"
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr "Vorgang abgebrochen"
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr "Operation nicht mit dem Vorgangs-Typ kompatibel"
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr "Konnte den Vorgang nicht durchführen"
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr "Konnte nicht alle Dateien herunterladen"
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr "Konnte Paket nicht finden oder lesen"
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr "Ungültiges oder beschädigtes Paket"
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr "Kann Paketdatei nicht öffnen"
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr "Kann Paketdaten nicht laden"
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr "Paket ist bereits installiert"
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr "Paket ist nicht installiert oder ältere Version"
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr "Konnte nicht alle Dateien des Paketes entfernen"
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "Paketname ist nicht gültig"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr "Beschädigtes Paket"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr "Kein solches Repositorium"
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+#, fuzzy
+msgid "corrupted delta"
+msgstr "Beschädigtes Paket"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr ""
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "Gruppe nicht gefunden"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr "Kann Abhängigkeiten nicht erfüllen"
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr "In Konflikt stehende Abhängigkeiten"
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr "In Konflikt stehende Dateien"
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr "Benutzer brach die Aktion ab"
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "Interner Fehler"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr "libarchive-Fehler"
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "Nicht genügend Speicherplatz"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr "Nicht bestätigt"
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr "Ungültiger Abschnittsname"
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr "'local' ist reserviert und kann nicht als Repositorium benutzt werden"
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr "Falsche Syntax in Beschreibungsdatei"
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr "Alle Anweisungen müssen zu einem Abschnitt gehören"
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "Ungültiger Regulärer Ausdruck"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr "Verbindung zum Server fehlgeschlagen"
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "Unerwarteter Fehler"
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr "Kann das spezifizierte Wurzelverzeichnis nicht anerkennen '%s'"
-
-#: lib/libalpm/handle.c:175
-#, c-format
-msgid "option 'root' = %s"
-msgstr "Konfiguration 'root' = %s"
-
-#: lib/libalpm/handle.c:195
-#, c-format
-msgid "option 'dbpath' = %s"
-msgstr "Konfiguration 'dbpath' = %s"
-
-#: lib/libalpm/handle.c:211
-#, c-format
-msgid "option 'cachedir' = %s"
-msgstr "Konfiguration 'cachedir' = %s"
-
-#: lib/libalpm/md5driver.c:56
-#, c-format
-msgid "%s can't be opened\n"
-msgstr "%s kann nicht geöffnet werden\n"
-
-#: lib/libalpm/md5driver.c:74
-#, c-format
-msgid "md5(%s) = %s"
-msgstr "MD5(%s) = %s"
+#: lib/libalpm/package.c:124
+#, fuzzy, c-format
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "Konnte MD5-Prüfsumme für Paket %s-%s nicht ermitteln"
-#: lib/libalpm/package.c:147
-#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr "%s-%s: Ignoriere Paketaktualisierung (%s)"
+#: lib/libalpm/package.c:133
+#, fuzzy, c-format
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "MD5-Prüfsummen für Paket %s-%s stimmen nicht überein"
-#: lib/libalpm/package.c:158
-#, c-format
-msgid "%s: forcing upgrade to version %s"
+#: lib/libalpm/package.c:737
+#, fuzzy, c-format
+msgid "%s: forcing upgrade to version %s\n"
msgstr "%s: Erzwungene Aktualisierung auf Version %s"
-#: lib/libalpm/package.c:163
-#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
+#: lib/libalpm/package.c:742
+#, fuzzy, c-format
+msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%s: Lokale Version (%s) ist neuer als %s (%s)"
-#: lib/libalpm/package.c:171
-#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
+#: lib/libalpm/package.c:750
+#, fuzzy, c-format
+msgid "%s-%s: delaying upgrade of package (%s)\n"
msgstr "%s-%s: Verzögere die Aktualisierung von Paket (%s)"
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
-#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr "%s: Falscher Syntax in Beschreibungsdatei, Zeile %d"
-
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
+#: lib/libalpm/package.c:931
+#, fuzzy, c-format
+msgid "could not parse package description file in %s\n"
msgstr "Konnte Paket-Beschreibungsdatei nicht analysieren"
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
+#: lib/libalpm/package.c:936
+#, fuzzy, c-format
+msgid "missing package name in %s\n"
msgstr "Fehlender Paketname in %s"
-#: lib/libalpm/package.c:363
-#, c-format
-msgid "missing package version in %s"
+#: lib/libalpm/package.c:940
+#, fuzzy, c-format
+msgid "missing package version in %s\n"
msgstr "Fehlende Paketversion in %s"
-#: lib/libalpm/package.c:398
-#, c-format
-msgid "could not remove tempfile %s"
+#: lib/libalpm/package.c:970
+#, fuzzy, c-format
+msgid "could not remove tempfile %s\n"
msgstr "Konnte tempfile %s nicht entfernen"
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
+#, fuzzy, c-format
+msgid "error while reading package %s: %s\n"
msgstr "Fehler beim Lesen des Paketes: %s"
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
+#: lib/libalpm/package.c:1005
+#, fuzzy, c-format
+msgid "missing package metadata in %s\n"
msgstr "Fehlende Paket-Metadaten"
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
+#: lib/libalpm/package.c:1012
+#, fuzzy, c-format
+msgid "missing package filelist in %s, generating one\n"
msgstr "Fehlende Paket-Dateiliste in %s, erstelle eine"
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr "Füge '%s' zum requiredby-Feld für '%s' hinzu"
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr "Füge '%s' zum requiredby-Feld für '%s' hinzu (stellt bereit: %s)"
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr "Konnte %s nicht in der Datenbank finden"
-
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
-msgstr "Füge %s zur Ziel-Liste hinzu"
-
#: lib/libalpm/remove.c:121
-#, c-format
-msgid "pulling %s in the targets list"
-msgstr "Ziehe %s in die Ziel-Liste"
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
+#, fuzzy, c-format
+msgid "could not find %s in database -- skipping\n"
msgstr "Konnte %s nicht in Datenbank finden -- Überspringe"
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr "Finde entfernbare Abhängigkeiten"
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
+#, fuzzy, c-format
+msgid "cannot remove file '%s': %s\n"
msgstr "Kann Datei '%s' nicht entfernen: %s"
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr "Überspringe das Entfernen von '%s' wegen NoUpgrade"
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "Datei %s existiert nicht"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "Behalte Verzeichnis %s"
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "Entferne Verzeichnis %s"
-
-#: lib/libalpm/remove.c:236
-#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr "%s ist in trans->skip_remove, überspringe das Entfernen"
-
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
-msgstr "Vorgang wurde auf NOSAVE gesetzt, '%s' wird nicht gesichert"
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr "Lösche %s"
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr "Kann Datei %s nicht entfernen: %s"
-
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr "Entferne Paket %s-%s"
-
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
-msgstr "Paket '%s' wird nicht entfernt, konnte nicht alle Dateien löschen"
-
-#: lib/libalpm/remove.c:316
-#, c-format
-msgid "removing %d files"
-msgstr "Entferne %d Dateien"
-
#: lib/libalpm/remove.c:337
-#, c-format
-msgid "removing database entry '%s'"
-msgstr "Entferne Datenbank-Eintrag '%s'"
-
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
+#, fuzzy, c-format
+msgid "could not remove database entry %s-%s\n"
msgstr "Konnte Datenbank-Eintrag %s-%s nicht entfernen"
-#: lib/libalpm/remove.c:344
-#, c-format
-msgid "could not remove entry '%s' from cache"
+#: lib/libalpm/remove.c:342
+#, fuzzy, c-format
+msgid "could not remove entry '%s' from cache\n"
msgstr "Konnte Eintrag '%s' nicht aus dem Puffer entfernen"
-#: lib/libalpm/sha1.c:397
-#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr "sha1: %s kann nicht geöffnet werden\n"
-
-#: lib/libalpm/sha1.c:412
-#, c-format
-msgid "sha1(%s) = %s"
-msgstr "sha1(%s) = %s"
-
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
-msgstr "Suche nach Paketaktualisierungen"
-
-#: lib/libalpm/sync.c:215
+#: lib/libalpm/server.c:56
#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
-msgstr "%s-%s ausgewählt für Aktualisierung (%s => %s)"
+msgid "url '%s' is invalid, ignoring\n"
+msgstr ""
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
-msgstr "Suche nach Ziel in Repositorium '%s'"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
+msgstr ""
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
-#, c-format
-msgid "target '%s' not found -- looking for provisions"
-msgstr "Ziel '%s' wurde nicht gefunden -- suche nach Ähnlichem"
+#: lib/libalpm/server.c:241
+msgid "disk"
+msgstr ""
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr "'%s' stellt '%s' bereit"
+#: lib/libalpm/server.c:245
+#, fuzzy, c-format
+msgid "failed retrieving file '%s' from %s : %s\n"
+msgstr "Konnte manche Dateien von %s nicht übertragen\n"
-#: lib/libalpm/sync.c:290
-#, c-format
-msgid "repository '%s' not found"
-msgstr "Repositorium '%s' nicht gefunden"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
+msgstr ""
-#: lib/libalpm/sync.c:331
-#, c-format
-msgid "%s-%s is up to date -- skipping"
-msgstr "%s-%s ist aktuell -- Überspringe"
+#: lib/libalpm/server.c:288
+#, fuzzy, c-format
+msgid "cannot write to file '%s'\n"
+msgstr "Kann Datei '%s' nicht entfernen: %s"
-#: lib/libalpm/sync.c:354
-#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr "Füge das Ziel '%s' zur Vorgangsliste hinzu"
+#: lib/libalpm/server.c:307
+#, fuzzy, c-format
+msgid "error downloading '%s': %s\n"
+msgstr "Fehler beim Lesen des Paketes: %s"
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr "Auflösen von Ziel-Abhängigkeiten"
+#: lib/libalpm/server.c:319
+#, fuzzy, c-format
+msgid "error writing to file '%s': %s\n"
+msgstr "Kann Datei '%s' nicht entfernen: %s"
-#: lib/libalpm/sync.c:422
-#, c-format
-msgid "adding package %s-%s to the transaction targets"
-msgstr "Füge Paket %s-%s zur Vorgangszielen hinzu"
+#: lib/libalpm/server.c:387
+#, fuzzy, c-format
+msgid "could not chdir to %s\n"
+msgstr "Konnte nicht zu Verzeichnis / wechseln (%s)"
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
-msgstr "Suche nach unlösbaren Abhängigkeiten"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
+msgstr ""
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "Paket '%s' steht im Konflikt mit '%s'"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
+msgstr ""
-#: lib/libalpm/sync.c:516
-#, c-format
-msgid "'%s' not found in transaction set -- skipping"
-msgstr "'%s' wurde nicht in der Vorgangsliste gefunden -- überspringe"
+#: lib/libalpm/server.c:458
+#, fuzzy, c-format
+msgid "failed to download %s\n"
+msgstr "Konnte nicht alle Dateien herunterladen"
-#: lib/libalpm/sync.c:527
-#, c-format
-msgid "package '%s' provides its own conflict"
-msgstr "Paket '%s' steht im Konflikt mit sich selbst"
+#: lib/libalpm/sync.c:135
+#, fuzzy, c-format
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
+msgstr "%s-%s: Ignoriere zu aktualisierendes Packet (zu ersetzen durch %s-%s)"
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
-#, c-format
-msgid "'%s' is in the target list -- keeping it"
-msgstr "'%s' ist in der Ziel-Liste -- ich behalte es"
+#: lib/libalpm/sync.c:250
+#, fuzzy, c-format
+msgid "%s: ignoring package upgrade (%s => %s)\n"
+msgstr "%s-%s: Ignoriere Paketaktualisierung (%s)"
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
-#, c-format
-msgid "removing '%s' from target list"
-msgstr "Entferne '%s' von Ziel-Liste"
+#: lib/libalpm/sync.c:320
+#, fuzzy, c-format
+msgid "repository '%s' not found\n"
+msgstr "Repositorium '%s' nicht gefunden"
-#: lib/libalpm/sync.c:576
-#, c-format
-msgid "resolving package '%s' conflict"
-msgstr "Löse Paket-Konflikt '%s'"
+#: lib/libalpm/sync.c:354
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "%s-%s ist aktuell -- Überspringe"
-#: lib/libalpm/sync.c:599
-#, c-format
-msgid "electing '%s' for removal"
-msgstr "Wähle '%s' zum Entfernen aus"
+#: lib/libalpm/sync.c:358
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- reinstalling\n"
+msgstr "%s-%s ist aktuell -- Überspringe"
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+#, fuzzy
+msgid "unresolvable package conflicts detected\n"
msgstr "Nicht lösbare Paketkonflikte gefunden"
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr "Überprüfe die Abhängigkeiten der zu entfernenden Pakete"
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr "etwas ist fürchterlich schief gegangen"
-
-#: lib/libalpm/sync.c:712
-#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
-msgstr "'%s' stellt '%s' bereit -- Konflikt abgewandt"
-
-#: lib/libalpm/sync.c:808
-#, c-format
-msgid "%s is already in the cache\n"
-msgstr "%s ist bereits im Puffer\n"
-
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
-msgstr "Es existiert kein %s-Puffer. Erstelle... \n"
-
-#: lib/libalpm/sync.c:820
-#, c-format
-msgid "warning: no %s cache exists, creating..."
-msgstr "Warnung: Es existiert kein %s Puffer. Erstelle..."
+#: lib/libalpm/sync.c:628
+#, fuzzy, c-format
+msgid "malloc failure: could not allocate %zd bytes\n"
+msgstr "malloc-Fehler: Konnte %d Bytes nicht zuweisen"
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr "Konnte Paketpuffer nicht erstellen, benutze stattdessen /tmp\n"
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr "Warnung: Konnte Paketpuffer nicht erstellen; benutze stattdessen /tmp"
-
-#: lib/libalpm/sync.c:833
#, c-format
-msgid "failed to retrieve some files from %s\n"
-msgstr "Konnte manche Dateien von %s nicht übertragen\n"
+msgid "command: %s\n"
+msgstr ""
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
+#, fuzzy, c-format
+msgid "can't get md5 checksum for file %s\n"
msgstr "Kann MD5- oder SHA1-Prüfsumme für Paket %s nicht ermitteln\n"
-#: lib/libalpm/sync.c:894
-#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
+#: lib/libalpm/sync.c:910
+#, fuzzy, c-format
+msgid "file %s was corrupted (bad MD5 checksum)\n"
msgstr "Archiv %s war beschädigt (falsche MD5- oder SHA1-Prüfsumme)\n"
-#: lib/libalpm/sync.c:896
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "Archiv %s ist beschädigt (falsche MD5- oder SHA1-Prüfsumme)\n"
+msgid "failed to retrieve some files from %s\n"
+msgstr "Konnte manche Dateien von %s nicht übertragen\n"
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
+#: lib/libalpm/sync.c:1137
+#, fuzzy
+msgid "could not create removal transaction\n"
msgstr "Konnte den Lösch-Vorgang nicht erstellen"
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
+#: lib/libalpm/sync.c:1143
+#, fuzzy
+msgid "could not initialize the removal transaction\n"
msgstr "Konnte den Lösch-Vorgang nicht beginnen"
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr "Entferne im Konflikt stehende und zu ersetzende Pakete"
-
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
+#: lib/libalpm/sync.c:1165
+#, fuzzy
+msgid "could not prepare removal transaction\n"
msgstr "Konnte Lösch-Vorgang nicht vorbereiten"
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
+#: lib/libalpm/sync.c:1171
+#, fuzzy
+msgid "could not commit removal transaction\n"
msgstr "Konnte Lösch-Vorgang nicht durchführen"
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr "Installiere Pakete"
-
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
+#: lib/libalpm/sync.c:1182
+#, fuzzy
+msgid "could not create transaction\n"
msgstr "Konnte den Vorgang nicht erstellen"
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
+#: lib/libalpm/sync.c:1187
+#, fuzzy
+msgid "could not initialize transaction\n"
msgstr "Konnte den Vorgang nicht beginnen"
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
+#: lib/libalpm/sync.c:1214
+#, fuzzy
+msgid "could not prepare transaction\n"
msgstr "Konnte den Vorgang nicht vorbereiten"
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
-msgstr "Aktualisiere Datenbank für die Abhängigkeiten der ersetzten Pakete"
+#: lib/libalpm/sync.c:1219
+#, fuzzy
+msgid "could not commit transaction\n"
+msgstr "Konnte den Vorgang nicht durchführen"
-#: lib/libalpm/sync.c:1030
-#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr "Konnte requiredby für Datenbank-Eintrag %s-%s nicht aktualisieren"
+#: lib/libalpm/trans.c:214
+#, fuzzy, c-format
+msgid "could not remove lock file %s\n"
+msgstr "Konnte Sperrdatei %s nicht entfernen"
-#: lib/libalpm/sync.c:1039
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "could not update new database entry %s-%s"
-msgstr "Konnte neuen Datenbank-Eintrag %s-%s nicht aktualisieren"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
+msgstr ""
-#: lib/libalpm/sync.c:1079
-#, c-format
-msgid "found package '%s-%s' in sync"
-msgstr "Paket '%s-%s' gefunden"
+#: lib/libalpm/trans.c:494
+#, fuzzy
+msgid "could not create temp directory\n"
+msgstr "Konnte temp-Verzeichnis nicht erstellen"
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr "Paket '%s' nicht in Datenbank gefunden"
+#: lib/libalpm/trans.c:536
+#, fuzzy, c-format
+msgid "could not change directory to %s (%s)\n"
+msgstr "Konnte nicht zu Verzeichnis %s wechseln (%s)"
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr "Aktualisiere requiredby-Felder abhängiger Pakete für %s-%s"
+#: lib/libalpm/trans.c:554
+#, fuzzy, c-format
+msgid "could not fork a new process (%s)\n"
+msgstr "Konnte keinen neuen Prozess starten (%s)"
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
-msgstr ""
-"Paket besitzt keine Abhängigkeiten, kein anderes Paket muß aktualisiert "
-"werden"
+#: lib/libalpm/trans.c:564
+#, fuzzy, c-format
+msgid "could not change the root directory (%s)\n"
+msgstr "Konnte root-Verzeichnis nicht wechseln (%s)"
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr "Aktualisiere requiredby-Feld für Paket '%s'"
+#: lib/libalpm/trans.c:569
+#, fuzzy, c-format
+msgid "could not change directory to / (%s)\n"
+msgstr "Konnte nicht zu Verzeichnis / wechseln (%s)"
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
-#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
-msgstr "Konnte requiredby-Eintrag %s-%s nicht aktualisieren"
+#: lib/libalpm/trans.c:578
+#, fuzzy, c-format
+msgid "call to popen failed (%s)"
+msgstr "Aufruf von 'waitpid' fehlgeschlagen (%s)"
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr "Konnte Abhängigkeit '%s' nicht finden"
+#: lib/libalpm/trans.c:597
+#, fuzzy, c-format
+msgid "call to waitpid failed (%s)\n"
+msgstr "Aufruf von 'waitpid' fehlgeschlagen (%s)"
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
+msgstr ""
+
+#: lib/libalpm/trans.c:615
+#, fuzzy, c-format
+msgid "could not remove tmpdir %s\n"
+msgstr "Konnte tmpdir %s nicht entfernen"
+
+#: lib/libalpm/util.c:204
+#, fuzzy, c-format
+msgid "failed to make path '%s' : %s\n"
msgstr "Konnte Pfad nicht erstellen '%s' : %s"
-#: lib/libalpm/util.c:280
+#: lib/libalpm/util.c:389
#, c-format
msgid "could not open %s: %s\n"
msgstr "Konnte Datei %s nicht öffnen: %s\n"
-#: lib/libalpm/util.c:293
+#: lib/libalpm/util.c:573
#, c-format
-msgid "could not extract %s: %s\n"
-msgstr "Konnte %s nicht entpacken: %s\n"
+msgid "no %s cache exists, creating...\n"
+msgstr "Es existiert kein %s-Puffer. Erstelle... \n"
+
+#: lib/libalpm/util.c:593
+#, fuzzy
+msgid "couldn't create package cache, using /tmp instead\n"
+msgstr "Konnte Paketpuffer nicht erstellen, benutze stattdessen /tmp"
-#: lib/libalpm/util.c:350
+#: lib/libalpm/util.c:643
#, c-format
-msgid "logaction called: %s"
-msgstr "Log-Aktion aufgerufen: %s"
+msgid "md5: %s can't be opened\n"
+msgstr "md5: %s kann nicht geöffnet werden\n"
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
-msgstr "Konnte temp-Verzeichnis nicht erstellen"
+#: lib/libalpm/util.c:645
+#, fuzzy, c-format
+msgid "md5: %s can't be read\n"
+msgstr "md5: %s kann nicht geöffnet werden\n"
-#: lib/libalpm/util.c:472
-#, c-format
-msgid "could not change directory to %s (%s)"
-msgstr "Konnte nicht zu Verzeichnis %s wechseln (%s)"
+#~ msgid "please remove '%s' first, using -Rd"
+#~ msgstr "Entfernen Sie bitte zuerst '%s' mit -Rd"
-#: lib/libalpm/util.c:476
-#, c-format
-msgid "executing %s script..."
-msgstr "Führe %s-Skript aus ..."
+#~ msgid "could not extract %s (%s)"
+#~ msgstr "Konnte %s nicht entpacken (%s)"
-#: lib/libalpm/util.c:489
-#, c-format
-msgid "could not fork a new process (%s)"
-msgstr "Konnte keinen neuen Prozess starten (%s)"
+#~ msgid "could not update provision '%s' from '%s'"
+#~ msgstr "Konnte Bereitstellung '%s' von '%s' nicht aktualisieren"
-#: lib/libalpm/util.c:496
-#, c-format
-msgid "chrooting in %s"
-msgstr "chroot in %s"
+#~ msgid "%s: description file is missing"
+#~ msgstr "%s: Beschreibungsdatei fehlt"
-#: lib/libalpm/util.c:498
-#, c-format
-msgid "could not change the root directory (%s)"
-msgstr "Konnte root-Verzeichnis nicht wechseln (%s)"
+#~ msgid "%s: dependency file is missing"
+#~ msgstr "%s: Abhängige Datei fehlt"
-#: lib/libalpm/util.c:502
-#, c-format
-msgid "could not change directory to / (%s)"
-msgstr "Konnte nicht zu Verzeichnis / wechseln (%s)"
+#~ msgid "%s: file list is missing"
+#~ msgstr "%s: Dateiliste fehlt"
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
-msgstr "Führe \"%s\" aus"
+#~ msgid "malloc failed: could not allocate %d bytes"
+#~ msgstr "malloc fehlgeschlagen: Konnte %d Bytes nicht zuweisen"
-#: lib/libalpm/util.c:509
-#, c-format
-msgid "call to popen failed (%s)"
-msgstr "Aufruf von 'popen' fehlgeschlagen (%s)"
+#~ msgid ""
+#~ "cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+#~ msgstr ""
+#~ "Kann Abhängigkeiten für \"%s\" nicht auflösen (\"%s\" ist nicht in "
+#~ "Paketliste enthalten)"
-#: lib/libalpm/util.c:541
-#, c-format
-msgid "call to waitpid failed (%s)"
-msgstr "Aufruf von 'waitpid' fehlgeschlagen (%s)"
+#~ msgid "cannot canonicalize specified root path '%s'"
+#~ msgstr "Kann das spezifizierte Wurzelverzeichnis '%s' nicht anerkennen"
-#: lib/libalpm/util.c:550
-#, c-format
-msgid "could not remove tmpdir %s"
-msgstr "Konnte tmpdir %s nicht entfernen"
+#~ msgid "could not get sha1sum for package %s-%s"
+#~ msgstr "Konnte SHA1-Prüfsumme für Paket %s-%s nicht ermitteln"
-#: lib/libalpm/util.c:568
-#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr "Konnte freien Speicher von %s nicht ermitteln: %s"
+#~ msgid "sha1sums do not match for package %s-%s"
+#~ msgstr "SHA1-Prüfsummen für Paket %s-%s stimmen nicht überein"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
-msgstr "Prüfe freien Speicher: Gesamte pkg-Größe: %lld, Speicherplatz: %lld"
+#~ msgid "cannot remove file %s: %s"
+#~ msgstr "Kann Datei %s nicht entfernen: %s"
-#: lib/libalpm/versioncmp.c:279
-#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr "depcmp: %s-%s %s %s-%s => %s"
+#~ msgid "sha1: %s can't be opened\n"
+#~ msgstr "sha1: %s kann nicht geöffnet werden\n"
-#: lib/libalpm/versioncmp.c:284
-#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr "depcmp: %s-%s %s %s => %s"
+#~ msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
+#~ msgstr "Archiv %s ist beschädigt (falsche MD5- oder SHA1-Prüfsumme)\n"
+
+#~ msgid "could not update requiredby for database entry %s-%s"
+#~ msgstr "Konnte requiredby für Datenbank-Eintrag %s-%s nicht aktualisieren"
+
+#~ msgid "could not update new database entry %s-%s"
+#~ msgstr "Konnte neuen Datenbank-Eintrag %s-%s nicht aktualisieren"
+
+#~ msgid "could not update 'requiredby' database entry %s-%s"
+#~ msgstr "Konnte requiredby-Eintrag %s-%s nicht aktualisieren"
diff --git a/lib/libalpm/po/en_GB.po b/lib/libalpm/po/en_GB.po
index f4428e48..c9aa7a0b 100644
--- a/lib/libalpm/po/en_GB.po
+++ b/lib/libalpm/po/en_GB.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Pacman package manager 3.0.0\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
-"PO-Revision-Date: 2007-03-07 21:05+1100\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
+"PO-Revision-Date: 2007-12-03 15:22+1000\n"
"Last-Translator: Jeff Bailes <thepizzaking@gmail.com>\n"
"Language-Team: English <en_gb@li.org>\n"
"MIME-Version: 1.0\n"
@@ -16,1491 +16,713 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/libalpm/add.c:77
+#: lib/libalpm/add.c:88
#, c-format
-msgid "loading target '%s'"
-msgstr "loading target '%s'"
+msgid "replacing older version %s-%s by %s in target list\n"
+msgstr "replacing older version %s-%s by %s in target list\n"
-#: lib/libalpm/add.c:122
+#: lib/libalpm/add.c:97
#, c-format
-msgid "replacing older version %s-%s by %s in target list"
-msgstr "replacing older version %s-%s by %s in target list"
+msgid "newer version %s-%s is in the target list -- skipping\n"
+msgstr "newer version %s-%s is in the target list -- skipping\n"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
-msgstr "newer version %s-%s is in the target list -- skipping"
-
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "reading '%s' metadata"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "looking for unsatisfied dependencies"
-
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "looking for conflicts"
-
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
-msgstr "replacing packages with -A and -U is not supported yet"
-
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "please remove '%s' first, using -Rd"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "sorting by dependencies"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "cleaning up"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "looking for file conflicts"
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "upgrading package %s-%s"
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "adding package %s-%s"
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "removing old package first (%s-%s)"
-
-#: lib/libalpm/add.c:411
-#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr "adding %s to the NoUpgrade array temporarily"
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "extracting files"
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "could not get current working directory"
-
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
-#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s is in NoExtract, skipping extraction"
-
-#: lib/libalpm/add.c:508
-#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
-msgstr "%s is in trans->skip_add, skipping extraction"
-
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
-msgstr "could not extract %s (%s)"
-
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "checking md5 hashes for %s"
-
-#: lib/libalpm/add.c:600
-#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "checking sha1 hashes for %s"
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr "current: %s"
-
-#: lib/libalpm/add.c:603
-#, c-format
-msgid "new: %s"
-msgstr "new: %s"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
+msgstr "conflicting packages were found in the target list\n"
-#: lib/libalpm/add.c:604
-#, c-format
-msgid "original: %s"
-msgstr "original: %s"
-
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
-msgstr "could not rename %s (%s)"
-
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "error: could not rename %s (%s)"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
-msgstr "could not copy tempfile to %s (%s)"
-
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "error: could not copy tempfile to %s (%s)"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
+msgstr "you cannot install two conflicting packages at the same time\n"
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
-msgstr "%s saved as %s"
-
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "warning: %s saved as %s"
+#: lib/libalpm/add.c:172
+msgid "replacing packages with -A and -U is not supported yet\n"
+msgstr "replacing packages with -A and -U is not supported yet\n"
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "action: installing new file: %s"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "action: leaving existing file in place"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-"action: keeping current file and installing new one with .pacnew ending"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
-msgstr "could not install %s as %s: %s"
-
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "error: could not install %s as %s: %s"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
-msgstr "%s installed as %s"
-
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "warning: %s installed as %s"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s is in NoUpgrade -- skipping"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
-msgstr "extracting %s as %s.pacnew"
-
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "warning: extracting %s as %s.pacnew"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "extracting %s"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "error: could not extract %s (%s)"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr "appending backup entry for %s"
-
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
-msgstr "errors occurred while %s %s"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "upgrading"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "installing"
-
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr "provision '%s' has been removed from package %s (%s => %s)"
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr "updating '%s' due to provision change (%s)"
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr "could not update provision '%s' from '%s'"
-
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "updating database"
-
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "adding database entry '%s'"
-
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
-msgstr "could not update database entry %s-%s"
-
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
-msgstr "could not add entry '%s' in cache"
-
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "running \"ldconfig -r %s\""
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr "removing DB %s, %d remaining..."
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr "unregistering database '%s'"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
+msgstr "you can replace packages manually using -Rd and -U\n"
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "closing database '%s'"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "serverlist flushed for '%s'"
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr "failed to get lastupdate time for %s (no big deal)"
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "failed to sync db: %s [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr "sync: new mtime for %s: %s"
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr "flushing database %s%s"
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr "could not remove database entry %s%s"
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "could not get sha1sum for package %s-%s"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "sha1sums for package %s-%s match"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "sha1sums do not match for package %s-%s"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "could not get md5sum for package %s-%s"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "md5sums for package %s-%s match"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "md5sums do not match for package %s-%s"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "could not remove lock file %s"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "warning: could not remove lock file %s"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "config: new section '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr "config: nopassiveftp"
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr "config: usesyslog"
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr "config: chomp"
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr "config: usecolor"
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr "config: including %s"
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr "config: noupgrade: %s"
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr "config: noextract: %s"
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr "config: ignorepkg: %s"
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr "config: holdpkg: %s"
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr "config: dbpath: %s"
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr "config: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1044
-#, fuzzy, c-format
-msgid "config: rootdir: %s"
-msgstr "config: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr "config: logfile: %s"
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr "config: xfercommand: %s"
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr "config: upgradedelay: %d"
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "checking for package replacements"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "checking replacement '%s' for package '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s elected for upgrade (to be replaced by %s-%s)"
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr "'%s' not found in sync db -- skipping"
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr "'%s' is already elected for removal -- skipping"
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr "%s elected for upgrade (%s => %s)"
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "unpacking database '%s'"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr "opening database from path '%s'"
-
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
-msgstr "db scan could not find package: %s"
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
-msgstr "invalid name for database entry '%s'"
-
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr "invalid package entry provided to _alpm_db_read, skipping"
-
-#: lib/libalpm/be_files.c:226
+#: lib/libalpm/add.c:365
#, c-format
msgid ""
-"request to read database info for a file-based package '%s', skipping..."
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
msgstr ""
-"request to read database info for a file-based package '%s', skipping..."
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
-#: lib/libalpm/be_files.c:239
+#: lib/libalpm/add.c:392
#, c-format
-msgid "loading package data for %s : level=%d"
-msgstr "loading package data for %s : level=%d"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr "extract: symlink %s does not point to dir\n"
-#: lib/libalpm/be_files.c:247
+#: lib/libalpm/add.c:399
#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr "cannot find '%s-%s' in db '%s'"
+msgid "extract: not overwriting dir with file %s\n"
+msgstr "extract: not overwriting dir with file %s\n"
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
-msgstr "could not open file %s: %s"
-
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr "writing %s-%s DESC information back to db"
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr "writing %s-%s FILES information back to db"
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr "writing %s-%s DEPENDS information back to db"
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr "loading package cache for repository '%s'"
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
-msgstr "adding '%s' to package cache for db '%s'"
-
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr "freeing package cache for repository '%s'"
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr "error: pkgcache is NULL for db '%s'"
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr "adding entry '%s' in '%s' cache"
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr "removing entry '%s' from '%s' cache"
-
-#: lib/libalpm/cache.c:156
-#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr "cannot remove entry '%s' from '%s' cache: not found"
-
-#: lib/libalpm/cache.c:178
-#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr "error: failed to get '%s' from NULL pkgcache"
-
-#: lib/libalpm/cache.c:201
-#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr "loading group cache for repository '%s'"
-
-#: lib/libalpm/conflict.c:69
-#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr " found conflict '%s' : package '%s'"
-
-#: lib/libalpm/conflict.c:78
-#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr " found conflict '%s' : package '%s' provides '%s'"
-
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
-#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr "package '%s' conflicts with itself - packaging error"
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr "checkconflicts: target '%s' vs db"
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr "checkconflicts: target '%s' vs all targets"
-
-#: lib/libalpm/conflict.c:181
+#: lib/libalpm/add.c:454
+#: lib/libalpm/add.c:598
+#: lib/libalpm/util.c:422
#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr "checkconflicts: db vs target '%s'"
+msgid "could not extract %s (%s)\n"
+msgstr "could not extract %s (%s)\n"
-#: lib/libalpm/conflict.c:201
+#: lib/libalpm/add.c:505
#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr "target '%s' is also in target list, using NEW conflicts"
+msgid "could not rename %s (%s)\n"
+msgstr "could not rename %s (%s)\n"
-#: lib/libalpm/conflict.c:257
+#: lib/libalpm/add.c:512
+#: lib/libalpm/add.c:532
+#: lib/libalpm/trans.c:508
#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr "\tCONFLICTS:: %s conflicts with %s"
+msgid "could not copy tempfile to %s (%s)\n"
+msgstr "could not copy tempfile to %s (%s)\n"
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
+#: lib/libalpm/add.c:517
+#: lib/libalpm/remove.c:234
#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr "malloc failure: could not allocate %d bytes"
+msgid "%s saved as %s\n"
+msgstr "%s saved as %s\n"
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
+#: lib/libalpm/add.c:556
#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr "malloc failed: could not allocate %d bytes"
-
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
-msgstr "attempt to re-register the 'local' DB"
+msgid "could not install %s as %s: %s\n"
+msgstr "could not install %s as %s: %s\n"
-#: lib/libalpm/db.c:175
+#: lib/libalpm/add.c:559
#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr "attempt to re-register the '%s' database, using existing"
+msgid "%s installed as %s\n"
+msgstr "%s installed as %s\n"
-#: lib/libalpm/db.c:181
+#: lib/libalpm/add.c:576
#, c-format
-msgid "registering database '%s'"
-msgstr "registering database '%s'"
+msgid "extracting %s as %s.pacnew\n"
+msgstr "extracting %s as %s.pacnew\n"
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr "database directory '%s' does not exist, creating it"
+#: lib/libalpm/add.c:711
+#: lib/libalpm/trans.c:529
+msgid "could not get current working directory\n"
+msgstr "could not get current working directory\n"
-#: lib/libalpm/db.c:197
+#: lib/libalpm/add.c:765
#, c-format
-msgid "opening database '%s'"
-msgstr "opening database '%s'"
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr "started sorting dependencies"
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr "possible dependency cycle detected"
+msgid "problem occurred while upgrading %s\n"
+msgstr "problem occurred while upgrading %s\n"
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr "sorting dependencies finished"
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr "null package found in package list"
-
-#: lib/libalpm/deps.c:230
+#: lib/libalpm/add.c:770
#, c-format
-msgid "cannot find package installed '%s'"
-msgstr "cannot find package installed '%s'"
+msgid "problem occurred while installing %s\n"
+msgstr "problem occurred while installing %s\n"
-#: lib/libalpm/deps.c:261
+#: lib/libalpm/add.c:785
#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr "checkdeps: dependency '%s' has moved from '%s' to '%s'"
+msgid "could not update database entry %s-%s\n"
+msgstr "could not update database entry %s-%s\n"
-#: lib/libalpm/deps.c:280
+#: lib/libalpm/add.c:793
#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
-msgstr "checkdeps: dependency '%s' satisfied by installed package '%s'"
+msgid "could not add entry '%s' in cache\n"
+msgstr "could not add entry '%s' in cache\n"
-#: lib/libalpm/deps.c:289
+#: lib/libalpm/be_files.c:223
#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
-msgstr "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
+msgid "invalid name for database entry '%s'\n"
+msgstr "invalid name for database entry '%s'\n"
-#: lib/libalpm/deps.c:359
+#: lib/libalpm/be_files.c:275
#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr "missing dependency '%s' for package '%s'"
+msgid "loading package data for %s : level=%d\n"
+msgstr "loading package data for %s : level=%d\n"
-#: lib/libalpm/deps.c:409
+#: lib/libalpm/be_files.c:292
+#: lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452
+#: lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641
+#: lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr "checkdeps: found %s as required by %s"
+msgid "could not open file %s: %s\n"
+msgstr "could not open file %s: %s\n"
-#: lib/libalpm/deps.c:485
+#: lib/libalpm/cache.c:62
#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr "excluding %s -- explicitly installed"
+msgid "adding '%s' to package cache for db '%s'\n"
+msgstr "adding '%s' to package cache for db '%s'\n"
-#: lib/libalpm/deps.c:532
+#: lib/libalpm/db.c:285
#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
-msgstr "cannot find package \"%s\" or anything that provides it!"
+msgid "could not remove database entry %s%s\n"
+msgstr "could not remove database entry %s%s\n"
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
-#, c-format
-msgid "adding '%s' to the targets"
-msgstr "adding '%s' to the targets"
+#: lib/libalpm/db.c:553
+msgid "attempt to re-register the 'local' DB\n"
+msgstr "attempt to re-register the 'local' DB\n"
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
-msgstr "started resolving dependencies"
+#: lib/libalpm/db.c:562
+#: lib/libalpm/db.c:613
+msgid "database path is undefined\n"
+msgstr "database path is undefined\n"
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
-msgstr "%s provides dependency %s -- skipping"
+#: lib/libalpm/deps.c:173
+msgid "dependency cycle detected:\n"
+msgstr "dependency cycle detected:\n"
-#: lib/libalpm/deps.c:630
+#: lib/libalpm/deps.c:175
#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
-msgstr ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+msgid "%s will be removed after its %s dependency\n"
+msgstr "%s will be removed after its %s dependency\n"
-#: lib/libalpm/deps.c:647
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "dependency %s is already in the target list -- skipping"
-msgstr "dependency %s is already in the target list -- skipping"
+msgid "%s will be installed before its %s dependency\n"
+msgstr "%s will be installed before its %s dependency\n"
-#: lib/libalpm/deps.c:667
+#: lib/libalpm/deps.c:573
#, c-format
-msgid "pulling dependency %s (needed by %s)"
-msgstr "pulling dependency %s (needed by %s)"
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
+msgstr "cannot resolve \"%s\", a dependency of \"%s\"\n"
-#: lib/libalpm/deps.c:671
-#, c-format
-msgid "cannot resolve dependencies for \"%s\""
-msgstr "cannot resolve dependencies for \"%s\""
-
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr "dependency cycle detected: %s"
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr "finished resolving dependencies"
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr "out of memory!"
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr "unexpected system error"
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr "insufficient privileges"
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr "could not find or read file"
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+msgid "could not find or read directory"
+msgstr "could not find or read directory"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr "wrong or NULL argument passed"
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr "library not initialised"
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr "library already initialised"
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr "unable to lock database"
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "could not open database"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "could not create database"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "database not initialised"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "database already registered"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "could not find database"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "could not update database"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "could not remove database entry"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr "invalid url for server"
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr "could not set parameter"
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr "transaction already initialised"
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90
+#: lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr "transaction not initialised"
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr "duplicate target"
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr "transaction not prepared"
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr "transaction aborted"
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr "operation not compatible with the transaction type"
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr "could not commit transaction"
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr "could not download all files"
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr "could not find or read package"
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr "invalid or corrupted package"
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr "cannot open package file"
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr "cannot load package data"
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr "package already installed"
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr "package not installed or lesser version"
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr "cannot remove all files for package"
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "package name is not valid"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr "corrupted package"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr "no such repository"
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+msgid "corrupted delta"
+msgstr "corrupted delta"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr "delta patch failed"
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "group not found"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr "could not satisfy dependencies"
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr "conflicting dependencies"
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr "conflicting files"
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr "user aborted the operation"
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "internal error"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr "libarchive error"
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "not enough space on disk"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr "not confirmed"
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr "bad configuration section name"
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr "'local' is reserved and cannot be used as a repository name"
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr "syntax error in config file"
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr "all directives must belong to a section"
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "invalid regular expression"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr "connection to remote host failed"
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "unexpected error"
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr "cannot canonicalise specified root path '%s'"
-
-#: lib/libalpm/handle.c:175
+#: lib/libalpm/package.c:124
#, c-format
-msgid "option 'root' = %s"
-msgstr "option 'root' = %s"
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "could not get md5sum for package %s-%s\n"
-#: lib/libalpm/handle.c:195
+#: lib/libalpm/package.c:133
#, c-format
-msgid "option 'dbpath' = %s"
-msgstr "option 'dbpath' = %s"
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "md5sums do not match for package %s-%s\n"
-#: lib/libalpm/handle.c:211
+#: lib/libalpm/package.c:737
#, c-format
-msgid "option 'cachedir' = %s"
-msgstr "option 'cachedir' = %s"
+msgid "%s: forcing upgrade to version %s\n"
+msgstr "%s: forcing upgrade to version %s\n"
-#: lib/libalpm/md5driver.c:56
+#: lib/libalpm/package.c:742
#, c-format
-msgid "%s can't be opened\n"
-msgstr "%s can't be opened\n"
+msgid "%s: local (%s) is newer than %s (%s)\n"
+msgstr "%s: local (%s) is newer than %s (%s)\n"
-#: lib/libalpm/md5driver.c:74
+#: lib/libalpm/package.c:750
#, c-format
-msgid "md5(%s) = %s"
-msgstr "md5(%s) = %s"
+msgid "%s-%s: delaying upgrade of package (%s)\n"
+msgstr "%s-%s: delaying upgrade of package (%s)\n"
-#: lib/libalpm/package.c:147
+#: lib/libalpm/package.c:931
#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr "%s-%s: ignoring package upgrade (%s)"
+msgid "could not parse package description file in %s\n"
+msgstr "could not parse package description file in %s\n"
-#: lib/libalpm/package.c:158
+#: lib/libalpm/package.c:936
#, c-format
-msgid "%s: forcing upgrade to version %s"
-msgstr "%s: forcing upgrade to version %s"
+msgid "missing package name in %s\n"
+msgstr "missing package name in %s\n"
-#: lib/libalpm/package.c:163
+#: lib/libalpm/package.c:940
#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
-msgstr "%s: local (%s) is newer than %s (%s)"
+msgid "missing package version in %s\n"
+msgstr "missing package version in %s\n"
-#: lib/libalpm/package.c:171
+#: lib/libalpm/package.c:970
#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
-msgstr "%s-%s: delaying upgrade of package (%s)"
+msgid "could not remove tempfile %s\n"
+msgstr "could not remove tempfile %s\n"
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
+#: lib/libalpm/package.c:985
+#: lib/libalpm/package.c:998
#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr "%s: syntax error in description file line %d"
+msgid "error while reading package %s: %s\n"
+msgstr "error while reading package %s: %s\n"
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
-msgstr "could not parse the package description file"
-
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
-msgstr "missing package name in %s"
-
-#: lib/libalpm/package.c:363
+#: lib/libalpm/package.c:1005
#, c-format
-msgid "missing package version in %s"
-msgstr "missing package version in %s"
+msgid "missing package metadata in %s\n"
+msgstr "missing package metadata in %s\n"
-#: lib/libalpm/package.c:398
+#: lib/libalpm/package.c:1012
#, c-format
-msgid "could not remove tempfile %s"
-msgstr "could not remove tempfile %s"
-
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
-msgstr "error while reading package: %s"
-
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
-msgstr "missing package metadata"
-
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
-msgstr "missing package filelist in %s, generating one"
-
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr "adding '%s' in requiredby field for '%s'"
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr "adding '%s' in requiredby field for '%s' (provides: %s)"
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr "could not find %s in database"
-
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
-msgstr "adding %s in the targets list"
+msgid "missing package filelist in %s, generating one\n"
+msgstr "missing package filelist in %s, generating one\n"
#: lib/libalpm/remove.c:121
#, c-format
-msgid "pulling %s in the targets list"
-msgstr "pulling %s in the targets list"
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
-msgstr "could not find %s in database -- skipping"
-
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr "finding removable dependencies"
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
-msgstr "cannot remove file '%s': %s"
-
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr "Skipping removal of '%s' due to NoUpgrade"
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "file %s does not exist"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "keeping directory %s"
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "removing directory %s"
-
-#: lib/libalpm/remove.c:236
-#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr "%s is in trans->skip_remove, skipping removal"
-
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
-msgstr "transaction is set to NOSAVE, not backing up '%s'"
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr "unlinking %s"
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr "cannot remove file %s: %s"
-
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr "removing package %s-%s"
-
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
-msgstr "not removing package '%s', can't remove all files"
+msgid "could not find %s in database -- skipping\n"
+msgstr "could not find %s in database -- skipping\n"
-#: lib/libalpm/remove.c:316
+#: lib/libalpm/remove.c:172
+#: lib/libalpm/remove.c:243
#, c-format
-msgid "removing %d files"
-msgstr "removing %d files"
+msgid "cannot remove file '%s': %s\n"
+msgstr "cannot remove file '%s': %s\n"
#: lib/libalpm/remove.c:337
#, c-format
-msgid "removing database entry '%s'"
-msgstr "removing database entry '%s'"
+msgid "could not remove database entry %s-%s\n"
+msgstr "could not remove database entry %s-%s\n"
-#: lib/libalpm/remove.c:339
+#: lib/libalpm/remove.c:342
#, c-format
-msgid "could not remove database entry %s-%s"
-msgstr "could not remove database entry %s-%s"
+msgid "could not remove entry '%s' from cache\n"
+msgstr "could not remove entry '%s' from cache\n"
-#: lib/libalpm/remove.c:344
+#: lib/libalpm/server.c:56
#, c-format
-msgid "could not remove entry '%s' from cache"
-msgstr "could not remove entry '%s' from cache"
+msgid "url '%s' is invalid, ignoring\n"
+msgstr "URL '%s' is invalid, ignoring\n"
-#: lib/libalpm/sha1.c:397
-#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr "sha1: %s can't be opened\n"
-
-#: lib/libalpm/sha1.c:412
-#, c-format
-msgid "sha1(%s) = %s"
-msgstr "sha1(%s) = %s"
-
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
-msgstr "checking for package upgrades"
-
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
-msgstr "%s-%s elected for upgrade (%s => %s)"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
+msgstr "URL scheme not specified, assuming http\n"
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
-msgstr "searching for target in repo '%s'"
+#: lib/libalpm/server.c:241
+msgid "disk"
+msgstr "disk"
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
+#: lib/libalpm/server.c:245
#, c-format
-msgid "target '%s' not found -- looking for provisions"
-msgstr "target '%s' not found -- looking for provisions"
+msgid "failed retrieving file '%s' from %s : %s\n"
+msgstr "failed retrieving file '%s' from %s : %s\n"
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr "found '%s' as a provision for '%s'"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
+msgstr "cannot resume download, starting over\n"
-#: lib/libalpm/sync.c:290
+#: lib/libalpm/server.c:288
#, c-format
-msgid "repository '%s' not found"
-msgstr "repository '%s' not found"
+msgid "cannot write to file '%s'\n"
+msgstr "cannot write to file '%s'\n"
-#: lib/libalpm/sync.c:331
+#: lib/libalpm/server.c:307
#, c-format
-msgid "%s-%s is up to date -- skipping"
-msgstr "%s-%s is up to date -- skipping"
+msgid "error downloading '%s': %s\n"
+msgstr "error downloading '%s': %s\n"
-#: lib/libalpm/sync.c:354
+#: lib/libalpm/server.c:319
#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr "adding target '%s' to the transaction set"
+msgid "error writing to file '%s': %s\n"
+msgstr "error writing to file '%s': %s\n"
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr "resolving target's dependencies"
-
-#: lib/libalpm/sync.c:422
+#: lib/libalpm/server.c:387
#, c-format
-msgid "adding package %s-%s to the transaction targets"
-msgstr "adding package %s-%s to the transaction targets"
+msgid "could not chdir to %s\n"
+msgstr "could not chdir to %s\n"
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
-msgstr "looking for unresolvable dependencies"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
+msgstr "running XferCommand: fork failed!\n"
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "package '%s' conflicts with '%s'"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
+msgstr "URL does not contain a file for download\n"
-#: lib/libalpm/sync.c:516
+#: lib/libalpm/server.c:458
#, c-format
-msgid "'%s' not found in transaction set -- skipping"
-msgstr "'%s' not found in transaction set -- skipping"
+msgid "failed to download %s\n"
+msgstr "failed to download %s\n"
-#: lib/libalpm/sync.c:527
+#: lib/libalpm/sync.c:135
#, c-format
-msgid "package '%s' provides its own conflict"
-msgstr "package '%s' provides its own conflict"
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
+msgstr "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
+#: lib/libalpm/sync.c:250
#, c-format
-msgid "'%s' is in the target list -- keeping it"
-msgstr "'%s' is in the target list -- keeping it"
+msgid "%s: ignoring package upgrade (%s => %s)\n"
+msgstr "%s: ignoring package upgrade (%s => %s)\n"
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
+#: lib/libalpm/sync.c:320
#, c-format
-msgid "removing '%s' from target list"
-msgstr "removing '%s' from target list"
+msgid "repository '%s' not found\n"
+msgstr "repository '%s' not found\n"
-#: lib/libalpm/sync.c:576
-#, c-format
-msgid "resolving package '%s' conflict"
-msgstr "resolving package '%s' conflict"
-
-#: lib/libalpm/sync.c:599
-#, c-format
-msgid "electing '%s' for removal"
-msgstr "electing '%s' for removal"
-
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
-msgstr "unresolvable package conflicts detected"
-
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr "checking dependencies of packages designated for removal"
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr "something has gone horribly wrong"
-
-#: lib/libalpm/sync.c:712
+#: lib/libalpm/sync.c:354
#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
-msgstr "found '%s' as a provision for '%s' -- conflict aborted"
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "%s-%s is up to date -- skipping\n"
-#: lib/libalpm/sync.c:808
+#: lib/libalpm/sync.c:358
#, c-format
-msgid "%s is already in the cache\n"
-msgstr "%s is already in the cache\n"
+msgid "%s-%s is up to date -- reinstalling\n"
+msgstr "%s-%s is up to date -- reinstalling\n"
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
-msgstr "no %s cache exists, creating...\n"
+#: lib/libalpm/sync.c:613
+#: lib/libalpm/sync.c:618
+msgid "unresolvable package conflicts detected\n"
+msgstr "unresolvable package conflicts detected\n"
-#: lib/libalpm/sync.c:820
+#: lib/libalpm/sync.c:628
#, c-format
-msgid "warning: no %s cache exists, creating..."
-msgstr "warning: no %s cache exists, creating..."
+msgid "malloc failure: could not allocate %zd bytes\n"
+msgstr "malloc failure: could not allocate %zd bytes\n"
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr "couldn't create package cache, using /tmp instead\n"
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr "warning: couldn't create package cache, using /tmp instead"
-
-#: lib/libalpm/sync.c:833
-#, c-format
-msgid "failed to retrieve some files from %s\n"
-msgstr "failed to retrieve some files from %s\n"
-
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
-msgstr "can't get md5 or sha1 checksum for package %s\n"
-
-#: lib/libalpm/sync.c:894
#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
+msgid "command: %s\n"
+msgstr "command: %s\n"
+#: lib/libalpm/sync.c:888
#: lib/libalpm/sync.c:896
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
-msgstr "could not create removal transaction"
-
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
-msgstr "could not initialise the removal transaction"
-
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr "removing conflicting and to-be-replaced packages"
+msgid "can't get md5 checksum for file %s\n"
+msgstr "can't get md5 checksum for file %s\n"
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
-msgstr "could not prepare removal transaction"
-
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
-msgstr "could not commit removal transaction"
-
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr "installing packages"
-
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
-msgstr "could not create transaction"
-
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
-msgstr "could not initialise transaction"
-
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
-msgstr "could not prepare transaction"
-
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
-msgstr "updating database for replaced packages' dependencies"
-
-#: lib/libalpm/sync.c:1030
+#: lib/libalpm/sync.c:910
#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr "could not update requiredby for database entry %s-%s"
+msgid "file %s was corrupted (bad MD5 checksum)\n"
+msgstr "file %s was corrupted (bad MD5 checksum)\n"
-#: lib/libalpm/sync.c:1039
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "could not update new database entry %s-%s"
-msgstr "could not update new database entry %s-%s"
+msgid "failed to retrieve some files from %s\n"
+msgstr "failed to retrieve some files from %s\n"
-#: lib/libalpm/sync.c:1079
-#, c-format
-msgid "found package '%s-%s' in sync"
-msgstr "found package '%s-%s' in sync"
+#: lib/libalpm/sync.c:1137
+msgid "could not create removal transaction\n"
+msgstr "could not create removal transaction\n"
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr "package '%s' not found in sync"
+#: lib/libalpm/sync.c:1143
+msgid "could not initialize the removal transaction\n"
+msgstr "could not initialise the removal transaction\n"
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr "updating dependency packages 'requiredby' fields for %s-%s"
+#: lib/libalpm/sync.c:1165
+msgid "could not prepare removal transaction\n"
+msgstr "could not prepare removal transaction\n"
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
-msgstr "package has no dependencies, no other packages to update"
+#: lib/libalpm/sync.c:1171
+msgid "could not commit removal transaction\n"
+msgstr "could not commit removal transaction\n"
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr "updating 'requiredby' field for package '%s'"
-
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
-#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
-msgstr "could not update 'requiredby' database entry %s-%s"
+#: lib/libalpm/sync.c:1182
+msgid "could not create transaction\n"
+msgstr "could not create transaction\n"
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr "could not find dependency '%s'"
+#: lib/libalpm/sync.c:1187
+msgid "could not initialize transaction\n"
+msgstr "could not initialise transaction\n"
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
-msgstr "failed to make path '%s' : %s"
+#: lib/libalpm/sync.c:1214
+msgid "could not prepare transaction\n"
+msgstr "could not prepare transaction\n"
-#: lib/libalpm/util.c:280
-#, c-format
-msgid "could not open %s: %s\n"
-msgstr "could not open %s: %s\n"
+#: lib/libalpm/sync.c:1219
+msgid "could not commit transaction\n"
+msgstr "could not commit transaction\n"
-#: lib/libalpm/util.c:293
+#: lib/libalpm/trans.c:214
#, c-format
-msgid "could not extract %s: %s\n"
-msgstr "could not extract %s: %s\n"
+msgid "could not remove lock file %s\n"
+msgstr "could not remove lock file %s\n"
-#: lib/libalpm/util.c:350
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "logaction called: %s"
-msgstr "logaction called: %s"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
+msgstr "No /bin/sh in root dir (%s), aborting scriptlet\n"
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
-msgstr "could not create temp directory"
+#: lib/libalpm/trans.c:494
+msgid "could not create temp directory\n"
+msgstr "could not create temp directory\n"
-#: lib/libalpm/util.c:472
+#: lib/libalpm/trans.c:536
#, c-format
-msgid "could not change directory to %s (%s)"
-msgstr "could not change directory to %s (%s)"
+msgid "could not change directory to %s (%s)\n"
+msgstr "could not change directory to %s (%s)\n"
-#: lib/libalpm/util.c:476
+#: lib/libalpm/trans.c:554
#, c-format
-msgid "executing %s script..."
-msgstr "executing %s script..."
+msgid "could not fork a new process (%s)\n"
+msgstr "could not fork a new process (%s)\n"
-#: lib/libalpm/util.c:489
+#: lib/libalpm/trans.c:564
#, c-format
-msgid "could not fork a new process (%s)"
-msgstr "could not fork a new process (%s)"
+msgid "could not change the root directory (%s)\n"
+msgstr "could not change the root directory (%s)\n"
-#: lib/libalpm/util.c:496
+#: lib/libalpm/trans.c:569
#, c-format
-msgid "chrooting in %s"
-msgstr "chrooting in %s"
+msgid "could not change directory to / (%s)\n"
+msgstr "could not change directory to / (%s)\n"
-#: lib/libalpm/util.c:498
+#: lib/libalpm/trans.c:578
#, c-format
-msgid "could not change the root directory (%s)"
-msgstr "could not change the root directory (%s)"
+msgid "call to popen failed (%s)"
+msgstr "call to popen failed (%s)"
-#: lib/libalpm/util.c:502
+#: lib/libalpm/trans.c:597
#, c-format
-msgid "could not change directory to / (%s)"
-msgstr "could not change directory to / (%s)"
+msgid "call to waitpid failed (%s)\n"
+msgstr "call to waitpid failed (%s)\n"
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
-msgstr "executing \"%s\""
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
+msgstr "scriptlet failed to execute correctly\n"
-#: lib/libalpm/util.c:509
+#: lib/libalpm/trans.c:615
#, c-format
-msgid "call to popen failed (%s)"
-msgstr "call to popen failed (%s)"
+msgid "could not remove tmpdir %s\n"
+msgstr "could not remove tmpdir %s\n"
-#: lib/libalpm/util.c:541
+#: lib/libalpm/util.c:204
#, c-format
-msgid "call to waitpid failed (%s)"
-msgstr "call to waitpid failed (%s)"
+msgid "failed to make path '%s' : %s\n"
+msgstr "failed to make path '%s' : %s\n"
-#: lib/libalpm/util.c:550
+#: lib/libalpm/util.c:389
#, c-format
-msgid "could not remove tmpdir %s"
-msgstr "could not remove tmpdir %s"
+msgid "could not open %s: %s\n"
+msgstr "could not open %s: %s\n"
-#: lib/libalpm/util.c:568
+#: lib/libalpm/util.c:573
#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr ""
+msgid "no %s cache exists, creating...\n"
+msgstr "no %s cache exists, creating...\n"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
-msgstr "check_freespace: total pkg size: %lld, disk space: %lld"
+#: lib/libalpm/util.c:593
+msgid "couldn't create package cache, using /tmp instead\n"
+msgstr "couldn't create package cache, using /tmp instead\n"
-#: lib/libalpm/versioncmp.c:279
-#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr "depcmp: %s-%s %s %s-%s => %s"
+#: lib/libalpm/util.c:643
+#, c-format
+msgid "md5: %s can't be opened\n"
+msgstr "md5: %s can't be opened\n"
+
+#: lib/libalpm/util.c:645
+#, c-format
+msgid "md5: %s can't be read\n"
+msgstr "md5: %s can't be read\n"
+
+#~ msgid "please remove '%s' first, using -Rd\n"
+#~ msgstr "please remove '%s' first, using -Rd\n"
+#~ msgid "cannot resolve dependencies for \"%s\"\n"
+#~ msgstr "cannot resolve dependencies for \"%s\"\n"
+#~ msgid "could not update requiredby for database entry %s-%s\n"
+#~ msgstr "could not update requiredby for database entry %s-%s\n"
+#~ msgid "could not update new database entry %s-%s\n"
+#~ msgstr "could not update new database entry %s-%s\n"
+#~ msgid "could not update 'requiredby' database entry %s-%s\n"
+#~ msgstr "could not update 'requiredby' database entry %s-%s\n"
+#~ msgid "could not extract %s (%s)"
+#~ msgstr "could not extract %s (%s)"
+#~ msgid "could not update provision '%s' from '%s'"
+#~ msgstr "could not update provision '%s' from '%s'"
+
+#, fuzzy
+#~ msgid "%s: description file is missing"
+#~ msgstr "%s: syntax error in description file line %d"
+#~ msgid "malloc failed: could not allocate %d bytes"
+#~ msgstr "malloc failed: could not allocate %d bytes"
+#~ msgid ""
+#~ "cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+#~ msgstr ""
+#~ "cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+#~ msgid "cannot canonicalize specified root path '%s'"
+#~ msgstr "cannot canonicalise specified root path '%s'"
+#~ msgid "could not get sha1sum for package %s-%s"
+#~ msgstr "could not get sha1sum for package %s-%s"
+#~ msgid "sha1sums do not match for package %s-%s"
+#~ msgstr "sha1sums do not match for package %s-%s"
+#~ msgid "cannot remove file %s: %s"
+#~ msgstr "cannot remove file %s: %s"
+#~ msgid "sha1: %s can't be opened\n"
+#~ msgstr "sha1: %s can't be opened\n"
+#~ msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
+#~ msgstr "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-#: lib/libalpm/versioncmp.c:284
-#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr "depcmp: %s-%s %s %s => %s"
diff --git a/lib/libalpm/po/es.po b/lib/libalpm/po/es.po
index 60acc003..10cd8329 100644
--- a/lib/libalpm/po/es.po
+++ b/lib/libalpm/po/es.po
@@ -1,16 +1,9 @@
-# translation of es.fix.po to
-# Spanish translation for libalpm package.
-# Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>
-# This file is distributed under the same license as the Pacman package manager package.
-#
-# Juan Pablo González Tognarelli <lord_jotape@yahoo.com.ar>, 2007.
-# Juan Pablo González Tognarelli <jotapesan@gmail.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: libalpm\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
-"PO-Revision-Date: 2007-04-29 11:12-0300\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
+"PO-Revision-Date: 2007-04-20 21:19-0300\n"
"Last-Translator: Juan Pablo González Tognarelli <lord_jotape@yahoo.com.ar>\n"
"Language-Team: juan pablo gonzález tognarelli <lord_jotape@yahoo.com.ar>\n"
"MIME-Version: 1.0\n"
@@ -20,1513 +13,729 @@ msgstr ""
"X-Poedit-Country: CHILE\n"
"X-Poedit-SourceCharset: utf-8\n"
-#: lib/libalpm/add.c:77
-#, c-format
-msgid "loading target '%s'"
-msgstr "cargando el archivo '%s'"
-
-#: lib/libalpm/add.c:122
-#, c-format
-msgid "replacing older version %s-%s by %s in target list"
+#: lib/libalpm/add.c:88
+#, fuzzy, c-format
+msgid "replacing older version %s-%s by %s in target list\n"
msgstr "reemplazando la versión antigua %s-%s por %s en la lista de objetivos"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
+#: lib/libalpm/add.c:97
+#, fuzzy, c-format
+msgid "newer version %s-%s is in the target list -- skipping\n"
msgstr ""
"una nueva versión %s-%s esta en la lista de objetivos list -- saltándola"
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "leyendo los metadatos '%s'"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "buscando por dependencias no satisfechas"
-
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "buscando por conflictos"
-
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
-msgstr "el reemplazo de paquetes con -A y -U aún no esta soportado"
-
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "por favor quitar '%s' primero, usando -Rd"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "ordenando por dependencias"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "limpiando"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "buscando por conflictos de archivos"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
+msgstr ""
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "actualizando el paquete %s-%s"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
+msgstr ""
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "agregando el paquete %s-%s"
+#: lib/libalpm/add.c:172
+#, fuzzy
+msgid "replacing packages with -A and -U is not supported yet\n"
+msgstr "el reemplazo de paqutes con -A y -U aún no esta soportado"
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "quitando el paquete antiguo primero (%s-%s)"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
+msgstr ""
-#: lib/libalpm/add.c:411
+#: lib/libalpm/add.c:365
#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr "agregando %s al arreglo NoUpgrade temporalmente"
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "descomprimiendo archivos"
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "no se pudo obtener el directorio de trabajo actual"
+msgid ""
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
+msgstr ""
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
+#: lib/libalpm/add.c:392
#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s está en NoExtract. Saltando la extracción"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr ""
-#: lib/libalpm/add.c:508
+#: lib/libalpm/add.c:399
#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
-msgstr "%s esta en la extracción trans->skip_add, skipping"
+msgid "extract: not overwriting dir with file %s\n"
+msgstr ""
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
+#, fuzzy, c-format
+msgid "could not extract %s (%s)\n"
msgstr "no se pudo extraer %s (%s)"
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "verificando los hash md5 para %s"
-
-#: lib/libalpm/add.c:600
-#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "verificando los hash SHA1 para %s"
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr "actual: %s"
-
-#: lib/libalpm/add.c:603
-#, c-format
-msgid "new: %s"
-msgstr "nuevo: %s"
-
-#: lib/libalpm/add.c:604
-#, c-format
-msgid "original: %s"
-msgstr "original: %s"
-
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
+#: lib/libalpm/add.c:505
+#, fuzzy, c-format
+msgid "could not rename %s (%s)\n"
msgstr "no se pudo renombrar %s (%s)"
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "error: no se pudo renombrar %s (%s)"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
+#, fuzzy, c-format
+msgid "could not copy tempfile to %s (%s)\n"
msgstr "no se pudo copiar el archivo temporal a %s (%s)"
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "error: no se pudo copiar el archivo temporal a %s (%s)"
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
+#, fuzzy, c-format
+msgid "%s saved as %s\n"
msgstr "%s guardado como %s"
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "advertencia: %s guardado como %s"
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "acción: instalando nuevo archivo: %s"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "acción: dejando el archivo existente en su lugar"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-"action:manteniendo el archivo actual e instalando un no nuevo con postfijo ."
-"pacnew"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
+#: lib/libalpm/add.c:556
+#, fuzzy, c-format
+msgid "could not install %s as %s: %s\n"
msgstr "no se pudo instalar %s como %s: %s"
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "error: no se pudo instalar %s como %s: %s"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
+#: lib/libalpm/add.c:559
+#, fuzzy, c-format
+msgid "%s installed as %s\n"
msgstr "%s instalado como %s"
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "advertencia: %s instalado como %s"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s esta en en los no actualizables -- saltando"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
+#: lib/libalpm/add.c:576
+#, fuzzy, c-format
+msgid "extracting %s as %s.pacnew\n"
msgstr "descomprimiendo %s como %s.pacnew"
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "advertencia: descomprimiendo %s como %s.pacnew"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "descomprimiendo %s"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "error: no se pudo descomprimir %s (%s)"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr "agregando la entrada de respaldo para %s"
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+#, fuzzy
+msgid "could not get current working directory\n"
+msgstr "no se pudo obtener el directorio de trabajo actual"
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
+#: lib/libalpm/add.c:765
+#, fuzzy, c-format
+msgid "problem occurred while upgrading %s\n"
msgstr "ocurrieron errores mientras %s %s"
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "actualizando"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "instalando"
-
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr "el provisional '%s' ha sido eliminado desde el paquete %s (%s => %s)"
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr "actualizando '%s' debido a un cambio de provisiones (%s)"
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr "no se pudo actualizar la provisión '%s' desde '%s'"
-
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "actualizando la base de datos"
-
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "agregando a la base de datos '%s'"
+#: lib/libalpm/add.c:770
+#, fuzzy, c-format
+msgid "problem occurred while installing %s\n"
+msgstr "ocurrieron errores mientras %s %s"
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
+#: lib/libalpm/add.c:785
+#, fuzzy, c-format
+msgid "could not update database entry %s-%s\n"
msgstr "no se pudo actualizar en la base de datos la entrada %s-%s"
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
+#: lib/libalpm/add.c:793
+#, fuzzy, c-format
+msgid "could not add entry '%s' in cache\n"
msgstr "no se pudo agregar '%s' en la cache"
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "ejecutando \"ldconfig -r %s\""
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr "quitando la base de datos %s, %d quedando..."
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr "desmarcando la base de datos '%s'"
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "cerrando la base de datos '%s'"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-"agregando un nuevo servidor a la base de datos '%s': protocolo '%s', "
-"servidor '%s', ruta '%s'"
-
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "lista de servidores se ha barrido para '%s'"
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr ""
-"fallo al obtener la última fecha de actualización para %s (no es un gran "
-"problema)"
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "fallo al sincronizar la base de datos: %s [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr "sync: nuevo mtime para %s: %s"
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr "barriendo la base de datos %s%s"
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr "no se pudo quitar la entrada en la base de datos %s%s"
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "no se pudo obtener la verificación sha1 para %s-%s"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "verificando sha1 para el paquete %s-%s coincide"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "la verificación sha1 no coincide para %s-%s"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "no se pudo obtener la verificación md5 para %s-%s"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "la verificación md5 para el paquete %s-%s concuerda"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "la verificación md5 para el paquete %s-%s no concuerda"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "no se pudo quitar el archivo de bloqueo %s"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "advertencia: no se pudo eliminar el archivo de bloqueo %s"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "config: nueva sección '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr "config: nopassiveftp"
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr "config: usesyslog"
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr "config: chomp"
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr "config: usecolor"
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr "config: incluyendo %s"
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr "config: noupgrade: %s"
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr "config: noextract: %s"
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr "config: ignorepkg: %s"
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr "config: holdpkg: %s"
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr "config: dbpath: %s"
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr "config: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1044
+#: lib/libalpm/be_files.c:223
#, fuzzy, c-format
-msgid "config: rootdir: %s"
-msgstr "config: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr "config: logfile: %s"
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr "config: xfercommand: %s"
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr "config: upgradedelay: %d"
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "verificando si hay reemplazo de paquetes"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "verificando el reemplazo '%s' para el paquete '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr ""
-"%s-%s: ignorando la actualización del paquete(para ser reemplazado por %s-%s)"
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s escogido para actualizar (para ser reemplazado por %s-%s)"
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr "'%s' not encontrado en la base -- saltando"
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr "'%s' está ya seleccionado para quitar -- saltando"
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr "%s seleccionado para actualizar (%s => %s)"
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "desempaquetando la base de datos '%s'"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr "abriendo la base de datos desde la ruta '%s'"
-
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
-msgstr "db scan no pudo encontrar el paquete: %s"
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
+msgid "invalid name for database entry '%s'\n"
msgstr "nombre invalido para la entrada de la base de datos '%s'"
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr "entrada de paquete invalida a _alpm_db_read, saltando"
-
-#: lib/libalpm/be_files.c:226
-#, c-format
-msgid ""
-"request to read database info for a file-based package '%s', skipping..."
-msgstr ""
-"petición para leer la información de la base para el paquete basado en "
-"archivo '%s', saltando..."
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
+#: lib/libalpm/be_files.c:275
+#, fuzzy, c-format
+msgid "loading package data for %s : level=%d\n"
msgstr "cargando la información del paquete para %s : nivel=%d"
-#: lib/libalpm/be_files.c:247
-#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr "no se pudo encontrar '%s-%s' en la base '%s'"
-
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
+#, fuzzy, c-format
+msgid "could not open file %s: %s\n"
msgstr "no se pudo abrir el archivo %s: %s"
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr "escribiendo %s-%s, información DESC en la base"
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr "escribiendo %s-%s, información FILES en la base"
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr "escribiendo %s-%s, información DEPENDS en la base"
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr "cargando la cache de paquetes para el repositorio '%s'"
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
+#: lib/libalpm/cache.c:62
+#, fuzzy, c-format
+msgid "adding '%s' to package cache for db '%s'\n"
msgstr "agregando '%s' a la cache de paquetes para la base '%s'"
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr "liberando la cache de paquetes para el repositorio '%s'"
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr "error: la cache de paquetes es nula para la base de datos '%s'"
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr "agregando '%s' en la cache '%s'"
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr "quitando '%s' de la cache '%s'"
-
-#: lib/libalpm/cache.c:156
-#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr "no se pudo quitar '%s' de la cache '%s': no encontrado"
-
-#: lib/libalpm/cache.c:178
-#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr ""
-"error: se produjo un fallo al obtener '%s' desde la cache de paquetes \"NULL"
-"\""
-
-#: lib/libalpm/cache.c:201
-#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr "cargando la cache de grupo para el repositorio '%s'"
-
-#: lib/libalpm/conflict.c:69
-#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr " se ha encontrado un conflicto '%s' : paquete '%s'"
-
-#: lib/libalpm/conflict.c:78
-#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr " se ha encontrado un conflicto '%s' : paquete '%s' provee '%s'"
-
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
-#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr "el paquete '%s' posee conflictos con si mismo- error del paquete"
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr "checkconflicts: el objetivo '%s' vs la base de datos"
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr "checkconflicts: el objetivo '%s' vs todos los objetivos"
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr "checkconflicts: la base de datos vs el objetivo '%s'"
-
-#: lib/libalpm/conflict.c:201
-#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr ""
-"'%s' esta también en la lista de objetivos, usando NEW provoca conflictos"
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr "\tCONFLICTS:: %s posee conflictos con %s"
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr "falla en malloc: no se pudo alocar %d bytes"
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr "malloc falló: no se pudo alocar %d bytes"
+#: lib/libalpm/db.c:285
+#, fuzzy, c-format
+msgid "could not remove database entry %s%s\n"
+msgstr "no se pudo quitar la entrada en la base de datos %s%s"
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
+#: lib/libalpm/db.c:553
+#, fuzzy
+msgid "attempt to re-register the 'local' DB\n"
msgstr "intento para re-registrar la base de datos 'local'"
-#: lib/libalpm/db.c:175
-#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr "intento para re-registrar la base de datos '%s', usando la existente"
-
-#: lib/libalpm/db.c:181
-#, c-format
-msgid "registering database '%s'"
-msgstr "registrando la base de datos '%s'"
-
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr "el directorio de base de datos '%s' no existe, creando"
-
-#: lib/libalpm/db.c:197
-#, c-format
-msgid "opening database '%s'"
-msgstr "abriendo la base de datos '%s'"
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr "empezando a ordenar dependencias"
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr "posible ciclo de dependencias detectado"
-
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr "ordenamiento de dependencias finalizado"
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr "se ha encontrado un paquete nulo en la lista de paquetes"
-
-#: lib/libalpm/deps.c:230
-#, c-format
-msgid "cannot find package installed '%s'"
-msgstr "no se pudo encontrar el paquete instalado '%s'"
-
-#: lib/libalpm/deps.c:261
-#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr "checkdeps: la dependencia '%s' ha sido movida desde '%s' a '%s'"
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+#, fuzzy
+msgid "database path is undefined\n"
+msgstr "base de datos no inicializada"
-#: lib/libalpm/deps.c:280
-#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
-msgstr ""
-"checkdeps: la dependencia '%s' es satisfecha por el paquete instalado '%s'"
+#: lib/libalpm/deps.c:173
+#, fuzzy
+msgid "dependency cycle detected:\n"
+msgstr "ciclo de dependencias detectado: %s"
-#: lib/libalpm/deps.c:289
+#: lib/libalpm/deps.c:175
#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-"checkdeps: El paquete actualizado '%s' no satisfará una dependencia de'%s'"
-#: lib/libalpm/deps.c:359
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr "dependencia faltante '%s' para el paquete '%s'"
-
-#: lib/libalpm/deps.c:409
-#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr "checkdeps: encontrado %s como lo requería %s"
-
-#: lib/libalpm/deps.c:485
-#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr "excluyendo %s -- instalado explícitamente"
-
-#: lib/libalpm/deps.c:532
-#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
-msgstr "no se pudo encontrar el paquete \"%s\" o algo que lo provea!"
-
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
-#, c-format
-msgid "adding '%s' to the targets"
-msgstr "agregando '%s' a los objetivos"
-
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
-msgstr "empezando a resolver dependencias"
-
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
-msgstr "%s provee la dependencia %s -- saltando"
-
-#: lib/libalpm/deps.c:630
-#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-"no se pudo resolver dependecias para \"%s\" (\"%s\" no está en las listas de "
-"paquetes)"
-#: lib/libalpm/deps.c:647
-#, c-format
-msgid "dependency %s is already in the target list -- skipping"
-msgstr "la dependencia %s ya está en la lista de objetivos -- saltando"
-
-#: lib/libalpm/deps.c:667
-#, c-format
-msgid "pulling dependency %s (needed by %s)"
-msgstr "trayendo la dependencia %s (necesitada por %s)"
-
-#: lib/libalpm/deps.c:671
-#, c-format
-msgid "cannot resolve dependencies for \"%s\""
+#: lib/libalpm/deps.c:573
+#, fuzzy, c-format
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "no se pudo resolver las dependencias para \"%s\""
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr "ciclo de dependencias detectado: %s"
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr "se ha finalizado la resolución de dependencias"
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr "no hay memoria!"
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr "error de sistema inesperado"
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr "privilegios insuficientes"
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr "no se pudo encontrar o leer el archivo"
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+#, fuzzy
+msgid "could not find or read directory"
+msgstr "no se pudo encontrar o leer el archivo"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr "argumento erroneo o núlo"
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr "librería no inicializada"
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr "la librería ya fue inicializada"
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr "no se pudo bloquear la base de datos"
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "no se pudo abrir la base de datos"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "no se pudo crear la base de datos"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "base de datos no inicializada"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "base de datos ya registrada"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "no se pudo encontrar la base de datos"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "no se pudo actualizar la base de datos"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "no se pudo quitar la entrada de la base de datos"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr "dirección inválida para el servidor"
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr "no se pudo fijar el parámetro"
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr "la operación ya se inicializó"
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr "operación no inicializada"
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr "objetivo duplicado"
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr "operación no lista"
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr "operación abortada"
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr "la operación no es compatible con el tipo de transacción"
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr "no se pudo hacer la transacción"
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr "no se pudo descargar todos los archivos"
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr "no se pudo encontrar o leer el paquete"
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr "paquete invalido o corrupto"
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr "no se pudo abrir el archivo de paquetes"
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr "no se pudo cargar la información del paquete"
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr "el paquete ya está instalado"
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr "el paquete no está instalado o es una versión menor"
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr "no se pudo quitar todos los archivos del paquete"
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "el nombre del paquete no es válido"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr "paquete corrupto"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr "no existe el repositorio"
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+#, fuzzy
+msgid "corrupted delta"
+msgstr "paquete corrupto"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr ""
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "grupo no encontrado"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr "no se pudieron satisfacer las dependencias"
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr "dependencias en conflicto"
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr "archivos en conflicto"
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr "el usuario abortó la operación"
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "error interno"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr "error de libarchive"
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "no hay suficiente espacio en el disco"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr "no confirmado"
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr "nombre de sección de configuración erróneo"
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr ""
-"'local' esta reservado y no puede ser utilizado como nombre de repositorio"
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr "error de sintaxis en el archivo de configuración"
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr "todas las directivas deben pertenecer a una sección"
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "expresión regular inválida"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr "falló la conexión con el host remoto"
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "error inesperado"
-# canonicalize.. no supe traducirla bien
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr "no se pudo obtener el la ruta canonica de la raiz especificada '%s'"
-
-#: lib/libalpm/handle.c:175
-#, c-format
-msgid "option 'root' = %s"
-msgstr "opción 'root' = %s"
-
-#: lib/libalpm/handle.c:195
-#, c-format
-msgid "option 'dbpath' = %s"
-msgstr "opción 'dbpath' = %s"
-
-#: lib/libalpm/handle.c:211
-#, c-format
-msgid "option 'cachedir' = %s"
-msgstr "opción 'cachedir' = %s"
-
-#: lib/libalpm/md5driver.c:56
-#, c-format
-msgid "%s can't be opened\n"
-msgstr "%s no puede ser abierto\n"
-
-#: lib/libalpm/md5driver.c:74
-#, c-format
-msgid "md5(%s) = %s"
-msgstr "md5(%s) = %s"
+#: lib/libalpm/package.c:124
+#, fuzzy, c-format
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "no se pudo obtener la verificación md5 para %s-%s"
-#: lib/libalpm/package.c:147
-#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr "%s-%s: ignorando la actualización del paquete (%s)"
+#: lib/libalpm/package.c:133
+#, fuzzy, c-format
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "la verificación md5 para el paquete %s-%s no concuerda"
-#: lib/libalpm/package.c:158
-#, c-format
-msgid "%s: forcing upgrade to version %s"
+#: lib/libalpm/package.c:737
+#, fuzzy, c-format
+msgid "%s: forcing upgrade to version %s\n"
msgstr "%s: forzando la actualización a la versión %s"
-#: lib/libalpm/package.c:163
-#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
+#: lib/libalpm/package.c:742
+#, fuzzy, c-format
+msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%s: local (%s) es más nuevo que %s (%s)"
-#: lib/libalpm/package.c:171
-#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
+#: lib/libalpm/package.c:750
+#, fuzzy, c-format
+msgid "%s-%s: delaying upgrade of package (%s)\n"
msgstr "%s-%s: aplazando la actualización del paquete (%s)"
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
-#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr "%s: error de sintaxis en la linea de descripción de archivos %d"
-
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
+#: lib/libalpm/package.c:931
+#, fuzzy, c-format
+msgid "could not parse package description file in %s\n"
msgstr "no se pudo interpretar el archivo de descripción"
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
+#: lib/libalpm/package.c:936
+#, fuzzy, c-format
+msgid "missing package name in %s\n"
msgstr "nombre de paquete perdido en %s"
-#: lib/libalpm/package.c:363
-#, c-format
-msgid "missing package version in %s"
+#: lib/libalpm/package.c:940
+#, fuzzy, c-format
+msgid "missing package version in %s\n"
msgstr "versión de paquete perdida en %s"
-#: lib/libalpm/package.c:398
-#, c-format
-msgid "could not remove tempfile %s"
+#: lib/libalpm/package.c:970
+#, fuzzy, c-format
+msgid "could not remove tempfile %s\n"
msgstr "no se pudo quitar el archivo temporal %s"
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
+#, fuzzy, c-format
+msgid "error while reading package %s: %s\n"
msgstr "error mientras se leía el paquete : %s"
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
-msgstr "faltan los metadatos del paquete "
+#: lib/libalpm/package.c:1005
+#, fuzzy, c-format
+msgid "missing package metadata in %s\n"
+msgstr "falta la metadata del paquete "
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
+#: lib/libalpm/package.c:1012
+#, fuzzy, c-format
+msgid "missing package filelist in %s, generating one\n"
msgstr "falta la lita de paquetes en %s. generando una"
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr "agregando '%s' en el campo requiredby para '%s'"
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr "agregando '%s' en el campo requiredby para '%s' (provee %s)"
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr "no se pudo encontrar %s en la base de datos"
-
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
-msgstr "agregando %s en la lista de objetivos"
-
#: lib/libalpm/remove.c:121
-#, c-format
-msgid "pulling %s in the targets list"
-msgstr "poniendo %s en la lista de objetivos"
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
+#, fuzzy, c-format
+msgid "could not find %s in database -- skipping\n"
msgstr "no se pudo encontrar %s en la base de datos -- saltando"
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr "buscando dependencias a eliminar"
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
+#, fuzzy, c-format
+msgid "cannot remove file '%s': %s\n"
msgstr "no se pudo quitar el archivo '%s': %s"
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr ""
-"saltando la eliminación de '%s' debido a la condición de no actualización"
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "el archivo %s no existe"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "manteniendo el directorio %s"
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "quitando el directorio %s"
-
-#: lib/libalpm/remove.c:236
-#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr "%s esta en trans->skip_remove, saltando la eliminación"
-
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
-msgstr "la transacción esta definida como NOSAVE, no se respaldará '%s'"
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr "desvinculando %s"
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr "no se pudo quitar el archivo %s: %s"
-
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr "quitando el paquete %s-%s"
-
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
-msgstr "no se quitará el paquete '%s', no se puede quitar todos los archivos"
-
-#: lib/libalpm/remove.c:316
-#, c-format
-msgid "removing %d files"
-msgstr "quitando %d archivos"
-
#: lib/libalpm/remove.c:337
-#, c-format
-msgid "removing database entry '%s'"
-msgstr "quitando de la base de datos '%s'"
-
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
+#, fuzzy, c-format
+msgid "could not remove database entry %s-%s\n"
msgstr "no se pudo quitar de la base de datos %s-%s"
-#: lib/libalpm/remove.c:344
-#, c-format
-msgid "could not remove entry '%s' from cache"
+#: lib/libalpm/remove.c:342
+#, fuzzy, c-format
+msgid "could not remove entry '%s' from cache\n"
msgstr "no se pudo quitar la entrada '%s' de la cache"
-#: lib/libalpm/sha1.c:397
-#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr "sha1: %s no puede ser abierto\n"
-
-#: lib/libalpm/sha1.c:412
+#: lib/libalpm/server.c:56
#, c-format
-msgid "sha1(%s) = %s"
-msgstr "sha1(%s) = %s"
-
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
-msgstr "verificando actualizaciones de paquetes"
-
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
-msgstr "%s-%s seleccionada para actualización (%s => %s)"
+msgid "url '%s' is invalid, ignoring\n"
+msgstr ""
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
-msgstr "buscando el objetivo en el repositorio '%s'"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
+msgstr ""
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
-#, c-format
-msgid "target '%s' not found -- looking for provisions"
-msgstr "'%s' no se encontró -- buscando provisionales"
+#: lib/libalpm/server.c:241
+msgid "disk"
+msgstr ""
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr "encontrado '%s' como provisional para '%s'"
+#: lib/libalpm/server.c:245
+#, fuzzy, c-format
+msgid "failed retrieving file '%s' from %s : %s\n"
+msgstr "fallo al descargar algunos archivos desde %s\n"
-#: lib/libalpm/sync.c:290
-#, c-format
-msgid "repository '%s' not found"
-msgstr "repositorio '%s' no encontrado"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
+msgstr ""
-#: lib/libalpm/sync.c:331
-#, c-format
-msgid "%s-%s is up to date -- skipping"
-msgstr "%s-%s esta al día -- saltando"
+#: lib/libalpm/server.c:288
+#, fuzzy, c-format
+msgid "cannot write to file '%s'\n"
+msgstr "no se pudo quitar el archivo '%s': %s"
-#: lib/libalpm/sync.c:354
-#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr "agregando el objetivo '%s' a la lista de transacciones"
+#: lib/libalpm/server.c:307
+#, fuzzy, c-format
+msgid "error downloading '%s': %s\n"
+msgstr "error mientras se leía el paquete : %s"
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr "resolviendo las dependencias"
+#: lib/libalpm/server.c:319
+#, fuzzy, c-format
+msgid "error writing to file '%s': %s\n"
+msgstr "no se pudo quitar el archivo '%s': %s"
-#: lib/libalpm/sync.c:422
-#, c-format
-msgid "adding package %s-%s to the transaction targets"
-msgstr "agregando el paquete %s-%s como blanco para la transacción"
+#: lib/libalpm/server.c:387
+#, fuzzy, c-format
+msgid "could not chdir to %s\n"
+msgstr "no se pudo cambiar el directorio a / (%s)"
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
-msgstr "buscando dependencias no resueltas"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
+msgstr ""
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "el paquete '%s' posee conflictos con '%s'"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
+msgstr ""
-#: lib/libalpm/sync.c:516
-#, c-format
-msgid "'%s' not found in transaction set -- skipping"
-msgstr "'%s' no se encontró en las transacciones -- saltando"
+#: lib/libalpm/server.c:458
+#, fuzzy, c-format
+msgid "failed to download %s\n"
+msgstr "no se pudo descargar todos los archivos"
-#: lib/libalpm/sync.c:527
-#, c-format
-msgid "package '%s' provides its own conflict"
-msgstr "el paquete '%s' provee su propio conflicto"
+#: lib/libalpm/sync.c:135
+#, fuzzy, c-format
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
+msgstr ""
+"%s-%s: ignorando la actualización del paquete(para ser reemplazado por %s-%s)"
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
-#, c-format
-msgid "'%s' is in the target list -- keeping it"
-msgstr "'%s' esta en la lista de objetivos -- manteniendolo"
+#: lib/libalpm/sync.c:250
+#, fuzzy, c-format
+msgid "%s: ignoring package upgrade (%s => %s)\n"
+msgstr "%s-%s: ignorando la actualización del paquete (%s)"
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
-#, c-format
-msgid "removing '%s' from target list"
-msgstr "quitando '%s' de la lista de objetivos"
+#: lib/libalpm/sync.c:320
+#, fuzzy, c-format
+msgid "repository '%s' not found\n"
+msgstr "repositorio '%s' no encontrado"
-#: lib/libalpm/sync.c:576
-#, c-format
-msgid "resolving package '%s' conflict"
-msgstr "resolviendo el conflicto del paquete '%s'"
+#: lib/libalpm/sync.c:354
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "%s-%s esta al día -- saltando"
-#: lib/libalpm/sync.c:599
-#, c-format
-msgid "electing '%s' for removal"
-msgstr "escogiendo '%s' para quitarlo"
+#: lib/libalpm/sync.c:358
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- reinstalling\n"
+msgstr "%s-%s esta al día -- saltando"
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+#, fuzzy
+msgid "unresolvable package conflicts detected\n"
msgstr "se han detectado paquetes con conflictos no resueltos"
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr "verificando dependencias de paquetes indicados para quitar"
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr "algo ha ido horriblemente mal"
-
-#: lib/libalpm/sync.c:712
-#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
-msgstr "encontrado '%s' como provisional para '%s' -- conflicto abortado"
-
-#: lib/libalpm/sync.c:808
-#, c-format
-msgid "%s is already in the cache\n"
-msgstr "%s ya esta en la cache\n"
-
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
-msgstr "no existe la cache %s, creando...\n"
-
-#: lib/libalpm/sync.c:820
-#, c-format
-msgid "warning: no %s cache exists, creating..."
-msgstr "advertencia: no existe la cache %s. creándola..."
+#: lib/libalpm/sync.c:628
+#, fuzzy, c-format
+msgid "malloc failure: could not allocate %zd bytes\n"
+msgstr "falla en malloc: no se pudo alocar %d bytes"
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr "no se pudo crear la cache de paquetes, usando /tmp en su lugar\n"
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr ""
-"advertencia: no se pudo crear la cache para paquetes. usando /tmp en su lugar"
-
-#: lib/libalpm/sync.c:833
#, c-format
-msgid "failed to retrieve some files from %s\n"
-msgstr "fallo al descargar algunos archivos desde %s\n"
+msgid "command: %s\n"
+msgstr ""
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
+#, fuzzy, c-format
+msgid "can't get md5 checksum for file %s\n"
msgstr "no se pudo verificar md5 o sha1 para el paquete %s\n"
-#: lib/libalpm/sync.c:894
-#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
+#: lib/libalpm/sync.c:910
+#, fuzzy, c-format
+msgid "file %s was corrupted (bad MD5 checksum)\n"
msgstr ""
"el archivo %s estaba corrupto (no coincidió la verificación MD5 o SHA1)\n"
-#: lib/libalpm/sync.c:896
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "el archivo %s esta corrupto (verificación MD5 o SHA1 errónea)\n"
+msgid "failed to retrieve some files from %s\n"
+msgstr "fallo al descargar algunos archivos desde %s\n"
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
+#: lib/libalpm/sync.c:1137
+#, fuzzy
+msgid "could not create removal transaction\n"
msgstr "no se pudo crear la operación de eliminación"
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
+#: lib/libalpm/sync.c:1143
+#, fuzzy
+msgid "could not initialize the removal transaction\n"
msgstr "no se pudo iniciar la operación de eliminación"
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr "quitando paquetes conflictivos y los que serán reemplazados"
-
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
+#: lib/libalpm/sync.c:1165
+#, fuzzy
+msgid "could not prepare removal transaction\n"
msgstr "no se pudo preparar la operación de eliminación"
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
+#: lib/libalpm/sync.c:1171
+#, fuzzy
+msgid "could not commit removal transaction\n"
msgstr "no se pudo asignar la operación de quitado"
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr "instalando paquetes"
-
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
+#: lib/libalpm/sync.c:1182
+#, fuzzy
+msgid "could not create transaction\n"
msgstr "no se pudo crear la operación"
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
+#: lib/libalpm/sync.c:1187
+#, fuzzy
+msgid "could not initialize transaction\n"
msgstr "no se pudo iniciar la operación"
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
+#: lib/libalpm/sync.c:1214
+#, fuzzy
+msgid "could not prepare transaction\n"
msgstr "no se pudo preparar la transacción"
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
-msgstr ""
-"actuando la base de datos para las dependencias de los paquetes reemplazados"
+#: lib/libalpm/sync.c:1219
+#, fuzzy
+msgid "could not commit transaction\n"
+msgstr "no se pudo hacer la transacción"
-#: lib/libalpm/sync.c:1030
-#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr "no se pudo actualizar \"requiredby\" para la entrada %s-%s"
+#: lib/libalpm/trans.c:214
+#, fuzzy, c-format
+msgid "could not remove lock file %s\n"
+msgstr "no se pudo quitar el archivo de bloqueo %s"
-#: lib/libalpm/sync.c:1039
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "could not update new database entry %s-%s"
-msgstr "no se pudo actualizar la nueva entrada a la base de datos %s-%s"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
+msgstr ""
-#: lib/libalpm/sync.c:1079
-#, c-format
-msgid "found package '%s-%s' in sync"
-msgstr "paquete encontrado '%s-%s' en la base de sincronización"
+#: lib/libalpm/trans.c:494
+#, fuzzy
+msgid "could not create temp directory\n"
+msgstr "no se puede crear el directorio temporal "
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr "el paquete '%s' no fue encontrado en la base de sincronización"
+#: lib/libalpm/trans.c:536
+#, fuzzy, c-format
+msgid "could not change directory to %s (%s)\n"
+msgstr "no se pudo cambiar el directorio a %s (%s)"
-# No me agrada mucho esta traducción. Habrá una mejor manera de indicarlo?
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr ""
-"actualizando los campos 'requeridospor' de los paquetes de dependencias "
-"para %s-%s"
+#: lib/libalpm/trans.c:554
+#, fuzzy, c-format
+msgid "could not fork a new process (%s)\n"
+msgstr "no se pudo crear un nuevo proceso (%s)"
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
-msgstr "el paquete no posee dependencias, no hay más paquetes para actualizar"
+#: lib/libalpm/trans.c:564
+#, fuzzy, c-format
+msgid "could not change the root directory (%s)\n"
+msgstr "no se pudo cambiar el directorio raíz (%s)"
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr "actualizando el campo 'requiredby' para '%s'"
+#: lib/libalpm/trans.c:569
+#, fuzzy, c-format
+msgid "could not change directory to / (%s)\n"
+msgstr "no se pudo cambiar el directorio a / (%s)"
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
-#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
-msgstr "no se pudo actualizar \"requiredby\" para la entrada %s-%s"
+#: lib/libalpm/trans.c:578
+#, fuzzy, c-format
+msgid "call to popen failed (%s)"
+msgstr "llamada a waitpid fallida (%s)"
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr "no se pudo encontrar la dependencia '%s'"
+#: lib/libalpm/trans.c:597
+#, fuzzy, c-format
+msgid "call to waitpid failed (%s)\n"
+msgstr "llamada a waitpid fallida (%s)"
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
+msgstr ""
+
+#: lib/libalpm/trans.c:615
+#, fuzzy, c-format
+msgid "could not remove tmpdir %s\n"
+msgstr "no se pudo quitar el directorio temporal %s"
+
+#: lib/libalpm/util.c:204
+#, fuzzy, c-format
+msgid "failed to make path '%s' : %s\n"
msgstr "fallo al crear la ruta '%s' : %s"
-#: lib/libalpm/util.c:280
+#: lib/libalpm/util.c:389
#, c-format
msgid "could not open %s: %s\n"
msgstr "no se pudo abrir %s: %s\n"
-#: lib/libalpm/util.c:293
+#: lib/libalpm/util.c:573
#, c-format
-msgid "could not extract %s: %s\n"
-msgstr "no se pudo extraer %s: %s\n"
+msgid "no %s cache exists, creating...\n"
+msgstr "no existe la cache %s, creando...\n"
-#: lib/libalpm/util.c:350
-#, c-format
-msgid "logaction called: %s"
-msgstr "acción de registro llamada: %s"
+#: lib/libalpm/util.c:593
+#, fuzzy
+msgid "couldn't create package cache, using /tmp instead\n"
+msgstr "no se pudo crear la cache de paquetes, usando /tmp en su lugar\n"
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
-msgstr "no se puede crear el directorio temporal "
+#: lib/libalpm/util.c:643
+#, fuzzy, c-format
+msgid "md5: %s can't be opened\n"
+msgstr "%s no puede ser abierto\n"
-#: lib/libalpm/util.c:472
-#, c-format
-msgid "could not change directory to %s (%s)"
-msgstr "no se pudo cambiar el directorio a %s (%s)"
+#: lib/libalpm/util.c:645
+#, fuzzy, c-format
+msgid "md5: %s can't be read\n"
+msgstr "%s no puede ser abierto\n"
-#: lib/libalpm/util.c:476
-#, c-format
-msgid "executing %s script..."
-msgstr "ejecutando el script %s..."
+#~ msgid "please remove '%s' first, using -Rd"
+#~ msgstr "por favor quitar '%s' primero, usando -Rd"
-#: lib/libalpm/util.c:489
-#, c-format
-msgid "could not fork a new process (%s)"
-msgstr "no se pudo crear un nuevo proceso (%s)"
+#~ msgid "could not extract %s (%s)"
+#~ msgstr "no se pudo extraer %s (%s)"
-#: lib/libalpm/util.c:496
-#, c-format
-msgid "chrooting in %s"
-msgstr "haciendo cambio de raiz en %s"
+#~ msgid "could not update provision '%s' from '%s'"
+#~ msgstr "no se pudo actualizar la provisión '%s' desde '%s'"
-#: lib/libalpm/util.c:498
-#, c-format
-msgid "could not change the root directory (%s)"
-msgstr "no se pudo cambiar el directorio raíz (%s)"
+#, fuzzy
+#~ msgid "%s: description file is missing"
+#~ msgstr "%s: error de sintaxis en la linea de descripción de archivos %d"
-#: lib/libalpm/util.c:502
-#, c-format
-msgid "could not change directory to / (%s)"
-msgstr "no se pudo cambiar el directorio a / (%s)"
+#~ msgid "malloc failed: could not allocate %d bytes"
+#~ msgstr "malloc falló: no se pudo alocar %d bytes"
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
-msgstr "ejecutando \"%s\""
+#~ msgid ""
+#~ "cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+#~ msgstr ""
+#~ "no se pudo resolver dependecias para \"%s\" (\"%s\" no está en las listas "
+#~ "de paquetes)"
-#: lib/libalpm/util.c:509
-#, c-format
-msgid "call to popen failed (%s)"
-msgstr "llamada a popen fallida (%s)"
+# canonicalize.. no supe traducirla bien
+#~ msgid "cannot canonicalize specified root path '%s'"
+#~ msgstr "no se pudo obtener el la ruta canonica de la raiz especificada '%s'"
-#: lib/libalpm/util.c:541
-#, c-format
-msgid "call to waitpid failed (%s)"
-msgstr "llamada a waitpid fallida (%s)"
+#~ msgid "could not get sha1sum for package %s-%s"
+#~ msgstr "no se pudo obtener la verificación sha1 para %s-%s"
-#: lib/libalpm/util.c:550
-#, c-format
-msgid "could not remove tmpdir %s"
-msgstr "no se pudo quitar el directorio temporal %s"
+#~ msgid "sha1sums do not match for package %s-%s"
+#~ msgstr "la verificación sha1 no coincide para %s-%s"
-#: lib/libalpm/util.c:568
-#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr ""
+#~ msgid "cannot remove file %s: %s"
+#~ msgstr "no se pudo quitar el archivo %s: %s"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
-msgstr "verificando espacio libre: tamaño total: %lld, espacio en disco: %lld"
+#~ msgid "sha1: %s can't be opened\n"
+#~ msgstr "sha1: %s no puede ser abierto\n"
-#: lib/libalpm/versioncmp.c:279
-#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr "depcmp: %s-%s %s %s-%s => %s"
+#~ msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
+#~ msgstr "el archivo %s esta corrupto (verificación MD5 o SHA1 errónea)\n"
-#: lib/libalpm/versioncmp.c:284
-#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr "depcmp: %s-%s %s %s => %s"
+#~ msgid "could not update requiredby for database entry %s-%s"
+#~ msgstr "no se pudo actualizar \"requiredby\" para la entrada %s-%s"
+
+#~ msgid "could not update new database entry %s-%s"
+#~ msgstr "no se pudo actualizar la nueva entrada a la base de datos %s-%s"
+
+#~ msgid "could not update 'requiredby' database entry %s-%s"
+#~ msgstr "no se pudo actualizar \"requiredby\" para la entrada %s-%s"
diff --git a/lib/libalpm/po/fr.po b/lib/libalpm/po/fr.po
index d317e575..3ae1dff0 100644
--- a/lib/libalpm/po/fr.po
+++ b/lib/libalpm/po/fr.po
@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pacman package manager 3.0.1\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
"PO-Revision-Date: 2007-04-17 12:45+0100\n"
"Last-Translator: nam <37ii11@altern.org>\n"
"Language-Team: solsTiCe d'Hiver <solstice.dhiver@laposte.net>\n"
@@ -15,1664 +15,733 @@ msgstr ""
"X-Poedit-Language: French\n"
"X-Poedit-Country: FRANCE\n"
-#: lib/libalpm/add.c:77
-#, c-format
-msgid "loading target '%s'"
-msgstr "chargement de la cible '%s'"
-
-#: lib/libalpm/add.c:122
-#, c-format
-msgid "replacing older version %s-%s by %s in target list"
+#: lib/libalpm/add.c:88
+#, fuzzy, c-format
+msgid "replacing older version %s-%s by %s in target list\n"
msgstr ""
"remplacement de l'ancienne version %s-%s par %s dans la liste des cibles"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
+#: lib/libalpm/add.c:97
+#, fuzzy, c-format
+msgid "newer version %s-%s is in the target list -- skipping\n"
msgstr ""
"une version plus récente %s-%s est dans la liste des cibles -- paquet ignoré"
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "lecture des méta-données '%s'"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "recherche des dépendances non satisfaites"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
+msgstr ""
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "recherche des conflits"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
+msgstr ""
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
+#: lib/libalpm/add.c:172
+#, fuzzy
+msgid "replacing packages with -A and -U is not supported yet\n"
msgstr "remplacer un paquet avec -A ou -U n'est pas encore possible"
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "veuillez supprimer '%s' d'abord, en utilisant -Rd"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "tri par dépendances"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "nettoyage"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "recherche de conflits entre fichiers"
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "mise à jour du paquet %s-%s"
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "ajout du paquet %s-%s"
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "suppression préalable de l'ancien paquet (%s-%s)"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
+msgstr ""
-#: lib/libalpm/add.c:411
+#: lib/libalpm/add.c:365
#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr "ajout provisoire de %s parmi les paquets à ne pas mettre à jour"
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "extraction des fichiers"
-
-# j'ai traduit chaque fois "could not" par "a échoué"
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "déterminer le répertoire courant a échoué"
+msgid ""
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
+msgstr ""
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
+#: lib/libalpm/add.c:392
#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s est dans la liste des paquets NoExtract -- extraction non effectuée"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr ""
-#: lib/libalpm/add.c:508
+#: lib/libalpm/add.c:399
#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
-msgstr "%s est dans trans->skip_add, extraction ignorée"
+msgid "extract: not overwriting dir with file %s\n"
+msgstr ""
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
+#, fuzzy, c-format
+msgid "could not extract %s (%s)\n"
msgstr "l'extraction de %s (%s) a échoué"
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "vérification de la 'signature' md5 pour %s"
-
-#: lib/libalpm/add.c:600
-#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "vérification de la 'signature' sha1 pour %s"
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr "courant: %s"
-
-#: lib/libalpm/add.c:603
-#, c-format
-msgid "new: %s"
-msgstr "nouveau: %s"
-
-#: lib/libalpm/add.c:604
-#, c-format
-msgid "original: %s"
-msgstr "original: %s"
-
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
+#: lib/libalpm/add.c:505
+#, fuzzy, c-format
+msgid "could not rename %s (%s)\n"
msgstr "renommer %s (%s) a échoué"
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "erreur: renommer %s (%s) a échoué"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
+#, fuzzy, c-format
+msgid "could not copy tempfile to %s (%s)\n"
msgstr "la copie du fichier temporaire vers %s (%s) a échoué"
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "erreur: la copie du fichier temporaire vers %s (%s) a échoué"
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
+#, fuzzy, c-format
+msgid "%s saved as %s\n"
msgstr "%s enregistré en tant que %s"
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "avertissement: %s enregistré en tant que %s"
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "action: installation du nouveau fichier: %s"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "action: quitte en préservant les fichiers existants"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-"action: conserve le fichier actuel et installe le nouveau avec l'extension ."
-"pacnew"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
+#: lib/libalpm/add.c:556
+#, fuzzy, c-format
+msgid "could not install %s as %s: %s\n"
msgstr "l'installation de %s en tant que %s: %s a échoué"
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "erreur: l'installation de %s en tant que %s: %s a échoué"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
+#: lib/libalpm/add.c:559
+#, fuzzy, c-format
+msgid "%s installed as %s\n"
msgstr "%s installé en tant que %s"
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "avertissement: %s installé en tant que %s"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s est parmi les paquets à ne pas mettre à jour -- ignoré"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
+#: lib/libalpm/add.c:576
+#, fuzzy, c-format
+msgid "extracting %s as %s.pacnew\n"
msgstr "extraction de %s comme %s.pacnew"
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "avertissement: extraction de %s comme %s.pacnew"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "extraction de %s"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "erreur: l'extraction de %s (%s) a échoué"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr "ajoute une entrée de sauvegarde pour %s"
+# j'ai traduit chaque fois "could not" par "a échoué"
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+#, fuzzy
+msgid "could not get current working directory\n"
+msgstr "déterminer le répertoire courant a échoué"
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
+#: lib/libalpm/add.c:765
+#, fuzzy, c-format
+msgid "problem occurred while upgrading %s\n"
msgstr "des erreurs sont survenues pendant %s %s"
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "mise à jour"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "installation"
-
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr "la condition '%s' a été supprimée du paquet %s (%s => %s)"
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr "mise à jour de '%s' suite à un changement de contenu (%s)"
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr "la mise à jour du contenu '%s' dans '%s' a échoué"
-
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "mise à jour de la base de données"
-
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "ajout de l'entrée de base de données '%s'"
+#: lib/libalpm/add.c:770
+#, fuzzy, c-format
+msgid "problem occurred while installing %s\n"
+msgstr "des erreurs sont survenues pendant %s %s"
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
+#: lib/libalpm/add.c:785
+#, fuzzy, c-format
+msgid "could not update database entry %s-%s\n"
msgstr "la mise à jour l'entrée de base de données %s-%s a échoué"
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
+#: lib/libalpm/add.c:793
+#, fuzzy, c-format
+msgid "could not add entry '%s' in cache\n"
msgstr "l'ajout au cache de l'entrée '%s' a échoué"
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "exécution de \"ldconfig -r %s\""
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr "suppression de la DB %s, %d restant..."
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr "désenregistrement de la base de données '%s'"
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "fermeture de la base de données '%s'"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-"ajout d'un nouveau serveur à la base '%s': protocole '%s', serveur '%s', "
-"chemin '%s'"
-
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "liste des serveurs mise à jour pour '%s'"
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr ""
-"échec de récupération de la date de dernière mise à jour pour %s (problème "
-"mineur)"
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "échec de synchronisation de la base de données: %s [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr "sync: nouveau mtime pour %s: %s"
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr "mise à jour de la base de données %s%s"
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr "la suppression de l'entrée de base de données %s%s a échoué"
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "l'obtention de la 'signature' sha1 pour le paquet %s-%s a échoué"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "les 'signatures' sha1 correspondent pour le paquet %s-%s"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "les 'signatures' sha1 ne correspondent pas pour le paquet %s-%s"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "l'obtention de la 'signature' md5 pour le paquet %s-%s a échoué"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "les 'signatures' md5 correspondent pour le paquet %s-%s"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "les 'signatures' md5 ne correspondent pas pour le paquet %s-%s"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "la suppression du fichier de verrouillage %s a échoué"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "avertissement: la suppression du fichier de verrouillage %s a échoué"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "config: nouvelle section '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr "config: nopassiveftp"
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr "config: usesyslog"
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr "config: chomp"
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr "config: usecolor"
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr "config: inclusion de %s"
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr "config: noupgrade: %s"
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr "config: noextract: %s"
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr "config: ignorepkg: %s"
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr "config: holdpkg: %s"
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr "config: dbpath: %s"
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr "config: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1044
-#, c-format
-msgid "config: rootdir: %s"
-msgstr "config: rootdir: %s"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr "config: logfile: %s"
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr "config: xfercommand: %s"
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr "config: upgradedelay: %d"
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "analyse de remplacements possibles pour le paquet"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "analyse du remplacement '%s' pour le paquet '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s: ignore la mise à jour du paquet (à remplacer par %s-%s)"
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s sélectionné pour mise à jour (à remplacer par %s-%s)"
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr "'%s' non trouvé dans la liste de synchronisation -- ignoré"
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr "'%s' est déjà sélectionné pour suppression -- ignoré"
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr "%s sélectionné pour mise à jour (%s => %s)"
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "décompression de la base de données '%s'"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr "ouverture de la base de données à partir du chemin '%s'"
-
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
-msgstr "l'analyse de la base de données n'a pas pu trouver le paquet: %s"
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
+#: lib/libalpm/be_files.c:223
+#, fuzzy, c-format
+msgid "invalid name for database entry '%s'\n"
msgstr "nom invalide pour l'entrée de base de données '%s'"
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr "paquet invalide fournit à _alpm_db_read, et ignoré"
-
-#: lib/libalpm/be_files.c:226
-#, c-format
-msgid ""
-"request to read database info for a file-based package '%s', skipping..."
-msgstr ""
-"demande de lecture de la base de données pour un paquet type fichier '%s', "
-"ignoré..."
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
+#: lib/libalpm/be_files.c:275
+#, fuzzy, c-format
+msgid "loading package data for %s : level=%d\n"
msgstr "chargement des données du paquet %s : niveau=%d"
-# j'ai traduit chaque fois "cannot" par "impossible de"
-#: lib/libalpm/be_files.c:247
-#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr "impossible de trouver %s-%s dans la base de données '%s'"
-
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
+#, fuzzy, c-format
+msgid "could not open file %s: %s\n"
msgstr "l'ouverture du fichier %s: %s a échoué"
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr "écriture des informations DESC pour %s-%s dans la base de données"
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr "écriture des informations FILES pour %s-%s dans la base de données"
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr "écriture des informations DEPENDS pour %s-%s dans la base de données"
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr "chargement du cache de paquets pour le dépôt '%s'"
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
+#: lib/libalpm/cache.c:62
+#, fuzzy, c-format
+msgid "adding '%s' to package cache for db '%s'\n"
msgstr "ajout de '%s' au cache de paquets pour la base de données '%s'"
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr "nettoyage du cache de paquets pour le dépot '%s'"
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr "erreur: pkgcache est NULL pour la base de données '%s'"
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr "ajout de l'entrée '%s' dans '%s' cache"
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr "suppression de l'entrée '%s' du '%s' cache"
-
-#: lib/libalpm/cache.c:156
-#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr "impossible de supprimer le cache '%s' de l'entrée '%s': non trouvé"
-
-#: lib/libalpm/cache.c:178
-#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr "erreur: échec d'obtention de '%s' de NULL pkgcache"
-
-#: lib/libalpm/cache.c:201
-#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr "chargement du cache de groupe pour le dépôt '%s'"
-
-#: lib/libalpm/conflict.c:69
-#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr " conflit détecté '%s' : paquet '%s'"
-
-#: lib/libalpm/conflict.c:78
-#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr " conflit détecté '%s': paquet '%s' fournit '%s'"
-
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
-#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr ""
-"le paquet '%s' est en conflit avec lui-même - erreur de création de paquet"
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr "analyse des conflits: cible '%s' comparée à la base"
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr "analyse des conflits: cible '%s' comparée aux cibles"
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr "analyse des conflits: base de données comparée à la cible '%s'"
-
-#: lib/libalpm/conflict.c:201
-#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr ""
-"'%s' est aussi dans la liste de cibles, analyse des nouveaux conflits "
-"possibles"
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr "\tCONFLITS:: %s est en conflit avec %s"
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr "erreur malloc: n'a pas pu allouer %d bytes"
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr "malloc a echoué: n'a pas pu allouer %d bytes"
+#: lib/libalpm/db.c:285
+#, fuzzy, c-format
+msgid "could not remove database entry %s%s\n"
+msgstr "la suppression de l'entrée de base de données %s%s a échoué"
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
+#: lib/libalpm/db.c:553
+#, fuzzy
+msgid "attempt to re-register the 'local' DB\n"
msgstr "tentative de ré-enregistrer la base de données locale"
-#: lib/libalpm/db.c:175
-#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr ""
-"essai de ré-enregistrement de la base de données '%s', utilisant celle qui "
-"existe"
-
-#: lib/libalpm/db.c:181
-#, c-format
-msgid "registering database '%s'"
-msgstr "enregistrement de la base de données '%s'"
-
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr "le répertoire de base de données '%s' n'existe pas, création"
-
-#: lib/libalpm/db.c:197
-#, c-format
-msgid "opening database '%s'"
-msgstr "ouverture de la base de données '%s'"
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr "début du tri des dépendances"
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr "possible cycle de dépendances détecté"
-
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr "fin du tri des dépendances"
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr "aucun paquet trouvé dans la liste des paquets"
-
-#: lib/libalpm/deps.c:230
-#, c-format
-msgid "cannot find package installed '%s'"
-msgstr "impossible de trouver le paquet installé '%s'"
-
-#: lib/libalpm/deps.c:261
-#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr "checkdeps: dépendance '%s' a changé de '%s' à '%s'"
-
-#: lib/libalpm/deps.c:280
-#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
-msgstr "checkdeps: dépendance '%s' satisfaite par le paquet installé '%s'"
-
-#: lib/libalpm/deps.c:289
-#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
-msgstr "checkdeps: '%s' mis à jour ne satisfera pas une dépendance de '%s'"
-
-#: lib/libalpm/deps.c:359
-#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr "dépendance manquante '%s' pour le paquet '%s'"
-
-#: lib/libalpm/deps.c:409
-#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr "checkdeps: trouvé %s, comme requis par %s"
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+#, fuzzy
+msgid "database path is undefined\n"
+msgstr "base de données non initialisée"
-#: lib/libalpm/deps.c:485
-#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr "exclusion de %s -- explicitement installé"
+#: lib/libalpm/deps.c:173
+#, fuzzy
+msgid "dependency cycle detected:\n"
+msgstr "cycle de dépendances détecté: %s"
-#: lib/libalpm/deps.c:532
+#: lib/libalpm/deps.c:175
#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-"impossible de trouver le paquet \"%s\" ou quoique ce soit qui le fournisse!"
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "adding '%s' to the targets"
-msgstr "ajout de '%s' aux cibles"
-
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
-msgstr "début du tri des dépendances"
-
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
-msgstr "%s fournit la dépendance %s -- ignoré"
-
-#: lib/libalpm/deps.c:630
-#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-"résolution des dépendances impossible pour \"%s\" (\"%s\" n'est pas parmi "
-"les paquets)"
-
-#: lib/libalpm/deps.c:647
-#, c-format
-msgid "dependency %s is already in the target list -- skipping"
-msgstr "la dépendance %s est déjà dans la liste de cibles -- ignorée"
-#: lib/libalpm/deps.c:667
-#, c-format
-msgid "pulling dependency %s (needed by %s)"
-msgstr "récupération de la dépendance %s (requise par %s)"
-
-#: lib/libalpm/deps.c:671
-#, c-format
-msgid "cannot resolve dependencies for \"%s\""
+#: lib/libalpm/deps.c:573
+#, fuzzy, c-format
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "résolution des dépendances impossible pour \"%s\""
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr "cycle de dépendances détecté: %s"
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr "fin du tri des dépendances"
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr "dépassement de mémoire!"
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr "erreur système non prévue"
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr "autorisation insuffisante"
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr "trouver ou lire le fichier a échoué"
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+#, fuzzy
+msgid "could not find or read directory"
+msgstr "trouver ou lire le fichier a échoué"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr "un argument erroné ou nul a été fourni"
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr "librairie non initialisée"
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr "librairie déjà initialisée"
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr "verrouillage de la base de données impossible"
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "l'ouverture de la base de données a échoué"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "la création de la base de données a échoué"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "base de données non initialisée"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "base de données déjà enregistrée"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "trouver la base de données a échoué"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "la mise à jour de la base de données a échoué"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "la suppression de l'entrée de base de données a échoué"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr "URL invalide pour le serveur"
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr "définir le paramètre a échoué"
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr "transaction déjà initialisée"
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr "transaction non initialisée"
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr "cible répétée"
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr "transaction non préparée"
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr "transaction annulée"
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr "opération incompatible avec le type de transaction"
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr "appliquer la transaction a échoué"
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr "tous les fichiers n'ont pas pu être téléchargés"
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr "trouver ou de lire le paquet a échoué"
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr "paquet invalide ou corrompu"
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr "ouverture du fichier paquet impossible"
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr "chargement des données du paquet impossible"
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr "paquet déjà installé"
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr "paquet non installé ou version plus ancienne"
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr "suppression de certains fichiers du paquet impossible"
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "nom de paquet invalide"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr "paquet corrompu"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr "ce dépôt n'existe pas"
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+#, fuzzy
+msgid "corrupted delta"
+msgstr "paquet corrompu"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr ""
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "groupe non trouvé"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr "la satisfaction des dépendances a échoué"
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr "conflit de dépendances"
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr "conflit de fichiers"
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr "opération annulée par l'utilisateur"
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "erreur interne"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr "erreur de libarchive"
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "espace disque insuffisant"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr "non confirmé"
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr "nom de la section de configuration erroné"
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr "'local' est réservé et ne peut être utilisé comme nom de dépôt"
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr "erreur de syntaxe dans le fichier de configuration"
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr "toutes les directives doivent appartenir à une section"
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "expression régulière incorrecte"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr "échec de connexion à l'hôte distant "
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "erreur non prévue"
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr "normalisation du chemin root '%s' impossible"
-
-#: lib/libalpm/handle.c:175
-#, c-format
-msgid "option 'root' = %s"
-msgstr "option 'root' = %s"
-
-#: lib/libalpm/handle.c:195
-#, c-format
-msgid "option 'dbpath' = %s"
-msgstr "option 'dbpath' = %s"
-
-#: lib/libalpm/handle.c:211
-#, c-format
-msgid "option 'cachedir' = %s"
-msgstr "option 'cachedir' = %s"
-
-#: lib/libalpm/md5driver.c:56
-#, c-format
-msgid "%s can't be opened\n"
-msgstr "l'ouverture de %s a échoué\n"
-
-#: lib/libalpm/md5driver.c:74
-#, c-format
-msgid "md5(%s) = %s"
-msgstr "md5(%s) = %s"
+#: lib/libalpm/package.c:124
+#, fuzzy, c-format
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "l'obtention de la 'signature' md5 pour le paquet %s-%s a échoué"
-#: lib/libalpm/package.c:147
-#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr "%s-%s: ignore la mise à jour du paquet (%s)"
+#: lib/libalpm/package.c:133
+#, fuzzy, c-format
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "les 'signatures' md5 ne correspondent pas pour le paquet %s-%s"
-#: lib/libalpm/package.c:158
-#, c-format
-msgid "%s: forcing upgrade to version %s"
+#: lib/libalpm/package.c:737
+#, fuzzy, c-format
+msgid "%s: forcing upgrade to version %s\n"
msgstr "%s: force la mise à jour à la version %s"
-#: lib/libalpm/package.c:163
-#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
+#: lib/libalpm/package.c:742
+#, fuzzy, c-format
+msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%s: la version locale (%s) est plus récente que %s (%s)"
-#: lib/libalpm/package.c:171
-#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
+#: lib/libalpm/package.c:750
+#, fuzzy, c-format
+msgid "%s-%s: delaying upgrade of package (%s)\n"
msgstr "%s-%s: retarde la mise à jour du paquet (%s)"
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
-#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr "%s: erreur de syntaxe dans le fichier de description à la ligne %d"
-
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
+#: lib/libalpm/package.c:931
+#, fuzzy, c-format
+msgid "could not parse package description file in %s\n"
msgstr "l'analyse du fichier de description a échoué"
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
+#: lib/libalpm/package.c:936
+#, fuzzy, c-format
+msgid "missing package name in %s\n"
msgstr "nom de paquet manquant dans %s"
-#: lib/libalpm/package.c:363
-#, c-format
-msgid "missing package version in %s"
+#: lib/libalpm/package.c:940
+#, fuzzy, c-format
+msgid "missing package version in %s\n"
msgstr "version de paquet manquante dans %s"
-#: lib/libalpm/package.c:398
-#, c-format
-msgid "could not remove tempfile %s"
+#: lib/libalpm/package.c:970
+#, fuzzy, c-format
+msgid "could not remove tempfile %s\n"
msgstr "la suppression du fichier temporaire %s a échoué"
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
+#, fuzzy, c-format
+msgid "error while reading package %s: %s\n"
msgstr "erreur lors de la lecture du paquet: %s"
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
+#: lib/libalpm/package.c:1005
+#, fuzzy, c-format
+msgid "missing package metadata in %s\n"
msgstr "méta-données du paquet manquantes"
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
+#: lib/libalpm/package.c:1012
+#, fuzzy, c-format
+msgid "missing package filelist in %s, generating one\n"
msgstr "liste de fichiers absente du paquet %s, création"
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr "ajoute '%s' dans le champ 'requis par' pour '%s'"
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr "ajoute '%s' dans le champ 'requis par' pour '%s' (fournit: %s)"
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr "trouver %s dans la base de données a échoué"
-
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
-msgstr "ajoute %s dans la liste des cibles"
-
#: lib/libalpm/remove.c:121
-#, c-format
-msgid "pulling %s in the targets list"
-msgstr "ajoute %s à la liste des cibles"
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
+#, fuzzy, c-format
+msgid "could not find %s in database -- skipping\n"
msgstr "trouver %s dans la base de données a échoué -- ignoré"
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr "trouve les dépendances susceptibles d'être supprimées"
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
+#, fuzzy, c-format
+msgid "cannot remove file '%s': %s\n"
msgstr "suppression du fichier '%s': %s impossible"
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr "Ignore la suppression de %s pour cause de NoUpgrade"
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "le fichier %s n'existe pas"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "préservation du répertoire %s"
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "suppression du répertoire %s"
-
-#: lib/libalpm/remove.c:236
-#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr "%s est dans trans->skip_remove, suppression ignorée"
-
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
-msgstr "la transaction se fait avec option NOSAVE, pas de sauvegarde de '%s'"
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr "suppression du lien %s"
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr "suppression du fichier %s: %s impossible"
-
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr "suppression du paquet %s-%s"
-
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
-msgstr "paquet '%s' non supprimé, certains fichiers ne peuvent être supprimés"
-
-#: lib/libalpm/remove.c:316
-#, c-format
-msgid "removing %d files"
-msgstr "suppression de %d fichiers"
-
#: lib/libalpm/remove.c:337
-#, c-format
-msgid "removing database entry '%s'"
-msgstr "suppression de l'entrée de base de données %s"
-
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
+#, fuzzy, c-format
+msgid "could not remove database entry %s-%s\n"
msgstr "la suppression de l'entrée de base de données %s-%s a échoué"
-#: lib/libalpm/remove.c:344
-#, c-format
-msgid "could not remove entry '%s' from cache"
+#: lib/libalpm/remove.c:342
+#, fuzzy, c-format
+msgid "could not remove entry '%s' from cache\n"
msgstr "la suppression du cache de l'entrée '%s' a échoué"
-#: lib/libalpm/sha1.c:397
-#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr "sha1: %s ne peut être ouvert\n"
-
-#: lib/libalpm/sha1.c:412
+#: lib/libalpm/server.c:56
#, c-format
-msgid "sha1(%s) = %s"
-msgstr "sha1(%s) = %s"
-
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
-msgstr "vérification des mises à jour disponibles"
-
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
-msgstr "%s-%s sélectionné pour mise à jour (%s => %s)"
+msgid "url '%s' is invalid, ignoring\n"
+msgstr ""
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
-msgstr "cherche la cible dans le dépôt '%s'"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
+msgstr ""
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
-#, c-format
-msgid "target '%s' not found -- looking for provisions"
-msgstr "cible '%s' non trouvée -- recherche des "
+#: lib/libalpm/server.c:241
+msgid "disk"
+msgstr ""
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr "trouvé '%s' comme condition pour '%s'"
+#: lib/libalpm/server.c:245
+#, fuzzy, c-format
+msgid "failed retrieving file '%s' from %s : %s\n"
+msgstr "échec de récupération de certains fichiers depuis %s\n"
-#: lib/libalpm/sync.c:290
-#, c-format
-msgid "repository '%s' not found"
-msgstr "dépôt '%s' non trouvé"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
+msgstr ""
-#: lib/libalpm/sync.c:331
-#, c-format
-msgid "%s-%s is up to date -- skipping"
-msgstr "%s-%s est à jour -- ignoré"
+#: lib/libalpm/server.c:288
+#, fuzzy, c-format
+msgid "cannot write to file '%s'\n"
+msgstr "suppression du fichier '%s': %s impossible"
-#: lib/libalpm/sync.c:354
-#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr "ajout de la cible '%s' au jeu de transactions"
+#: lib/libalpm/server.c:307
+#, fuzzy, c-format
+msgid "error downloading '%s': %s\n"
+msgstr "erreur lors de la lecture du paquet: %s"
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr "résolution des dépendances pour la cible"
+#: lib/libalpm/server.c:319
+#, fuzzy, c-format
+msgid "error writing to file '%s': %s\n"
+msgstr "suppression du fichier '%s': %s impossible"
-#: lib/libalpm/sync.c:422
-#, c-format
-msgid "adding package %s-%s to the transaction targets"
-msgstr "ajout du paquet %s-%s aux cibles de la transaction"
+#: lib/libalpm/server.c:387
+#, fuzzy, c-format
+msgid "could not chdir to %s\n"
+msgstr "changer de répertoire vers / (%s) a échoué"
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
-msgstr "recherche de dépendances impossibles à résoudre"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
+msgstr ""
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "le paquet '%s' est en conflit avec '%s'"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
+msgstr ""
-#: lib/libalpm/sync.c:516
-#, c-format
-msgid "'%s' not found in transaction set -- skipping"
-msgstr "'%s' non trouvé dans le jeu de transactions -- ignoré"
+#: lib/libalpm/server.c:458
+#, fuzzy, c-format
+msgid "failed to download %s\n"
+msgstr "tous les fichiers n'ont pas pu être téléchargés"
-#: lib/libalpm/sync.c:527
-#, c-format
-msgid "package '%s' provides its own conflict"
-msgstr "le paquet '%s' génère son propre conflit"
+#: lib/libalpm/sync.c:135
+#, fuzzy, c-format
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
+msgstr "%s-%s: ignore la mise à jour du paquet (à remplacer par %s-%s)"
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
-#, c-format
-msgid "'%s' is in the target list -- keeping it"
-msgstr "'%s' est dans la la liste de cibles -- conservation"
+#: lib/libalpm/sync.c:250
+#, fuzzy, c-format
+msgid "%s: ignoring package upgrade (%s => %s)\n"
+msgstr "%s-%s: ignore la mise à jour du paquet (%s)"
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
-#, c-format
-msgid "removing '%s' from target list"
-msgstr "suppression de '%s' de la liste des cibles"
+#: lib/libalpm/sync.c:320
+#, fuzzy, c-format
+msgid "repository '%s' not found\n"
+msgstr "dépôt '%s' non trouvé"
-#: lib/libalpm/sync.c:576
-#, c-format
-msgid "resolving package '%s' conflict"
-msgstr "résolution des conflits pour le paquet '%s'"
+#: lib/libalpm/sync.c:354
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "%s-%s est à jour -- ignoré"
-#: lib/libalpm/sync.c:599
-#, c-format
-msgid "electing '%s' for removal"
-msgstr "sélection de '%s' pour suppression"
+#: lib/libalpm/sync.c:358
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- reinstalling\n"
+msgstr "%s-%s est à jour -- ignoré"
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+#, fuzzy
+msgid "unresolvable package conflicts detected\n"
msgstr "un conflit de paquets impossible à résoudre a été détecté"
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr "analyse des dépendances des paquets sélectionnés pour suppression"
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr "quelque chose s'est horriblement mal passé"
-
-#: lib/libalpm/sync.c:712
-#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
-msgstr "trouvé '%s' comme pour '%s' -- conflit annulé"
-
-#: lib/libalpm/sync.c:808
-#, c-format
-msgid "%s is already in the cache\n"
-msgstr "%s est déjà dans le cache\n"
-
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
-msgstr "le cache %s n'existe pas, création...\n"
-
-#: lib/libalpm/sync.c:820
-#, c-format
-msgid "warning: no %s cache exists, creating..."
-msgstr "avertissement: le cache %s n'existe pas, création..."
+#: lib/libalpm/sync.c:628
+#, fuzzy, c-format
+msgid "malloc failure: could not allocate %zd bytes\n"
+msgstr "erreur malloc: n'a pas pu allouer %d bytes"
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr "n'a pas pu créer le cache de paquets, /tmp sera utilisé à la place\n"
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr ""
-"avertissement: ne peut créer le cache de paquets, /tmp sera utilisé à la "
-"place"
-
-#: lib/libalpm/sync.c:833
#, c-format
-msgid "failed to retrieve some files from %s\n"
-msgstr "échec de récupération de certains fichiers depuis %s\n"
+msgid "command: %s\n"
+msgstr ""
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
+#, fuzzy, c-format
+msgid "can't get md5 checksum for file %s\n"
msgstr "ne peut obtenir la 'signature' md5 ou sha1 pour le paquet %s\n"
-#: lib/libalpm/sync.c:894
-#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
+#: lib/libalpm/sync.c:910
+#, fuzzy, c-format
+msgid "file %s was corrupted (bad MD5 checksum)\n"
msgstr "l'archive %s était corrompue (mauvaise somme MD5 ou SHA1)\n"
-#: lib/libalpm/sync.c:896
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "l'archive %s est corrompue (mauvaise somme MD5 ou SHA1)\n"
+msgid "failed to retrieve some files from %s\n"
+msgstr "échec de récupération de certains fichiers depuis %s\n"
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
+#: lib/libalpm/sync.c:1137
+#, fuzzy
+msgid "could not create removal transaction\n"
msgstr "la création de la transaction de suppression a échoué"
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
+#: lib/libalpm/sync.c:1143
+#, fuzzy
+msgid "could not initialize the removal transaction\n"
msgstr "l'initialisation de la transaction de suppression a échoué"
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr "suppression des paquets en conflit et de ceux à remplacer"
-
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
+#: lib/libalpm/sync.c:1165
+#, fuzzy
+msgid "could not prepare removal transaction\n"
msgstr "la préparation de la transaction de suppression a échoué"
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
+#: lib/libalpm/sync.c:1171
+#, fuzzy
+msgid "could not commit removal transaction\n"
msgstr "appliquer la transaction de suppression a échoué"
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr "installation des paquets"
-
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
+#: lib/libalpm/sync.c:1182
+#, fuzzy
+msgid "could not create transaction\n"
msgstr "la création de la transaction a échoué"
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
+#: lib/libalpm/sync.c:1187
+#, fuzzy
+msgid "could not initialize transaction\n"
msgstr "l'initialisation de la transaction a échoué"
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
+#: lib/libalpm/sync.c:1214
+#, fuzzy
+msgid "could not prepare transaction\n"
msgstr "la préparation de la transaction a échoué"
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
-msgstr ""
-"mise à jour de la base de données avec les dépendances des paquets remplacés"
-
-#: lib/libalpm/sync.c:1030
-#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr ""
-"la mise à jour du champ requiredby pour l'entrée de base de données %s-%s a "
-"échoué"
-
-#: lib/libalpm/sync.c:1039
-#, c-format
-msgid "could not update new database entry %s-%s"
-msgstr "la mise à jour de la nouvelle entrée de base de données %s-%s a échoué"
-
-#: lib/libalpm/sync.c:1079
-#, c-format
-msgid "found package '%s-%s' in sync"
-msgstr "paquet '%s-%s' trouvé dans sync"
-
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr "paquet '%s' non trouvé dans la liste de synchronisation"
-
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr "mise à jour des dépendances dans les champs 'requiredby' pour %s-%s"
-
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
-msgstr "le paquet n'a aucune dépendance, pas d'autres paquets à mettre à jour"
+#: lib/libalpm/sync.c:1219
+#, fuzzy
+msgid "could not commit transaction\n"
+msgstr "appliquer la transaction a échoué"
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr "mise à jour du champ 'requiredby' pour le paquet '%s'"
+#: lib/libalpm/trans.c:214
+#, fuzzy, c-format
+msgid "could not remove lock file %s\n"
+msgstr "la suppression du fichier de verrouillage %s a échoué"
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
msgstr ""
-"la mise à jour du champ 'requiredby' de l'entrée de base de données %s-%s a "
-"échoué"
-
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr "trouver la dépendance '%s' a échoué"
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
-msgstr "échec de la création du chemin '%s' : %s"
-
-#: lib/libalpm/util.c:280
-#, c-format
-msgid "could not open %s: %s\n"
-msgstr "l'ouverture de %s: %s a échoué\n"
-
-#: lib/libalpm/util.c:293
-#, c-format
-msgid "could not extract %s: %s\n"
-msgstr "l'extraction de %s: %s a échoué\n"
-
-#: lib/libalpm/util.c:350
-#, c-format
-msgid "logaction called: %s"
-msgstr "logaction called: %s"
-
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
+#: lib/libalpm/trans.c:494
+#, fuzzy
+msgid "could not create temp directory\n"
msgstr "la création du répertoire temporaire a échoué"
-#: lib/libalpm/util.c:472
-#, c-format
-msgid "could not change directory to %s (%s)"
+#: lib/libalpm/trans.c:536
+#, fuzzy, c-format
+msgid "could not change directory to %s (%s)\n"
msgstr "changer de répertoire vers %s (%s) a échoué"
-#: lib/libalpm/util.c:476
-#, c-format
-msgid "executing %s script..."
-msgstr "exécution du script %s ..."
-
-#: lib/libalpm/util.c:489
-#, c-format
-msgid "could not fork a new process (%s)"
+#: lib/libalpm/trans.c:554
+#, fuzzy, c-format
+msgid "could not fork a new process (%s)\n"
msgstr "la génération d'un nouveau processus (%s) a échoué"
-#: lib/libalpm/util.c:496
-#, c-format
-msgid "chrooting in %s"
-msgstr "chroot dans %s"
-
-#: lib/libalpm/util.c:498
-#, c-format
-msgid "could not change the root directory (%s)"
+#: lib/libalpm/trans.c:564
+#, fuzzy, c-format
+msgid "could not change the root directory (%s)\n"
msgstr "changer le répertoire racine (%s) a échoué"
-#: lib/libalpm/util.c:502
-#, c-format
-msgid "could not change directory to / (%s)"
+#: lib/libalpm/trans.c:569
+#, fuzzy, c-format
+msgid "could not change directory to / (%s)\n"
msgstr "changer de répertoire vers / (%s) a échoué"
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
-msgstr "exécution de \"%s\""
-
-#: lib/libalpm/util.c:509
-#, c-format
+#: lib/libalpm/trans.c:578
+#, fuzzy, c-format
msgid "call to popen failed (%s)"
-msgstr "l'appel à popen a échoué (%s)"
+msgstr "call to waitpid failed (%s)"
-#: lib/libalpm/util.c:541
-#, c-format
-msgid "call to waitpid failed (%s)"
+#: lib/libalpm/trans.c:597
+#, fuzzy, c-format
+msgid "call to waitpid failed (%s)\n"
msgstr "call to waitpid failed (%s)"
-#: lib/libalpm/util.c:550
-#, c-format
-msgid "could not remove tmpdir %s"
-msgstr "la suppression du répertoire temporaire %s a échoué"
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
+msgstr ""
-#: lib/libalpm/util.c:568
-#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr "impossible de lire l'information concernant l'espace disque de %s: %s"
+#: lib/libalpm/trans.c:615
+#, fuzzy, c-format
+msgid "could not remove tmpdir %s\n"
+msgstr "la suppression du répertoire temporaire %s a échoué"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
-msgstr "check_freespace: taille totale: %lld, espace disque: %lld"
+#: lib/libalpm/util.c:204
+#, fuzzy, c-format
+msgid "failed to make path '%s' : %s\n"
+msgstr "échec de la création du chemin '%s' : %s"
-#: lib/libalpm/versioncmp.c:279
+#: lib/libalpm/util.c:389
#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr "depcmp: %s-%s %s %s-%s => %s"
+msgid "could not open %s: %s\n"
+msgstr "l'ouverture de %s: %s a échoué\n"
-#: lib/libalpm/versioncmp.c:284
+#: lib/libalpm/util.c:573
#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr "depcmp: %s-%s %s %s => %s"
-
-#~ msgid "%s saved as %s.pacorig"
-#~ msgstr "%s sauve en tant que %s.pacorig"
-
-#~ msgid "could not parse token %s"
-#~ msgstr "ne peut analyser l'élément %s"
-
-#~ msgid "notice: %s is in NoExtract -- skipping extraction"
-#~ msgstr "note: %s est dans la liste NoExtract -- ignore l'extraction"
-
-#~ msgid "loading package cache (infolevel=%#x) for repository '%s'"
-#~ msgstr "chargement du cache de paquet (infolevel=%#x) pour le dépot '%s'"
-
-#, fuzzy
-#~ msgid "package cache reloaded (infolevel=%#x) for repository '%s'"
-#~ msgstr "chargement du cache de paquet (infolevel=%#x) pour le dépot '%s'"
-
-#~ msgid "targs vs db: found %s as a conflict for %s"
-#~ msgstr ""
-#~ "comparaison cibles / base de données : trouve %s comme conflit pour %s"
-
-#~ msgid "targs vs targs: found %s as a conflict for %s"
-#~ msgstr ""
-#~ "comparaison cible / liste de cibles : trouve %s comme conflit pour %s"
-
-#~ msgid "db vs targs: found %s as a conflict for %s"
-#~ msgstr "comparaison base de donnée / cibles: trouve %s en conflit avec %s"
-
-#, fuzzy
-#~ msgid "no dependencies for target '%s'"
-#~ msgstr "ne peut résoudre les dépendances pour \"%s\""
-
-#, fuzzy
-#~ msgid "%s-%s: ignoring package upgrade (%s => %s)"
-#~ msgstr "%s-%s: ignore la mise à jour du paquet (%s)"
-
-#~ msgid "adding new package %s-%s"
-#~ msgstr "ajout du nouveau paquet %s-%s"
-
-#~ msgid "error updating database for %s-%s!"
-#~ msgstr "erreur lors de la mise a jour de la base de données pour %s-%s!"
-
-#~ msgid "dep is NULL!"
-#~ msgstr "dep est NULL!"
-
-#~ msgid "loading ALL info for '%s'"
-#~ msgstr "chargement de TOUTES les infos pour '%s'"
+msgid "no %s cache exists, creating...\n"
+msgstr "le cache %s n'existe pas, création...\n"
+#: lib/libalpm/util.c:593
#, fuzzy
-#~ msgid "could not find dependency '%s' for removal"
-#~ msgstr "n'a pas pu trouver la dépendance '%s'"
+msgid "couldn't create package cache, using /tmp instead\n"
+msgstr "n'a pas pu créer le cache de paquets, /tmp sera utilisé à la place\n"
-#~ msgid "loading FILES info for '%s'"
-#~ msgstr "chargement des informations de fichiers pour '%s'"
+#: lib/libalpm/util.c:643
+#, fuzzy, c-format
+msgid "md5: %s can't be opened\n"
+msgstr "l'ouverture de %s a échoué\n"
-#~ msgid "loading DESC info for '%s'"
-#~ msgstr "chargement des informations descriptives pour '%s'"
+#: lib/libalpm/util.c:645
+#, fuzzy, c-format
+msgid "md5: %s can't be read\n"
+msgstr "l'ouverture de %s a échoué\n"
-#, fuzzy
-#~ msgid "syntax error"
-#~ msgstr "erreur interne"
+#~ msgid "please remove '%s' first, using -Rd"
+#~ msgstr "veuillez supprimer '%s' d'abord, en utilisant -Rd"
-#~ msgid "unpacking %s"
-#~ msgstr "décompacte %s"
+#~ msgid "could not extract %s (%s)"
+#~ msgstr "l'extraction de %s (%s) a échoué"
-#~ msgid "loading SCRIPLET info for '%s'"
-#~ msgstr "charge les infos de SCRIPLET pour '%s'"
+#~ msgid "could not update provision '%s' from '%s'"
+#~ msgstr "la mise à jour du contenu '%s' dans '%s' a échoué"
#, fuzzy
-#~ msgid "config: %s: server: %s\n"
-#~ msgstr "avertissement: %s sauve en tant que %s"
-
-#~ msgid "db_write: could not open file %s/desc"
-#~ msgstr "db_write: n'a pas pu ouvrir le fichier %s/desc"
-
-#~ msgid "db_write: could not open file %s/files"
-#~ msgstr "db_write: n'a pas pu ouvrir le fichier %s/files"
-
-#~ msgid "db_write: could not open file %s/depends"
-#~ msgstr "db_write: n' pas pu ouvrir le fichier %s/depends"
-
-#~ msgid "PM_OPT_DBPATH set to '%s'"
-#~ msgstr "PM_OPT_DBPATH défini à '%s'"
-
-#~ msgid "PM_OPT_CACHEDIR set to '%s'"
-#~ msgstr "PM_OPT_CACHEDIR défini à '%s'"
-
-#~ msgid "can't open log file %s"
-#~ msgstr "ne peut ouvrir le fichier de log %s"
-
-#~ msgid "PM_OPT_LOGFILE set to '%s'"
-#~ msgstr "PM_OPT_LOGFILE défini à '%s'"
+#~ msgid "%s: description file is missing"
+#~ msgstr "%s: erreur de syntaxe dans le fichier de description à la ligne %d"
-#~ msgid "'%s' added to PM_OPT_NOUPGRADE"
-#~ msgstr "'%s' ajouté à PM_OPT_NOUPGRADE"
+#~ msgid "malloc failed: could not allocate %d bytes"
+#~ msgstr "malloc a echoué: n'a pas pu allouer %d bytes"
-#~ msgid "PM_OPT_NOUPGRADE flushed"
-#~ msgstr "PM_OPT_NOUPGRADE rechargé"
-
-#~ msgid "'%s' added to PM_OPT_NOEXTRACT"
-#~ msgstr "'%s' ajouté à PM_OPT_NOEXTRACT"
+#~ msgid ""
+#~ "cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+#~ msgstr ""
+#~ "résolution des dépendances impossible pour \"%s\" (\"%s\" n'est pas parmi "
+#~ "les paquets)"
-#~ msgid "PM_OPT_NOEXTRACT flushed"
-#~ msgstr "PM_OPT_NOEXTRACT rechargé"
+#~ msgid "cannot canonicalize specified root path '%s'"
+#~ msgstr "normalisation du chemin root '%s' impossible"
-#~ msgid "'%s' added to PM_OPT_IGNOREPKG"
-#~ msgstr "'%s' ajouté à PM_OPT_IGNOREPKG"
+#~ msgid "could not get sha1sum for package %s-%s"
+#~ msgstr "l'obtention de la 'signature' sha1 pour le paquet %s-%s a échoué"
-#~ msgid "PM_OPT_IGNOREPKG flushed"
-#~ msgstr "PM_OPT_IGNOREPKG rechargé"
+#~ msgid "sha1sums do not match for package %s-%s"
+#~ msgstr "les 'signatures' sha1 ne correspondent pas pour le paquet %s-%s"
-#, fuzzy
-#~ msgid "'%s' added to PM_OPT_HOLDPKG"
-#~ msgstr "'%s' ajouté à PM_OPT_IGNOREPKG"
-
-#, fuzzy
-#~ msgid "PM_OPT_HOLDPKG flushed"
-#~ msgstr "PM_OPT_IGNOREPKG rechargé"
+#~ msgid "cannot remove file %s: %s"
+#~ msgstr "suppression du fichier %s: %s impossible"
-#~ msgid "PM_OPT_USESYSLOG set to '%d'"
-#~ msgstr "PM_OPT_USESYSLOG défini à '%d'"
+#~ msgid "sha1: %s can't be opened\n"
+#~ msgstr "sha1: %s ne peut être ouvert\n"
-#~ msgid "PM_OPT_LOGMASK set to '%02x'"
-#~ msgstr "PM_OPT_LOGMASK défini à '%02x'"
-
-#, fuzzy
-#~ msgid "PM_OPT_PROXYHOST set to '%s'"
-#~ msgstr "PM_OPT_DBPATH défini à '%s'"
-
-#, fuzzy
-#~ msgid "PM_OPT_PROXYPORT set to '%d'"
-#~ msgstr "PM_OPT_DBPATH défini à '%s'"
+#~ msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
+#~ msgstr "l'archive %s est corrompue (mauvaise somme MD5 ou SHA1)\n"
-#, fuzzy
-#~ msgid "PM_OPT_XFERCOMMAND set to '%s'"
-#~ msgstr "PM_OPT_CACHEDIR défini à '%s'"
-
-#, fuzzy
-#~ msgid "PM_OPT_NOPASSIVEFTP set to '%d'"
-#~ msgstr "PM_OPT_DBPATH défini à '%s'"
-
-#, fuzzy
-#~ msgid "PM_OPT_CHOMP set to '%d'"
-#~ msgstr "PM_OPT_CACHEDIR défini à '%s'"
+#~ msgid "could not update requiredby for database entry %s-%s"
+#~ msgstr ""
+#~ "la mise à jour du champ requiredby pour l'entrée de base de données %s-%s "
+#~ "a échoué"
-#~ msgid "bad package file in %s"
-#~ msgstr "mauvais fichier de paquet dans %s"
+#~ msgid "could not update new database entry %s-%s"
+#~ msgstr ""
+#~ "la mise à jour de la nouvelle entrée de base de données %s-%s a échoué"
-#~ msgid "%s-%s: local version is newer -- skipping"
-#~ msgstr "%s-%s: la version locale est plus récente -- ignoré"
+#~ msgid "could not update 'requiredby' database entry %s-%s"
+#~ msgstr ""
+#~ "la mise à jour du champ 'requiredby' de l'entrée de base de données %s-%s "
+#~ "a échoué"
diff --git a/lib/libalpm/po/hu.po b/lib/libalpm/po/hu.po
index 2caf23fe..cd0555fe 100644
--- a/lib/libalpm/po/hu.po
+++ b/lib/libalpm/po/hu.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: hu\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
"PO-Revision-Date: 2007-03-14 13:45+0100\n"
"Last-Translator: Nagy Gabor <ngaba@petra.hos.u-szeged.hu>\n"
"Language-Team: <hu@li.org>\n"
@@ -17,1502 +17,728 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: KBabel 1.11.4\n"
-#: lib/libalpm/add.c:77
-#, c-format
-msgid "loading target '%s'"
-msgstr "cl betltse '%s'"
-
-#: lib/libalpm/add.c:122
-#, c-format
-msgid "replacing older version %s-%s by %s in target list"
+#: lib/libalpm/add.c:88
+#, fuzzy, c-format
+msgid "replacing older version %s-%s by %s in target list\n"
msgstr "a %s-%s-t lecserli a %s a cl listban"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
+#: lib/libalpm/add.c:97
+#, fuzzy, c-format
+msgid "newer version %s-%s is in the target list -- skipping\n"
msgstr "az jabb verzi (%s-%s) mr elrhet a cl listban -- kihagys"
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "'%s' metaadat olvassa"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "elgtelen fggsgek keresse"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
+msgstr ""
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "konfliktusok keresse"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
+msgstr ""
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
+#: lib/libalpm/add.c:172
+#, fuzzy
+msgid "replacing packages with -A and -U is not supported yet\n"
msgstr "csomagok lecserlse mg nem tmogatott -A s -U esetn"
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "krem elszr tvoltsa el '%s'-t a -Rd kapcsolt hasznlva"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "rendezs fggsgek szerint"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "tisztts"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "fjl konfliktusok keresse"
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "csomag frisstse: %s-%s"
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "csomag hozzadsa %s-%s"
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "elsknt a rgi csomag eltvoltsa (%s-%s)"
-
-#: lib/libalpm/add.c:411
-#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
msgstr ""
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "fjlok kitmrtse"
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "a jelenlegi munkaknyvtr nem kaphat meg"
-
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
-#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s a NoExtractben van, kitmrts kihagysa"
-
-#: lib/libalpm/add.c:508
+#: lib/libalpm/add.c:365
#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
+msgid ""
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
msgstr ""
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
-msgstr "nem sikerlt kitmrteni: %s (%s)"
-
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "md5 sszegek vizsglata a %s szmra"
-
-#: lib/libalpm/add.c:600
+#: lib/libalpm/add.c:392
#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "sha1 sszegek vizsglata a %s szmra"
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr "jelenlegi: %s"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr ""
-#: lib/libalpm/add.c:603
+#: lib/libalpm/add.c:399
#, c-format
-msgid "new: %s"
-msgstr "j: %s"
+msgid "extract: not overwriting dir with file %s\n"
+msgstr ""
-#: lib/libalpm/add.c:604
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
#, c-format
-msgid "original: %s"
-msgstr "eredeti: %s"
+msgid "could not extract %s (%s)\n"
+msgstr "nem sikerlt kitmrteni: %s (%s)\n"
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
+#: lib/libalpm/add.c:505
+#, fuzzy, c-format
+msgid "could not rename %s (%s)\n"
msgstr "nem sikerlt tnevezni: %s (%s)"
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "hiba: nem sikerlt tnevezni: %s (%s)"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
+#, fuzzy, c-format
+msgid "could not copy tempfile to %s (%s)\n"
msgstr "nem sikerlt az ideiglenes fjlt ide msolni: %s (%s)"
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "hiba: nem sikerlt az ideiglenes fjlt ide msolni: %s (%s)"
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
+#, fuzzy, c-format
+msgid "%s saved as %s\n"
msgstr "a %s elmentve %s nven"
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "figyelmeztets: a %s elmentve %s nven"
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "folyamat: j fjl teleptse: %s"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "folyamat: a jelenlegi fjl megtartsa"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-"folyamat: a jelenlegi fjl megtartsa s az j .pacnew vgzdssel val "
-"teleptse"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
+#: lib/libalpm/add.c:556
+#, fuzzy, c-format
+msgid "could not install %s as %s: %s\n"
msgstr "nem sikerlt telepteni a %s-t %s-knt: %s"
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "hiba: nem sikerlt telepteni a %s-t %s-knt: %s"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
+#: lib/libalpm/add.c:559
+#, fuzzy, c-format
+msgid "%s installed as %s\n"
msgstr "a %s %s nven lett teleptve"
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "figyelmeztets: a %s nven %s lett teleptve"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s a NoUpgrade-ben van -- kihagys"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
+#: lib/libalpm/add.c:576
+#, fuzzy, c-format
+msgid "extracting %s as %s.pacnew\n"
msgstr "%s kitmrtse %s.pacnew nven"
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "figyelmeztets: %s kitmrtse %s.pacnew nven"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "a %s kitmrtse"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "hiba: nem sikerlt kitmrteni: %s (%s)"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr ""
-
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
-msgstr "hiba %s kzben: %s"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "frissts"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "telepts"
-
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr ""
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr ""
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+#, fuzzy
+msgid "could not get current working directory\n"
+msgstr "a jelenlegi munkaknyvtr nem kaphat meg"
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "az adatbzis frisstse"
+#: lib/libalpm/add.c:765
+#, fuzzy, c-format
+msgid "problem occurred while upgrading %s\n"
+msgstr "hiba trtnt a(z) %s frisstse kzben"
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "adatbzis mez hozzadsa '%s'"
+#: lib/libalpm/add.c:770
+#, fuzzy, c-format
+msgid "problem occurred while installing %s\n"
+msgstr "hiba trtnt a(z) %s teleptse kzben"
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
+#: lib/libalpm/add.c:785
+#, fuzzy, c-format
+msgid "could not update database entry %s-%s\n"
msgstr "sikertelen a '%s-%s' adatbzis-bejegyzs frisstse"
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
+#: lib/libalpm/add.c:793
+#, fuzzy, c-format
+msgid "could not add entry '%s' in cache\n"
msgstr "sikertelen a '%s' bejegyzs hozzadsa a gyorsttrhoz"
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "az \"ldconfig -r %s\" futtatsa"
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr ""
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr "adatbzis eltvoltsa: '%s'"
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "adatbzis bezrsa: '%s'"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-"j szerver hozzadsa a(z) '%s' adatbzishoz: protokoll '%s', szerver '%s', "
-"t '%s'"
-
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "a szerverlista rtve a(z) '%s' szmra"
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr ""
-"nem sikerlt megkapni az utols mdostsi idpontjt a kvetkeznek: %s "
-"(nincs sok esly)"
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "nem sikerlt szinkronizlni a(z) '%s' adatbzist [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr "sikertelen a %s%s adatbzis-bejegyzs eltvoltsa"
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "sikertelen az sha1 ellenrz sszeg elrse a %s-%s csomag szmra"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "a %s-%s csomag sha1 ellenrz sszegei megegyeznek"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "%s-%s csomag sha1 ellenrz sszegei nem egyeznek meg"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "sikertelen az md5 ellenrz sszeg elrse a %s-%s csomag szmra"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "a %s-%s csomag md5 ellenrz sszegei megegyeznek"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "%s-%s csomag md5 ellenrz sszegei nem egyeznek meg"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "nem sikerlt a zrol fjl (%s) eltvoltsa"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "figyelmeztets: nem sikerlt a zrol fjl (%s) eltvoltsa"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "belltsok: j szekci '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr "belltsok: nopassiveftp"
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr "belltsok: usesyslog"
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr "belltsok: chomp"
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr "belltsok: usecolor"
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr "belltsok: a %s beolvassa"
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr "belltsok: noupgrade: %s"
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr "belltsok: noextract: %s"
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr "belltsok: ignorepkg: %s"
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr "belltsok: holdpkg: %s"
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr "belltsok: adatbzistvonal: %s"
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr "belltsok: gyorsttrknyvtr: %s"
-
-#: lib/libalpm/alpm.c:1044
+#: lib/libalpm/be_files.c:223
#, fuzzy, c-format
-msgid "config: rootdir: %s"
-msgstr "belltsok: gyorsttrknyvtr: %s"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr "belltsok: naplfjl: %s"
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr "belltsok: xfercommand: %s"
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr "belltsok: frissts ksleltetse: %d"
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "csomagcserk ellenrzse"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "csere vizsglata: '%s' -> '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s: frissts figyelmen kvl hagysa (a %s-%s fogja lecserlni)"
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr "a %s-%s kivlasztva frisstsre (a %s-%s fogja lecserlni)"
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr "a '%s' nem tallhat a tvoli adatbzisban -- kihagys"
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr "a '%s' mr kijellve eltvoltsra -- kihagys"
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr "a(z) %s kivlasztva frisstsre (%s => %s)"
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "a(z) '%s' adatbzis kitmrtse"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr ""
-
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
-msgstr ""
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
+msgid "invalid name for database entry '%s'\n"
msgstr "rvnytelen nv a '%s' adatbzis-bejegyzs szmra"
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr "az _alpm_db_read nem rvnyes csomag bejegyzst kapott, kihagys"
-
-#: lib/libalpm/be_files.c:226
-#, c-format
-msgid ""
-"request to read database info for a file-based package '%s', skipping..."
-msgstr ""
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
-msgstr ""
-
-#: lib/libalpm/be_files.c:247
-#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr "nem tallhat '%s-%s' a(z) '%s' adatbzisban"
+#: lib/libalpm/be_files.c:275
+#, fuzzy, c-format
+msgid "loading package data for %s : level=%d\n"
+msgstr "a(z) %s csomag adatainak betltse : szint=%d"
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
+#, fuzzy, c-format
+msgid "could not open file %s: %s\n"
msgstr "nem sikerlt megnyitni a %s fjlt: %s"
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr ""
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr ""
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr ""
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr "csomaggyorsttr betltse '%s' rep szmra"
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
+#: lib/libalpm/cache.c:62
+#, fuzzy, c-format
+msgid "adding '%s' to package cache for db '%s'\n"
msgstr "a(z) '%s' csomag hozzadsa a(z) '%s' adatbzis csomaggyorsttrhoz"
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr "csomaggyorsttr felszabadtsa a '%s' rep szmra"
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr "a '%s' bejegyzs hozzadsa a '%s' gyorsttrhoz"
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr "a '%s' bejegyzs eltvoltsa a '%s' gyorsttrbl"
-
-#: lib/libalpm/cache.c:156
-#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr ""
-"nem sikerlt a '%s' bejegyzs eltvoltsa a '%s' gyorsttrbl: nem "
-"tallhat"
-
-#: lib/libalpm/cache.c:178
-#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr ""
-
-#: lib/libalpm/cache.c:201
-#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr "csoportgyorsttr betltse a '%s' rep szmra"
-
-#: lib/libalpm/conflict.c:69
-#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:78
-#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
-#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr "a(z) '%s' csomag tkzik sajt magval - csomag hiba"
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr "checkconflicts: cl '%s' vs db"
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr "checkconflicts: cl '%s' vs sszes cl"
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr "checkconflicts: db vs cl '%s'"
-
-#: lib/libalpm/conflict.c:201
-#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr ""
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr ""
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr "malloc problma: nem sikerlt alloklni %d byte-ot"
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr "malloc problma: nem sikerlt alloklni %d byte-ot"
+#: lib/libalpm/db.c:285
+#, fuzzy, c-format
+msgid "could not remove database entry %s%s\n"
+msgstr "sikertelen a %s%s adatbzis-bejegyzs eltvoltsa"
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
+#: lib/libalpm/db.c:553
+#, fuzzy
+msgid "attempt to re-register the 'local' DB\n"
msgstr "ksrlet a 'local' adatbzis jraregisztrlsra"
-#: lib/libalpm/db.c:175
-#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr ""
-"ksrlet a(z) '%s' adatbzis jraregisztrlsra, a jelenlegi hasznlata"
-
-#: lib/libalpm/db.c:181
-#, c-format
-msgid "registering database '%s'"
-msgstr "adatbzis regisztrlsa: '%s'"
-
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr "'%s' adatbzis-knyvtr nem ltezik, ltrehozs"
-
-#: lib/libalpm/db.c:197
-#, c-format
-msgid "opening database '%s'"
-msgstr "adatbzis megnyitsa: '%s'"
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr "a fggsgek rendezse elkezddtt"
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+#, fuzzy
+msgid "database path is undefined\n"
+msgstr "az adatbzis-tvonal nincs megadva"
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr "lehetsges krkrs fggsgi problma szlelve"
+#: lib/libalpm/deps.c:173
+#, fuzzy
+msgid "dependency cycle detected:\n"
+msgstr "krkrs fggsg szlelve\n"
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr "a fggsgek rendezse befejezdtt"
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr ""
-
-#: lib/libalpm/deps.c:230
-#, c-format
-msgid "cannot find package installed '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:261
-#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:280
+#: lib/libalpm/deps.c:175
#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-#: lib/libalpm/deps.c:289
-#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
-msgstr "checkdeps: a frisstett '%s' nem elgti ki '%s' egy fggsgt"
-
-#: lib/libalpm/deps.c:359
-#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr "hinyz '%s' fggsg a '%s' csomagnl"
-
-#: lib/libalpm/deps.c:409
-#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr "checkdeps: a %s ignyelt a %s ltal"
-
-#: lib/libalpm/deps.c:485
-#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr "a %s kihagysa -- explicit mdon lett teleptve"
-
-#: lib/libalpm/deps.c:532
-#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
-msgstr "nem tallhat a \"%s\" csomag s nem is szolgltatja semmi!"
-
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "adding '%s' to the targets"
-msgstr "a '%s' hozzadsa a clcsomagokhoz"
-
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
-msgstr "a fggsgek rendezse elkezddtt"
-
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
-msgstr "a %s szolgltatja a %s fggsget -- kihagys"
-
-#: lib/libalpm/deps.c:630
-#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-"nem sikerlt a fggsgek feloldsa a \"%s\" szmra (nem tallhat a \"%s\" "
-"a csomagok kztt)"
-
-#: lib/libalpm/deps.c:647
-#, c-format
-msgid "dependency %s is already in the target list -- skipping"
-msgstr "a %s fggsg mr a clcsomagok kztt szerepel -- kihagys"
-#: lib/libalpm/deps.c:667
-#, c-format
-msgid "pulling dependency %s (needed by %s)"
-msgstr "a %s fggsg behozsa (a %s ignyli)"
-
-#: lib/libalpm/deps.c:671
-#, c-format
-msgid "cannot resolve dependencies for \"%s\""
+#: lib/libalpm/deps.c:573
+#, fuzzy, c-format
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "nem sikerlt feloldani a fggsgeket a \"%s\" szmra"
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr "krkrs fggsg szlelve: %s"
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr "a fggsgek rendezse elkezddtt"
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr "elfogyott a memria!"
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr "nemvrt hiba"
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr "elgtelen jogosultsgok"
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr "nem tallhat vagy nem olvashat a fjl"
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+#, fuzzy
+msgid "could not find or read directory"
+msgstr "nem tallhat vagy nem olvashat a fjl"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr "rossz vagy NULL argumentum rkezett"
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr "a knyvtr nem inicializlt"
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr "a knyvtr mr inicializlt"
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr "nem sikerlt zrolni az adatbzist"
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "nem sikerlt megnyitni az adatbzist"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "nem sikerlt ltrehozni az adatbzist"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "az adatbzis nem inicializlt"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "az adatbzis mr regisztrlt"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "nem tallhat az adatbzis"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "nem sikerlt megnyitni az adatbzist"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "nem sikerlt eltvoltani az adatbzis-bejegyzst"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr "rvnytelen url"
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr "nem sikerlt belltani a paramtert"
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr "a tranzakci mr inicializlt"
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr "a tranzakci nem inicializlt"
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr "kt azonos clcsomag"
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr "a tranzakci nincs elksztve"
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr "a tranzakci flbeszaktva"
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr "a mvelet nem egyeztethet ssze a jelenlegi tranzakcitpussal"
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr "nem sikerlt commitolni a tranzakcit"
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr "nem sikerlt letlteni az sszes fjlt"
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr "nem tallhat vagy nem olvashat a csomag"
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr "nem rvnyes vagy srlt csomag"
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr "nem sikerlt megnyitni a csomagfjlt"
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr "nem sikerlt betlteni a csomagadatokat"
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr "a csomag mr teleptve van"
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr "a csomag nincs teleptve vagy kisebb verzij"
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr "nem sikerlt eltvoltani a csomag sszes fjljt"
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "nem rvnyes a csomagnv"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr "srlt csomag"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr "nincs ilyen rep"
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+#, fuzzy
+msgid "corrupted delta"
+msgstr "srlt csomag"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr ""
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "a csoport nem tallhat"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr "nem sikerlt kielgteni a fggsgeket"
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr "tkz fggsgek"
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr "tkz fjlok"
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr "felhasznli megszakts"
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "bels hiba"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr "libarchive hiba"
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "nincs elg hely"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr "nem megerstett"
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr ""
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr "a 'local' nv fenntartott s nem hasznlhat repnvknt"
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr "szintaktikai hiba a belltsfjlban"
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr "minden direktvnak egy szekcihoz kell tartoznia"
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "rvnytelen regulris kifejezs"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr "nem sikerlt csatlakozni a tvoli gphez"
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "nemvrt hiba"
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr ""
-
-#: lib/libalpm/handle.c:175
-#, c-format
-msgid "option 'root' = %s"
-msgstr ""
-
-#: lib/libalpm/handle.c:195
-#, c-format
-msgid "option 'dbpath' = %s"
-msgstr ""
-
-#: lib/libalpm/handle.c:211
-#, c-format
-msgid "option 'cachedir' = %s"
-msgstr ""
-
-#: lib/libalpm/md5driver.c:56
-#, c-format
-msgid "%s can't be opened\n"
-msgstr "nem sikerlt megnyitni a kvetkezt: %s\n"
-
-#: lib/libalpm/md5driver.c:74
-#, c-format
-msgid "md5(%s) = %s"
-msgstr ""
+#: lib/libalpm/package.c:124
+#, fuzzy, c-format
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "sikertelen az md5 ellenrz sszeg elrse a %s-%s csomag szmra"
-#: lib/libalpm/package.c:147
-#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr "%s-%s: a csomagfrissts figyelmen kvl hagysa (%s)"
+#: lib/libalpm/package.c:133
+#, fuzzy, c-format
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "%s-%s csomag md5 ellenrz sszegei nem egyeznek meg"
-#: lib/libalpm/package.c:158
-#, c-format
-msgid "%s: forcing upgrade to version %s"
+#: lib/libalpm/package.c:737
+#, fuzzy, c-format
+msgid "%s: forcing upgrade to version %s\n"
msgstr "%s: erltetett frissts a %s verzira"
-#: lib/libalpm/package.c:163
-#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
+#: lib/libalpm/package.c:742
+#, fuzzy, c-format
+msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%s: a helyi (%s) jabb, mint %s (%s)"
-#: lib/libalpm/package.c:171
-#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
+#: lib/libalpm/package.c:750
+#, fuzzy, c-format
+msgid "%s-%s: delaying upgrade of package (%s)\n"
msgstr "%s-%s: a csomag frisstsnek ksleltetse (%s)"
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
-#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr "%s: szintaktikai hiba a lerfjl %d. sorban"
-
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
+#: lib/libalpm/package.c:931
+#, fuzzy, c-format
+msgid "could not parse package description file in %s\n"
msgstr "nem sikerlt rtelmezni a csomagler fjlt"
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
+#: lib/libalpm/package.c:936
+#, fuzzy, c-format
+msgid "missing package name in %s\n"
msgstr "hinyz csomagnv itt: %s"
-#: lib/libalpm/package.c:363
-#, c-format
-msgid "missing package version in %s"
+#: lib/libalpm/package.c:940
+#, fuzzy, c-format
+msgid "missing package version in %s\n"
msgstr "hinyz csomagverzi itt: %s"
-#: lib/libalpm/package.c:398
-#, c-format
-msgid "could not remove tempfile %s"
+#: lib/libalpm/package.c:970
+#, fuzzy, c-format
+msgid "could not remove tempfile %s\n"
msgstr "nem sikerlt eltvoltani a %s ideiglenes fjlt"
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
+#, fuzzy, c-format
+msgid "error while reading package %s: %s\n"
msgstr "hiba a csomag olvassa kzben: %s"
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
-msgstr ""
-
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
-msgstr ""
-
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr ""
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr ""
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr "nem tallhat a %s az adatbzisban"
+#: lib/libalpm/package.c:1005
+#, fuzzy, c-format
+msgid "missing package metadata in %s\n"
+msgstr "hinyz csomaginformcis fjl"
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
-msgstr "a %s hozzadsa a cllisthoz"
+#: lib/libalpm/package.c:1012
+#, fuzzy, c-format
+msgid "missing package filelist in %s, generating one\n"
+msgstr "hinyzik a(z) %s csomag fjllistja, generls"
#: lib/libalpm/remove.c:121
-#, c-format
-msgid "pulling %s in the targets list"
-msgstr "a %s behozsa a cllistba"
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
+#, fuzzy, c-format
+msgid "could not find %s in database -- skipping\n"
msgstr "nem tallhat a %s az adatbzisban -- kihagys"
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr "eltvolthat fggsgek keresse"
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
+#, fuzzy, c-format
+msgid "cannot remove file '%s': %s\n"
msgstr "nem sikerlt eltvoltani a '%s' fjlt : %s"
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr "A '%s' trlsnek kihagysa a NoUpgrade miatt"
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "a %s fjl nemltezik"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "a %s knyvtr megtartsa"
+#: lib/libalpm/remove.c:337
+#, fuzzy, c-format
+msgid "could not remove database entry %s-%s\n"
+msgstr "nem sikerlt eltvoltani a %s-%s adatbzis-bejegyzst"
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "a %s knyvtr trlse"
+#: lib/libalpm/remove.c:342
+#, fuzzy, c-format
+msgid "could not remove entry '%s' from cache\n"
+msgstr "nem sikerlt eltvoltani a '%s' bejegyzst a gyorsttrbl"
-#: lib/libalpm/remove.c:236
+#: lib/libalpm/server.c:56
#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
+msgid "url '%s' is invalid, ignoring\n"
msgstr ""
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
msgstr ""
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr "a %s trlse"
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr "nem sikerlt eltvoltani a %s fjlt: %s"
+#: lib/libalpm/server.c:241
+msgid "disk"
+msgstr ""
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr "a %s-%s csomag eltvoltsa"
+#: lib/libalpm/server.c:245
+#, fuzzy, c-format
+msgid "failed retrieving file '%s' from %s : %s\n"
+msgstr "nem sikerlt nhny fjlt letlteni innen: %s\n"
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
msgstr ""
-"nem tvoltom el a(z) '%s' csomagot, nem tudom eltvoltani az sszes fjlt"
-#: lib/libalpm/remove.c:316
-#, c-format
-msgid "removing %d files"
-msgstr "%d fjl trlse"
-
-#: lib/libalpm/remove.c:337
-#, c-format
-msgid "removing database entry '%s'"
-msgstr "a '%s' adatbzis-bejegyzs eltvoltsa"
+#: lib/libalpm/server.c:288
+#, fuzzy, c-format
+msgid "cannot write to file '%s'\n"
+msgstr "nem sikerlt eltvoltani a '%s' fjlt : %s"
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
-msgstr "nem sikerlt eltvoltani a %s-%s adatbzis-bejegyzst"
+#: lib/libalpm/server.c:307
+#, fuzzy, c-format
+msgid "error downloading '%s': %s\n"
+msgstr "hiba a csomag olvassa kzben: %s"
-#: lib/libalpm/remove.c:344
-#, c-format
-msgid "could not remove entry '%s' from cache"
-msgstr "nem sikerlt eltvoltani a '%s' bejegyzst a gyorsttrbl"
+#: lib/libalpm/server.c:319
+#, fuzzy, c-format
+msgid "error writing to file '%s': %s\n"
+msgstr "nem sikerlt eltvoltani a '%s' fjlt : %s"
-#: lib/libalpm/sha1.c:397
-#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr "sha2: nem sikerlt megnyitni a kvetkezt: %s\n"
+#: lib/libalpm/server.c:387
+#, fuzzy, c-format
+msgid "could not chdir to %s\n"
+msgstr "nem sikerlt a knyvtrat a /-re vltani (%s)"
-#: lib/libalpm/sha1.c:412
-#, c-format
-msgid "sha1(%s) = %s"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
msgstr ""
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
-msgstr "csomagfrisstsek vizsglata"
-
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
-msgstr "a(z) %s-%s kivlasztva frisstsre (%s => %s)"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
+msgstr ""
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
-msgstr "cl keresse a '%s' repban"
+#: lib/libalpm/server.c:458
+#, fuzzy, c-format
+msgid "failed to download %s\n"
+msgstr "nem sikerlt letlteni az sszes fjlt"
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
-#, c-format
-msgid "target '%s' not found -- looking for provisions"
-msgstr "a(z) '%s' cl nem tallhat - szolglatk keresse"
+#: lib/libalpm/sync.c:135
+#, fuzzy, c-format
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
+msgstr "%s-%s: frissts figyelmen kvl hagysa (a %s-%s fogja lecserlni)"
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr "a(z) '%s' szolgltatja a(z) '%s' csomagot"
+#: lib/libalpm/sync.c:250
+#, fuzzy, c-format
+msgid "%s: ignoring package upgrade (%s => %s)\n"
+msgstr "%s-%s: a csomagfrissts figyelmen kvl hagysa (%s)"
-#: lib/libalpm/sync.c:290
-#, c-format
-msgid "repository '%s' not found"
+#: lib/libalpm/sync.c:320
+#, fuzzy, c-format
+msgid "repository '%s' not found\n"
msgstr "a(z) '%s' rep nem tallhat"
-#: lib/libalpm/sync.c:331
-#, c-format
-msgid "%s-%s is up to date -- skipping"
-msgstr "a(z) %s-%s napraksz -- kihagys"
-
#: lib/libalpm/sync.c:354
-#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr "a '%s' hozzadsa a tranzakcihoz"
-
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr "a clok fggsgeinek feloldsa"
-
-#: lib/libalpm/sync.c:422
-#, c-format
-msgid "adding package %s-%s to the transaction targets"
-msgstr "a '%s-%s' hozzadsa a clcsomagokhoz"
-
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
-msgstr "elgtelen fggsgek keresse"
-
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "a(z) '%s' csomag tkzik a(z) '%s' csomaggal"
-
-#: lib/libalpm/sync.c:516
-#, c-format
-msgid "'%s' not found in transaction set -- skipping"
-msgstr "a '%s' nem tallhat a tranzakciban -- kihagys"
-
-#: lib/libalpm/sync.c:527
-#, c-format
-msgid "package '%s' provides its own conflict"
-msgstr "a(z) '%s' csomag sajt magval tkzik"
-
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
-#, c-format
-msgid "'%s' is in the target list -- keeping it"
-msgstr "a(z) '%s' mr a cl listban -- megtarts"
-
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
-#, c-format
-msgid "removing '%s' from target list"
-msgstr "a(z) '%s' bejegyzs eltvoltsa a cllistbl"
-
-#: lib/libalpm/sync.c:576
-#, c-format
-msgid "resolving package '%s' conflict"
-msgstr "konfliktus feloldsa a(z) '%s' csomag szmra"
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "a(z) %s-%s napraksz -- kihagys"
-#: lib/libalpm/sync.c:599
-#, c-format
-msgid "electing '%s' for removal"
-msgstr "a(z) '%s' kivlasztsa eltvoltsra"
+#: lib/libalpm/sync.c:358
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- reinstalling\n"
+msgstr "a(z) %s-%s napraksz -- kihagys"
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+#, fuzzy
+msgid "unresolvable package conflicts detected\n"
msgstr "feloldhatatlan csomagtkzsek"
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr "az eltvoltand csomagok fggsgeinek ellenrzse"
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr "valami nagyon rosszul ment"
-
-#: lib/libalpm/sync.c:712
-#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
-msgstr "a(z) '%s' szolgltatja a(z) '%s' csomagot - konfliktus flbeszaktva"
-
-#: lib/libalpm/sync.c:808
-#, c-format
-msgid "%s is already in the cache\n"
-msgstr "%s mr a gyorsttrban\n"
-
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
-msgstr "nem ltezik a(z) %s gyorsttr. ltrehozs...\n"
-
-#: lib/libalpm/sync.c:820
-#, c-format
-msgid "warning: no %s cache exists, creating..."
-msgstr "figyelmeztets: a(z) %s gyorsttr nem ltezik. ltrehozs..."
+#: lib/libalpm/sync.c:628
+#, fuzzy, c-format
+msgid "malloc failure: could not allocate %zd bytes\n"
+msgstr "malloc problma: nem sikerlt alloklni %d byte-ot"
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr "nem sikerlt ltrehozni a csomag gyorsttrat, a /tmp hasznlata\n"
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr ""
-"figyelmeztets: nem sikerlt ltrehozni a csomag gyorsttrat, a /tmp "
-"hasznlata"
-
-#: lib/libalpm/sync.c:833
#, c-format
-msgid "failed to retrieve some files from %s\n"
-msgstr "nem sikerlt nhny fjlt letlteni innen: %s\n"
+msgid "command: %s\n"
+msgstr ""
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
+#, fuzzy, c-format
+msgid "can't get md5 checksum for file %s\n"
msgstr ""
"sikertelen az md5 vagy sha1 ellenrz sszeg elrse a %s csomag szmra\n"
-#: lib/libalpm/sync.c:894
-#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
+#: lib/libalpm/sync.c:910
+#, fuzzy, c-format
+msgid "file %s was corrupted (bad MD5 checksum)\n"
msgstr "a(z) %s archvum srlt volt (rossz MD5 vagy SHA1 szumma)\n"
-#: lib/libalpm/sync.c:896
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "a(z) %s archvum srlt (rossz MD5 vagy SHA1 szumma)\n"
+msgid "failed to retrieve some files from %s\n"
+msgstr "nem sikerlt nhny fjlt letlteni innen: %s\n"
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
+#: lib/libalpm/sync.c:1137
+#, fuzzy
+msgid "could not create removal transaction\n"
msgstr "nem sikerlt ltrehozni az eltvoltsi tranzakcit"
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
+#: lib/libalpm/sync.c:1143
+#, fuzzy
+msgid "could not initialize the removal transaction\n"
msgstr "nem sikerlt inicializlni az eltvoltsi tranzakcit"
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr "az tkz s lecserlend csomagok eltvoltsa"
-
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
+#: lib/libalpm/sync.c:1165
+#, fuzzy
+msgid "could not prepare removal transaction\n"
msgstr "nem sikerlt ltrehozni az eltvoltsi tranzakcit"
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
+#: lib/libalpm/sync.c:1171
+#, fuzzy
+msgid "could not commit removal transaction\n"
msgstr "nem sikerlt commitolni az eltvolt tranzakcit"
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr "csomagok teleptse"
-
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
+#: lib/libalpm/sync.c:1182
+#, fuzzy
+msgid "could not create transaction\n"
msgstr "nem sikerlt ltrehozni a tranzakcit"
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
+#: lib/libalpm/sync.c:1187
+#, fuzzy
+msgid "could not initialize transaction\n"
msgstr "nem sikerlt inicializlni a tranzakcit"
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
+#: lib/libalpm/sync.c:1214
+#, fuzzy
+msgid "could not prepare transaction\n"
msgstr "nem sikerlt elkszteni a tranzakcit"
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
-msgstr "a lecserlt csomagok fggsgeinek frisstse az adatbzisban"
-
-#: lib/libalpm/sync.c:1030
-#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr "sikertelen a %s-%s 'fgg tle' adatbzis-bejegyzsnek frisstse"
+#: lib/libalpm/sync.c:1219
+#, fuzzy
+msgid "could not commit transaction\n"
+msgstr "nem sikerlt commitolni a tranzakcit"
-#: lib/libalpm/sync.c:1039
-#, c-format
-msgid "could not update new database entry %s-%s"
-msgstr "sikertelen a '%s-%s' adatbzis-bejegyzs frisstse"
+#: lib/libalpm/trans.c:214
+#, fuzzy, c-format
+msgid "could not remove lock file %s\n"
+msgstr "nem sikerlt a zrol fjl (%s) eltvoltsa"
-#: lib/libalpm/sync.c:1079
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "found package '%s-%s' in sync"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
msgstr ""
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr "a '%s' csomag nem tallhat a tvoli adatbzisban"
+#: lib/libalpm/trans.c:494
+#, fuzzy
+msgid "could not create temp directory\n"
+msgstr "nem sikerlt ltrehozni az ideiglenes knyvtrat"
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr ""
+#: lib/libalpm/trans.c:536
+#, fuzzy, c-format
+msgid "could not change directory to %s (%s)\n"
+msgstr "nem sikerlt a(z) %s knyvtrba vltani (%s)"
+
+#: lib/libalpm/trans.c:554
+#, fuzzy, c-format
+msgid "could not fork a new process (%s)\n"
+msgstr "nem sikerlt forkolni egy j folyamatot (%s)"
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
-msgstr "a csomagnak nincsenek fggsgei, nincs tbb frisstend csomag"
+#: lib/libalpm/trans.c:564
+#, fuzzy, c-format
+msgid "could not change the root directory (%s)\n"
+msgstr "nem sikerlt a gykrknyvtrba vltani (%s)"
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr "a '%s' csomag 'fgg tle' mezjnek frisstse"
+#: lib/libalpm/trans.c:569
+#, fuzzy, c-format
+msgid "could not change directory to / (%s)\n"
+msgstr "nem sikerlt a knyvtrat a /-re vltani (%s)"
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
-#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
-msgstr "sikertelen a %s-%s 'fgg tle' adatbzis-bejegyzsnek frisstse"
+#: lib/libalpm/trans.c:578
+#, fuzzy, c-format
+msgid "call to popen failed (%s)"
+msgstr "a waitpid hvs sikertelen (%s)"
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr "nem tallhat a '%s' fggsg"
+#: lib/libalpm/trans.c:597
+#, fuzzy, c-format
+msgid "call to waitpid failed (%s)\n"
+msgstr "a waitpid hvs sikertelen (%s)"
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
+msgstr ""
+
+#: lib/libalpm/trans.c:615
+#, fuzzy, c-format
+msgid "could not remove tmpdir %s\n"
+msgstr "nem sikerlt eltvoltani a %s ideiglenes knyvtrat"
+
+#: lib/libalpm/util.c:204
+#, fuzzy, c-format
+msgid "failed to make path '%s' : %s\n"
msgstr "nem sikerlt a '%s' tvonal ltrehozsa: %s"
-#: lib/libalpm/util.c:280
+#: lib/libalpm/util.c:389
#, c-format
msgid "could not open %s: %s\n"
msgstr "nem sikerlt megnyitni a %s fjlt: %s\n"
-#: lib/libalpm/util.c:293
+#: lib/libalpm/util.c:573
#, c-format
-msgid "could not extract %s: %s\n"
-msgstr "nem sikerlt a(z) %s-t kitmrteni: %s\n"
+msgid "no %s cache exists, creating...\n"
+msgstr "nem ltezik a(z) %s gyorsttr. ltrehozs...\n"
-#: lib/libalpm/util.c:350
+#: lib/libalpm/util.c:593
+#, fuzzy
+msgid "couldn't create package cache, using /tmp instead\n"
+msgstr "nem sikerlt ltrehozni a csomag gyorsttrat, a /tmp hasznlata"
+
+#: lib/libalpm/util.c:643
#, c-format
-msgid "logaction called: %s"
-msgstr ""
+msgid "md5: %s can't be opened\n"
+msgstr "md5: nem sikerlt megnyitni a kvetkezt: %s\n"
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
-msgstr "nem sikerlt ltrehozni az ideiglenes knyvtrat"
+#: lib/libalpm/util.c:645
+#, fuzzy, c-format
+msgid "md5: %s can't be read\n"
+msgstr "md5: nem sikerlt megnyitni a kvetkezt: %s\n"
-#: lib/libalpm/util.c:472
-#, c-format
-msgid "could not change directory to %s (%s)"
-msgstr "nem sikerlt a(z) %s knyvtrba vltani (%s)"
+#~ msgid "please remove '%s' first, using -Rd"
+#~ msgstr "krem elszr tvoltsa el '%s'-t a -Rd kapcsolt hasznlva"
-#: lib/libalpm/util.c:476
-#, c-format
-msgid "executing %s script..."
-msgstr "a(z) %s script vgrehajtsa..."
+#~ msgid "could not extract %s (%s)"
+#~ msgstr "nem sikerlt kitmrteni: %s (%s)"
-#: lib/libalpm/util.c:489
-#, c-format
-msgid "could not fork a new process (%s)"
-msgstr "nem sikerlt forkolni egy j folyamatot (%s)"
+#~ msgid "%s: description file is missing"
+#~ msgstr "%s: hinyz csomagler fjl"
-#: lib/libalpm/util.c:496
-#, c-format
-msgid "chrooting in %s"
-msgstr "chrootols a kvetkez knyvtrba: %s"
+#~ msgid "%s: dependency file is missing"
+#~ msgstr "%s: hinyz csomagfggsg fjl"
-#: lib/libalpm/util.c:498
-#, c-format
-msgid "could not change the root directory (%s)"
-msgstr "nem sikerlt a gykrknyvtrba vltani (%s)"
+#~ msgid "%s: file list is missing"
+#~ msgstr "%s: hinyz fjllista"
-#: lib/libalpm/util.c:502
-#, c-format
-msgid "could not change directory to / (%s)"
-msgstr "nem sikerlt a knyvtrat a /-re vltani (%s)"
+#~ msgid "malloc failed: could not allocate %d bytes"
+#~ msgstr "malloc problma: nem sikerlt alloklni %d byte-ot"
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
-msgstr "a(z) %s vgrehajtsa"
+#~ msgid ""
+#~ "cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+#~ msgstr ""
+#~ "nem sikerlt a fggsgek feloldsa a \"%s\" szmra (nem tallhat a \"%s"
+#~ "\" a csomagok kztt)"
-#: lib/libalpm/util.c:509
-#, c-format
-msgid "call to popen failed (%s)"
-msgstr "a popen hvs sikertelen (%s)"
+#~ msgid "cannot canonicalize specified root path '%s'"
+#~ msgstr "nem sikerlt rtelmezni a megadott gykrknyvtr-tvonalat: '%s'"
-#: lib/libalpm/util.c:541
-#, c-format
-msgid "call to waitpid failed (%s)"
-msgstr "a waitpid hvs sikertelen (%s)"
+#~ msgid "could not get sha1sum for package %s-%s"
+#~ msgstr "sikertelen az sha1 ellenrz sszeg elrse a %s-%s csomag szmra"
-#: lib/libalpm/util.c:550
-#, c-format
-msgid "could not remove tmpdir %s"
-msgstr "nem sikerlt eltvoltani a %s ideiglenes knyvtrat"
+#~ msgid "sha1sums do not match for package %s-%s"
+#~ msgstr "%s-%s csomag sha1 ellenrz sszegei nem egyeznek meg"
-#: lib/libalpm/util.c:568
-#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr ""
+#~ msgid "cannot remove file %s: %s"
+#~ msgstr "nem sikerlt eltvoltani a %s fjlt: %s"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
-msgstr "check_freespace: teljes csomagmret: %lld, lemezterlet: %lld"
+#~ msgid "sha1: %s can't be opened\n"
+#~ msgstr "sha2: nem sikerlt megnyitni a kvetkezt: %s\n"
-#: lib/libalpm/versioncmp.c:279
-#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr ""
+#~ msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
+#~ msgstr "a(z) %s archvum srlt (rossz MD5 vagy SHA1 szumma)\n"
-#: lib/libalpm/versioncmp.c:284
-#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr ""
+#~ msgid "could not update requiredby for database entry %s-%s"
+#~ msgstr "sikertelen a %s-%s 'fgg tle' adatbzis-bejegyzsnek frisstse"
+
+#~ msgid "could not update new database entry %s-%s"
+#~ msgstr "sikertelen a '%s-%s' adatbzis-bejegyzs frisstse"
+
+#~ msgid "could not update 'requiredby' database entry %s-%s"
+#~ msgstr "sikertelen a %s-%s 'fgg tle' adatbzis-bejegyzsnek frisstse"
diff --git a/lib/libalpm/po/it.po b/lib/libalpm/po/it.po
index 557e4f24..aaf85633 100644
--- a/lib/libalpm/po/it.po
+++ b/lib/libalpm/po/it.po
@@ -9,1569 +9,691 @@ msgid ""
msgstr ""
"Project-Id-Version: libalpm VERSION\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
-"PO-Revision-Date: 2007-04-17 22:00+0100\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
+"PO-Revision-Date: 2007-11-08 20:30+0100\n"
"Last-Translator: Giovanni Scafora <linuxmania@gmail.com>\n"
"Language-Team: Arch Linux Italian Team <linuxmania@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bitPlural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/libalpm/add.c:77
+#: lib/libalpm/add.c:88
#, c-format
-msgid "loading target '%s'"
-msgstr "caricamento del pacchetto '%s' in corso"
+msgid "replacing older version %s-%s by %s in target list\n"
+msgstr "sostituzione in corso della vecchia versione di %s-%s con %s\n"
-#: lib/libalpm/add.c:122
+#: lib/libalpm/add.c:97
#, c-format
-msgid "replacing older version %s-%s by %s in target list"
-msgstr "sostituzione in corso della vecchia versione %s-%s con %s"
+msgid "newer version %s-%s is in the target list -- skipping\n"
+msgstr "la versione di %s-%s è più recente e sarà ignorata\n"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
-msgstr "la versione di %s-%s è più recente e sarà ignorato"
-
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "lettura dei metadata di '%s' in corso"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "ricerca delle dipendenze non soddisfatte"
-
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "ricerca dei conflitti in corso"
-
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
-msgstr "la sostituzione dei pacchetti con -A e -U non è ancora supportata"
-
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "Si consiglia di rimuovere prima '%s', usando -Rd"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "ordinamento per dipendenze in corso"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "pulizia in corso"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "ricerca dei conflitti tra file in corso"
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "aggiornamento del pacchetto %s-%s in corso"
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "inclusione del pacchetto %s-%s in corso"
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "rimozione del vecchio pacchetto (%s-%s) in corso"
-
-#: lib/libalpm/add.c:411
-#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr "aggiunta temporanea di %s nell'array NoUpgrade in corso"
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "estrazione dei file in corso"
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "impossibile ottenere la directory corrente"
-
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
-#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s è in NoExtract, estrazione ignorata"
-
-#: lib/libalpm/add.c:508
-#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
-msgstr "%s è in trans->skip_add, estrazione ignorata"
-
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
-msgstr "impossibile estrarre %s (%s)"
-
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "controllo dell'hash md5 di %s"
-
-#: lib/libalpm/add.c:600
-#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "controllo dell'hash sha1 di %s"
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr "attuale: %s"
-
-#: lib/libalpm/add.c:603
-#, c-format
-msgid "new: %s"
-msgstr "nuovo: %s"
-
-#: lib/libalpm/add.c:604
-#, c-format
-msgid "original: %s"
-msgstr "originale: %s"
-
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
-msgstr "impossibile rinominare %s (%s)"
-
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "errore: impossibile rinominare %s (%s)"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
-msgstr "impossibile copiare il file temporaneo in %s (%s)"
-
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "errore: impossibile copiare il file temporaneo in %s (%s)"
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
-msgstr "%s salvato come %s"
-
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "attenzione: %s salvato come %s"
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "azione: installazione del nuovo file %s in corso"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "azione: il file non è stato spostato"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
msgstr ""
-"azione: il file attuale non è stato spostato e sarà installato un nuovo file "
-"con il suffisso .pacnew"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
-msgstr "impossibile installare %s come %s: %s"
-
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "errore: impossibile installare %s come %s: %s"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
-msgstr "%s installato come %s"
-
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "attenzione: %s installato come %s"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s è in NoUpgrade e sarà ignorato"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
-msgstr "estrazione di %s come %s.pacnew"
-
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "attenzione: estrazione in corso di %s come %s.pacnew"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "estrazione di %s in corso"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "errore: impossibile estrarre %s (%s)"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr "aggiunta in corso della voce di backup per %s"
-
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
-msgstr "si sono verificati degli errori durante %s %s"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "l'aggiornamento"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "l'installazione"
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr "'%s' è stato rimosso dal pacchetto %s (%s => %s)"
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr "aggiornamento in corso di '%s' dovuto ad un cambiamento (%s)"
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr "impossibile aggiornare '%s' da '%s'"
-
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "aggiornamento del database in corso"
-
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "inclusione della voce '%s' nel database"
-
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
-msgstr "impossibile aggiornare la voce %s-%s nel database"
-
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
-msgstr "impossible includere la voce '%s' nella cache"
-
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "esecuzione in corso di \"ldconfig -r %s\""
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr "rimozione in corso del DB %s, %d restante..."
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr "cancellazione del database '%s' in corso"
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "chiusura del database '%s' in corso"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
msgstr ""
-"inclusione di un nuovo server nel database '%s': protocollo '%s', server '%"
-"s', path '%s'"
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "svuotata la lista dei server per '%s'"
+#: lib/libalpm/add.c:172
+msgid "replacing packages with -A and -U is not supported yet\n"
+msgstr "la sostituzione dei pacchetti con -A e -U non è ancora supportata\n"
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
msgstr ""
-"impossibile recuperare la data dell'ultimo aggiornamento di %s (nulla di "
-"grave)"
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "impossibile sincronizzare il database: %s [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr "sync: nuovo mtime per %s: %s"
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr "pulizia del database %s%s"
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr "impossibile rimuovere la voce %s%s dal database"
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "impossibile recuperare la somma sha1 del pacchetto %s-%s"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "la somma sha1 del pacchetto %s-%s corrisponde"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "la somma sha1 del pacchetto %s-%s non corrisponde"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "impossibile recuperare la somma md5 del pacchetto %s-%s"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "la somma md5 del pacchetto %s-%s corrisponde"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "la somma md5 del pacchetto %s-%s non corrisponde"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "impossibile rimuovere il file di lock %s"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "attenzione: impossibile rimuovere il file di lock %s"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "config: nuova sezione '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr "config: nopassiveftp"
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr "config: usesyslog"
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr "config: chomp"
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr "config: usecolor"
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr "config: including %s"
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr "config: noupgrade: %s"
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr "config: noextract:·%s"
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr "config: ignorepkg: %s"
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr "config: holdpkg: %s"
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr "config: dbpath: %s"
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr "config: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1044
-#, c-format
-msgid "config: rootdir: %s"
-msgstr "config: rootdir: %s"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr "config: logfile: %s"
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr "config: xfercommand: %s"
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr "config: upgradedelay: %d"
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "controllo della sostituzione dei pacchetti in corso"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "controllo in corso della sostituzione di '%s' con il pacchetto '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr ""
-"%s-%s: aggiornamento del pacchetto ignorato (per essere sostituito con %s-%s)"
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr ""
-"%s-%s selezionato per l'aggiornamento (per essere sostituito con %s-%s)"
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr "impossibile trovare '%s' nel database, sarà ignorato"
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr "'%s' è già selezionato per la rimozione, sarà ignorato"
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr "%s selezionato per l'aggiornamento (%s => %s)"
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "estrazione del database '%s' in corso"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr "apertura in corso del database dal path '%s'"
-
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
-msgstr "impossibile trovare il pacchetto: %s"
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
-msgstr "nome non valido per la voce del database '%s'"
-
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr ""
-"nome non valido per il pacchetto fornito a _alpm_db_read, sarà ignorato"
-
-#: lib/libalpm/be_files.c:226
+#: lib/libalpm/add.c:365
#, c-format
msgid ""
-"request to read database info for a file-based package '%s', skipping..."
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
msgstr ""
-"richiesta di lettura del database per un pacchetto file-based '%s', sarà "
-"ignorata..."
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
-msgstr "caricamento in corso dei dati del pacchetto %s : livello=%d"
-
-#: lib/libalpm/be_files.c:247
-#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr "impossibile trovare '%s-%s' nel database '%s'"
-
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
-msgstr "impossibile aprire il file %s: %s"
-
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr "scrittura in corso del campo DESC di %s-%s nel database"
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr "scrittura in corso del campo FILES di %s-%s nel database"
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr "scrittura in corso del campo DEPENDS di %s-%s nel database"
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr "caricamento in corso della cache del pacchetto per il repository '%s'"
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
-msgstr "aggiunta di '%s' alla cache del pacchetto per il database '%s'"
-
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr "pulizia in corso della cache dei pacchetti per il repository '%s'"
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr "errore: pkgcache è NULL per il database '%s'"
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr "inclusione della voce '%s' nella cache di '%s'"
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr "rimozione della voce '%s' dalla cache di '%s'"
+"i permessi delle directory differiscono su %s\n"
+"filesystem: %o pacchetto: %o\n"
-#: lib/libalpm/cache.c:156
+#: lib/libalpm/add.c:392
#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr "impossibile rimuovere '%s' dalla cache di '%s': non trovato"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr "estrazione: il link simbolico %s non punta alla directory\n"
-#: lib/libalpm/cache.c:178
+#: lib/libalpm/add.c:399
#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr "errore: impossibile prelevare '%s' da pkgcache NULL"
+msgid "extract: not overwriting dir with file %s\n"
+msgstr "estrazione: non sovrascrivere la directory con il file %s\n"
-#: lib/libalpm/cache.c:201
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr "caricamento della cache del gruppo per il repository '%s'"
+msgid "could not extract %s (%s)\n"
+msgstr "impossibile estrarre %s (%s)\n"
-#: lib/libalpm/conflict.c:69
+#: lib/libalpm/add.c:505
#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr " trovato il conflitto '%s' : pacchetto '%s'"
+msgid "could not rename %s (%s)\n"
+msgstr "impossibile rinominare %s (%s)\n"
-#: lib/libalpm/conflict.c:78
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr " trovato il conflitto '%s' : il pacchetto '%s' fornisce '%s'"
+msgid "could not copy tempfile to %s (%s)\n"
+msgstr "impossibile copiare il file temporaneo in %s (%s)\n"
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr ""
-"il pacchetto '%s' va in conflitto con se stesso - errore di pacchettizzazione"
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr "checkconflicts: target '%s' vs db"
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr "checkconflicts: target '%s' vs all targets"
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr "checkconflicts: db vs target '%s'"
+msgid "%s saved as %s\n"
+msgstr "%s salvato come %s\n"
-#: lib/libalpm/conflict.c:201
+#: lib/libalpm/add.c:556
#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr "il pacchetto '%s' è già presente nella lista, usando nuovi conflitti"
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr "\tCONFLITTI:: %s va in conflitto con %s"
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr "malloc failure: impossibile allocare %d byte"
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr "malloc failed: impossibile allocare %d byte"
-
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
-msgstr "tentativo in corso di registrare di nuovo il database 'locale'"
+msgid "could not install %s as %s: %s\n"
+msgstr "impossibile installare %s come %s: %s\n"
-#: lib/libalpm/db.c:175
+#: lib/libalpm/add.c:559
#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr ""
-"tentativo in corso di registrare di nuovo il database '%s', usando quello "
-"esistente"
+msgid "%s installed as %s\n"
+msgstr "%s installato come %s\n"
-#: lib/libalpm/db.c:181
+#: lib/libalpm/add.c:576
#, c-format
-msgid "registering database '%s'"
-msgstr "registrazione del database '%s'"
+msgid "extracting %s as %s.pacnew\n"
+msgstr "estrazione di %s come %s.pacnew\n"
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr "la directory '%s' del database non esiste e sarà creata"
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+msgid "could not get current working directory\n"
+msgstr "impossibile ottenere la directory corrente\n"
-#: lib/libalpm/db.c:197
+#: lib/libalpm/add.c:765
#, c-format
-msgid "opening database '%s'"
-msgstr "apertura del database '%s' in corso"
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr "avvio dell'ordinamento delle dipendenze"
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr "individuato un possibile ciclo di dipendenze"
+msgid "problem occurred while upgrading %s\n"
+msgstr "si sono verificati degli errori durante l'aggiornamento di %s\n"
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr "ordinamento delle dipendenze terminato"
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr "è stato trovato un pacchetto vuoto nella lista"
-
-#: lib/libalpm/deps.c:230
+#: lib/libalpm/add.c:770
#, c-format
-msgid "cannot find package installed '%s'"
-msgstr "impossibile trovare il pacchetto installato '%s'"
+msgid "problem occurred while installing %s\n"
+msgstr "si sono verificati degli errori durante l'installazione di %s\n"
-#: lib/libalpm/deps.c:261
+#: lib/libalpm/add.c:785
#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr "checkdeps: la dipendenza '%s' è stata spostata da '%s' a '%s'"
+msgid "could not update database entry %s-%s\n"
+msgstr "impossibile aggiornare la voce %s-%s nel database\n"
-#: lib/libalpm/deps.c:280
+#: lib/libalpm/add.c:793
#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
-msgstr "checkdeps: dipendenza '%s' soddisfatta dal pacchetto '%s'"
+msgid "could not add entry '%s' in cache\n"
+msgstr "impossible includere la voce '%s' nella cache\n"
-#: lib/libalpm/deps.c:289
+#: lib/libalpm/be_files.c:223
#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
-msgstr ""
-"checkdeps: il pacchetto aggiornato di '%s' non soddisfa una dipendenza di '%"
-"s'"
+msgid "invalid name for database entry '%s'\n"
+msgstr "nome non valido per la voce del database '%s'\n"
-#: lib/libalpm/deps.c:359
+#: lib/libalpm/be_files.c:275
#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr "manca la dipendenza '%s' richiesta dal pacchetto '%s'"
+msgid "loading package data for %s : level=%d\n"
+msgstr "caricamento in corso dei dati del pacchetto %s : livello=%d\n"
-#: lib/libalpm/deps.c:409
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr "checkdeps: trovato %s come richiesto da %s"
+msgid "could not open file %s: %s\n"
+msgstr "impossibile aprire il file %s: %s\n"
-#: lib/libalpm/deps.c:485
+#: lib/libalpm/cache.c:62
#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr "esclusione di %s in corso, installato esplicitamente"
+msgid "adding '%s' to package cache for db '%s'\n"
+msgstr "aggiunta di '%s' alla cache del pacchetto per il database '%s'\n"
-#: lib/libalpm/deps.c:532
+#: lib/libalpm/db.c:285
#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
-msgstr "impossibile trovare il pacchetto \"%s\" o qualcosa che lo fornisca!"
+msgid "could not remove database entry %s%s\n"
+msgstr "impossibile rimuovere la voce %s%s dal database\n"
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
-#, c-format
-msgid "adding '%s' to the targets"
-msgstr "inclusione in corso di '%s' nei pacchetti"
+#: lib/libalpm/db.c:553
+msgid "attempt to re-register the 'local' DB\n"
+msgstr "tentativo in corso di registrare di nuovo il database 'locale'\n"
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
-msgstr "avvio risoluzione delle dipendenze"
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+msgid "database path is undefined\n"
+msgstr "il percorso del database non è definito\n"
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
-msgstr "%s fornisce la dipendenza %s, sarà ignorato"
+#: lib/libalpm/deps.c:173
+#, fuzzy
+msgid "dependency cycle detected:\n"
+msgstr "individuato un possibile ciclo di dipendenze\n"
-#: lib/libalpm/deps.c:630
+#: lib/libalpm/deps.c:175
#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-"impossibile risolvere le dipendenze per \"%s\" (\"%s\" non è presente nella "
-"lista dei pacchetti)"
-#: lib/libalpm/deps.c:647
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "dependency %s is already in the target list -- skipping"
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-"la dipendenza %s è già presente nella lista dei pacchetti e sarà ignorata"
-#: lib/libalpm/deps.c:667
+#: lib/libalpm/deps.c:573
#, c-format
-msgid "pulling dependency %s (needed by %s)"
-msgstr "aggiunta la dipendenza %s (richiesta da %s)"
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
+msgstr "impossibile risolvere \"%s\", una dipendenza di \"%s\"\n"
-#: lib/libalpm/deps.c:671
-#, c-format
-msgid "cannot resolve dependencies for \"%s\""
-msgstr "impossibile risolvere le dipendenze per \"%s\""
-
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr "individuato un possibile ciclo di dipendenze: %s"
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr "risoluzione delle dipendenze terminata"
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr "memoria insufficiente!"
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
-msgstr "errore di sistema"
+msgstr "errore di sistema inaspettato"
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr "privilegi insufficienti"
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr "impossibile trovare o leggere il file"
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+msgid "could not find or read directory"
+msgstr "impossibile trovare o leggere la directory"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr "è stato passato un argomento sbagliato o NULL"
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr "libreria non inizializzata"
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr "libreria già inizializzata"
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr "impossibile bloccare il database"
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "impossibile aprire il database"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "impossibile creare il database"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "database non inizializzato"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "il database è già registrato"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "impossibile trovare il database"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "impossibile aggiornare il database"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "impossibile rimuovere la voce dal database"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr "url non valido per il server"
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr "impossibile impostare il parametro"
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr "operazione già inizializzata"
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr "operazione non inizializzata"
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr "pacchetto doppio"
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr "operazione non preparata"
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr "operazione annullata"
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr "operazione incompatibile con il tipo di transazione"
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr "impossibile eseguire l'operazione"
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr "impossibile prelevare tutti i file"
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr "impossibile trovare o leggere il pacchetto"
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr "pacchetto non valido o corrotto"
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr "impossibile aprire il pacchetto"
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr "impossibile caricare i dati del pacchetto"
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr "pacchetto già installato"
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr "pacchetto non installato o una versione precedente"
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr "impossibile rimuovere tutti i file del pacchetto"
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "il nome del pacchetto non è valido"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr "pacchetto corrotto"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr "nessun repository corrispondente"
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+msgid "corrupted delta"
+msgstr "il delta è corrotto"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr "si sono verificati degli errori con la patch di delta"
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "gruppo non trovato"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr "impossibile soddisfare le dipendenze"
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr "dipendenze in conflitto"
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr "file in conflitto"
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr "operazione annullata"
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "errore interno"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr "errore di libarchive"
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "spazio sul disco insufficiente"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr "non confermato"
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr "errore nel nome della sezione di configurazione"
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr "'local' è riservato e non può essere usato come nome di un repository"
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr "errore di sintassi nel file di configurazione"
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr "tutte le direttive devono appartenere a una sezione"
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "espressione regolare non valida"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr "impossibile stabilire una connessione con l'host remoto"
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "errore inaspettato"
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr "impossibile canonicalizzare il path di root specificato '%s'"
-
-#: lib/libalpm/handle.c:175
+#: lib/libalpm/package.c:124
#, c-format
-msgid "option 'root' = %s"
-msgstr "opzione 'root' = %s"
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "impossibile recuperare la somma md5 del pacchetto %s-%s\n"
-#: lib/libalpm/handle.c:195
+#: lib/libalpm/package.c:133
#, c-format
-msgid "option 'dbpath' = %s"
-msgstr "opzione 'dbpath' = %s"
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "la somma md5 del pacchetto %s-%s non corrisponde\n"
-#: lib/libalpm/handle.c:211
+#: lib/libalpm/package.c:737
#, c-format
-msgid "option 'cachedir' = %s"
-msgstr "opzione 'cachedir' = %s"
+msgid "%s: forcing upgrade to version %s\n"
+msgstr "%s: aggiornamento forzato alla versione %s\n"
-#: lib/libalpm/md5driver.c:56
+#: lib/libalpm/package.c:742
#, c-format
-msgid "%s can't be opened\n"
-msgstr "impossibile aprire %s\n"
+msgid "%s: local (%s) is newer than %s (%s)\n"
+msgstr "%s: la versione installata (%s) è più recente di %s (%s)\n"
-#: lib/libalpm/md5driver.c:74
+#: lib/libalpm/package.c:750
#, c-format
-msgid "md5(%s) = %s"
-msgstr "md5(%s) = %s"
+msgid "%s-%s: delaying upgrade of package (%s)\n"
+msgstr "%s-%s: ritardo durante l'aggiornamento del pacchetto (%s)\n"
-#: lib/libalpm/package.c:147
+#: lib/libalpm/package.c:931
#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr "%s-%s: aggiornamento del pacchetto (%s) ignorato"
+msgid "could not parse package description file in %s\n"
+msgstr "impossibile analizzare il file di descrizione del pacchetto in %s\n"
-#: lib/libalpm/package.c:158
+#: lib/libalpm/package.c:936
#, c-format
-msgid "%s: forcing upgrade to version %s"
-msgstr "%s: aggiornamento forzato alla versione %s"
+msgid "missing package name in %s\n"
+msgstr "manca il nome del pacchetto in %s\n"
-#: lib/libalpm/package.c:163
+#: lib/libalpm/package.c:940
#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
-msgstr "%s: la versione installata (%s) è più recente di %s (%s)"
+msgid "missing package version in %s\n"
+msgstr "manca la versione del pacchetto in %s\n"
-#: lib/libalpm/package.c:171
+#: lib/libalpm/package.c:970
#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
-msgstr "%s-%s: ritardo durante l'aggiornamento del pacchetto (%s)"
+msgid "could not remove tempfile %s\n"
+msgstr "impossibile rimuovere il file temporaneo %s\n"
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr "%s: errore di sintassi nel file di descrizione alla linea %d"
+msgid "error while reading package %s: %s\n"
+msgstr "si è verificato un errore durante la lettura del pacchetto %s: %s\n"
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
-msgstr "impossibile analizzare il file di descrizione del pacchetto"
-
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
-msgstr "manca il nome del pacchetto in %s"
-
-#: lib/libalpm/package.c:363
+#: lib/libalpm/package.c:1005
#, c-format
-msgid "missing package version in %s"
-msgstr "manca la versione del pacchetto in %s"
+msgid "missing package metadata in %s\n"
+msgstr "manca il metadata del pacchetto in %s\n"
-#: lib/libalpm/package.c:398
+#: lib/libalpm/package.c:1012
#, c-format
-msgid "could not remove tempfile %s"
-msgstr "impossibile rimuovere il file temporaneo %s"
-
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
-msgstr "si è verificato un errore durante la lettura del pacchetto: %s"
-
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
-msgstr "manca il metadata del pacchetto"
-
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
-msgstr "manca il filelist nel pacchetto %s, creazione in corso"
-
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr "inclusione di '%s' nel campo 'richiesto da' di '%s'"
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr "inclusione di '%s' nel campo 'richiesto da' di '%s' (fornisce: %s)"
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr "impossibile trovare %s nel database"
-
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
-msgstr "aggiunta in corso di %s nella lista dei pacchetti"
+msgid "missing package filelist in %s, generating one\n"
+msgstr "manca il filelist nel pacchetto %s, creazione in corso\n"
#: lib/libalpm/remove.c:121
#, c-format
-msgid "pulling %s in the targets list"
-msgstr "estrazione in corso di %s nella lista dei pacchetti"
+msgid "could not find %s in database -- skipping\n"
+msgstr "impossibile trovare %s nel database, sarà ignorato\n"
-#: lib/libalpm/remove.c:124
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
#, c-format
-msgid "could not find %s in database -- skipping"
-msgstr "impossibile trovare %s nel database, sarà ignorato"
-
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr "ricerca delle dipendenze eliminabili"
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
-msgstr "impossibile rimuovere il file '%s': %s"
-
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr "rimozione di '%s' ignorata dovuta a NoUpgrade"
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "il file %s non esiste"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "conservazione in corso della directory %s"
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "rimozione in corso della directory %s"
-
-#: lib/libalpm/remove.c:236
-#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr "%s è in trans->skip_remove, rimozione ignorata"
-
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
-msgstr "operazione impostata su NOSAVE, nessun backup di '%s'"
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr "rimozione di %s in corso"
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr "impossibile rimuovere il file %s: %s"
-
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr "rimozione in corso del pacchetto %s-%s"
-
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
-msgstr "impossibile rimuovere il pacchetto '%s' e tutti i file"
-
-#: lib/libalpm/remove.c:316
-#, c-format
-msgid "removing %d files"
-msgstr "rimozione in corso di %d file"
+msgid "cannot remove file '%s': %s\n"
+msgstr "impossibile rimuovere il file '%s': %s\n"
#: lib/libalpm/remove.c:337
#, c-format
-msgid "removing database entry '%s'"
-msgstr "rimozione in corso della voce '%s' dal database"
-
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
-msgstr "impossibile rimuovere la voce %s-%s dal database"
-
-#: lib/libalpm/remove.c:344
-#, c-format
-msgid "could not remove entry '%s' from cache"
-msgstr "impossibile rimuovere '%s' dalla cache"
+msgid "could not remove database entry %s-%s\n"
+msgstr "impossibile rimuovere la voce %s-%s dal database\n"
-#: lib/libalpm/sha1.c:397
+#: lib/libalpm/remove.c:342
#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr "sha1: impossibile aprire %s\n"
+msgid "could not remove entry '%s' from cache\n"
+msgstr "impossibile rimuovere la voce '%s' dalla cache\n"
-#: lib/libalpm/sha1.c:412
+#: lib/libalpm/server.c:56
#, c-format
-msgid "sha1(%s) = %s"
-msgstr "sha1(%s) = %s"
-
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
-msgstr "ricerca dei pacchetti da aggiornare in corso"
-
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
-msgstr "%s-%s selezionato per l'aggiornamento (%s => %s)"
-
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
-msgstr "ricerca in corso del pacchetto nel repository '%s'"
+msgid "url '%s' is invalid, ignoring\n"
+msgstr ""
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
-#, c-format
-msgid "target '%s' not found -- looking for provisions"
-msgstr "pacchetto '%s' non trovato, ricerca delle alternative in corso"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
+msgstr ""
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr "trovato '%s' come alternativa a '%s'"
+#: lib/libalpm/server.c:241
+msgid "disk"
+msgstr ""
-#: lib/libalpm/sync.c:290
-#, c-format
-msgid "repository '%s' not found"
-msgstr "impossibile trovare il repository '%s'"
+#: lib/libalpm/server.c:245
+#, fuzzy, c-format
+msgid "failed retrieving file '%s' from %s : %s\n"
+msgstr "impossibile recuperare alcuni file da %s\n"
-#: lib/libalpm/sync.c:331
-#, c-format
-msgid "%s-%s is up to date -- skipping"
-msgstr "%s-%s è aggiornato, sarà ignorato"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
+msgstr ""
-#: lib/libalpm/sync.c:354
-#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr "aggiunta in corso del pacchetto '%s'"
+#: lib/libalpm/server.c:288
+#, fuzzy, c-format
+msgid "cannot write to file '%s'\n"
+msgstr "impossibile rimuovere il file '%s': %s\n"
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr "risoluzione in corso delle dipendenze dei pacchetti"
+#: lib/libalpm/server.c:307
+#, fuzzy, c-format
+msgid "error downloading '%s': %s\n"
+msgstr "si è verificato un errore durante la lettura del pacchetto %s: %s\n"
-#: lib/libalpm/sync.c:422
-#, c-format
-msgid "adding package %s-%s to the transaction targets"
-msgstr "aggiunta in corso del pacchetto %s-%s"
+#: lib/libalpm/server.c:319
+#, fuzzy, c-format
+msgid "error writing to file '%s': %s\n"
+msgstr "impossibile rimuovere il file '%s': %s\n"
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
-msgstr "ricerca in corso delle dipendenze irrisolvibili"
+#: lib/libalpm/server.c:387
+#, fuzzy, c-format
+msgid "could not chdir to %s\n"
+msgstr "impossibile spostarsi nella directory / (%s)\n"
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "il pacchetto '%s' va in conflitto con '%s'"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
+msgstr ""
-#: lib/libalpm/sync.c:516
-#, c-format
-msgid "'%s' not found in transaction set -- skipping"
-msgstr "impossibile trovare '%s', sarà ignorato"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
+msgstr ""
-#: lib/libalpm/sync.c:527
-#, c-format
-msgid "package '%s' provides its own conflict"
-msgstr "il pacchetto '%s' fornisce il suo stesso conflitto"
+#: lib/libalpm/server.c:458
+#, fuzzy, c-format
+msgid "failed to download %s\n"
+msgstr "impossibile prelevare tutti i file"
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
+#: lib/libalpm/sync.c:135
#, c-format
-msgid "'%s' is in the target list -- keeping it"
-msgstr "'%s' è nella lista dei pacchetti e sarà conservato"
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
+msgstr ""
+"%s-%s: aggiornamento del pacchetto ignorato (per essere sostituito con %s-%"
+"s)\n"
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
-#, c-format
-msgid "removing '%s' from target list"
-msgstr "rimozione in corso di '%s' dalla lista dei pacchetti"
+#: lib/libalpm/sync.c:250
+#, fuzzy, c-format
+msgid "%s: ignoring package upgrade (%s => %s)\n"
+msgstr "%s-%s: aggiornamento del pacchetto (%s) ignorato\n"
-#: lib/libalpm/sync.c:576
+#: lib/libalpm/sync.c:320
#, c-format
-msgid "resolving package '%s' conflict"
-msgstr "risoluzione in corso del conflitto del pacchetto '%s'"
+msgid "repository '%s' not found\n"
+msgstr "impossibile trovare il repository '%s'\n"
-#: lib/libalpm/sync.c:599
+#: lib/libalpm/sync.c:354
#, c-format
-msgid "electing '%s' for removal"
-msgstr "selezionato '%s' per la rimozione"
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "%s-%s è aggiornato, sarà ignorato\n"
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
-msgstr "sono stati rilevati dei conflitti irrisolvibili"
+#: lib/libalpm/sync.c:358
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- reinstalling\n"
+msgstr "%s-%s è aggiornato, sarà ignorato\n"
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr ""
-"controllo in corso delle dipendenze dei pacchetti designati per la rimozione"
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr "qualcosa è andato orribilmente storto"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+msgid "unresolvable package conflicts detected\n"
+msgstr "sono stati rilevati dei conflitti irrisolvibili\n"
-#: lib/libalpm/sync.c:712
+#: lib/libalpm/sync.c:628
#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
-msgstr "trovato '%s' come alternativa a '%s', conflitto annullato"
+msgid "malloc failure: could not allocate %zd bytes\n"
+msgstr "malloc failure: impossibile allocare %zd byte\n"
-#: lib/libalpm/sync.c:808
+#: lib/libalpm/sync.c:825
#, c-format
-msgid "%s is already in the cache\n"
-msgstr "%s è già presente nella cache\n"
+msgid "command: %s\n"
+msgstr "comando: %s\n"
-#: lib/libalpm/sync.c:819
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
#, c-format
-msgid "no %s cache exists, creating...\n"
-msgstr "la cache di %s non esiste, creazione in corso...\n"
+msgid "can't get md5 checksum for file %s\n"
+msgstr "impossibile recuperare il checksum md5 del file %s\n"
-#: lib/libalpm/sync.c:820
+#: lib/libalpm/sync.c:910
#, c-format
-msgid "warning: no %s cache exists, creating..."
-msgstr "attenzione: la cache di %s non esiste, creazione in corso..."
+msgid "file %s was corrupted (bad MD5 checksum)\n"
+msgstr "il file %s è corrotto (MD5 errato)\n"
-#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr ""
-"impossibile creare la cache del pacchetto, al suo posto sarà usata /tmp\n"
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr ""
-"attenzione: impossibile creare la cache del pacchetto, al suo posto sarà "
-"usata /tmp"
-
-#: lib/libalpm/sync.c:833
+#: lib/libalpm/sync.c:1056
#, c-format
msgid "failed to retrieve some files from %s\n"
msgstr "impossibile recuperare alcuni file da %s\n"
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
-msgstr "impossibile recuperare il checksum md5 o sha1 del pacchetto %s\n"
-
-#: lib/libalpm/sync.c:894
-#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "archivio %s era corrotto (MD5 o SHA1 checksum errato)\n"
-
-#: lib/libalpm/sync.c:896
-#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "archivio %s è corrotto (MD5 o SHA1 checksum errato)\n"
-
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
-msgstr "impossibile avviare l'operazione di rimozione"
+#: lib/libalpm/sync.c:1137
+msgid "could not create removal transaction\n"
+msgstr "impossibile avviare l'operazione di rimozione\n"
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
-msgstr "impossibile inizializzare l'operazione di rimozione"
+#: lib/libalpm/sync.c:1143
+msgid "could not initialize the removal transaction\n"
+msgstr "impossibile inizializzare l'operazione di rimozione\n"
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr "rimozione in corso dei pacchetti in conflitto e da sostituire"
+#: lib/libalpm/sync.c:1165
+msgid "could not prepare removal transaction\n"
+msgstr "impossibile preparare l'operazione di rimozione\n"
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
-msgstr "impossibile preparare l'operazione di rimozione"
+#: lib/libalpm/sync.c:1171
+msgid "could not commit removal transaction\n"
+msgstr "impossibile eseguire l'operazione di rimozione\n"
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
-msgstr "impossibile eseguire l'operazione di rimozione"
+#: lib/libalpm/sync.c:1182
+msgid "could not create transaction\n"
+msgstr "impossibile avviare l'operazione\n"
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr "installazione dei pacchetti in corso"
+#: lib/libalpm/sync.c:1187
+msgid "could not initialize transaction\n"
+msgstr "impossibile inizializzare l'operazione\n"
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
-msgstr "impossibile avviare l'operazione"
+#: lib/libalpm/sync.c:1214
+msgid "could not prepare transaction\n"
+msgstr "impossibile preparare l'operazione\n"
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
-msgstr "impossibile inizializzare l'operazione"
+#: lib/libalpm/sync.c:1219
+msgid "could not commit transaction\n"
+msgstr "impossibile eseguire l'operazione\n"
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
-msgstr "impossibile preparare l'operazione"
-
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
-msgstr ""
-"aggiornamento in corso del database per le dipendenze dei pacchetti "
-"sostituiti"
-
-#: lib/libalpm/sync.c:1030
-#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr ""
-"impossibile aggiornare il campo 'richiesto da' per la voce del database %s-%s"
-
-#: lib/libalpm/sync.c:1039
-#, c-format
-msgid "could not update new database entry %s-%s"
-msgstr "impossibile aggiornare la nuova voce del database %s-%s"
-
-#: lib/libalpm/sync.c:1079
-#, c-format
-msgid "found package '%s-%s' in sync"
-msgstr "trovato il pacchetto '%s-%s' nel database"
-
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr "impossibile trovare il pacchetto '%s'"
-
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr "aggiornamento delle dipendenze nei campi 'richiesto da' di %s-%s"
-
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
-msgstr "il pacchetto non ha dipendenze, nessun altro pacchetto da aggiornare"
-
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr "aggiornamento in corso del campo 'richiesto da' del pacchetto '%s'"
-
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
-#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
-msgstr "impossibile aggiornare la voce 'richiesto da' del database %s-%s"
-
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr "impossibile trovare la dipendenza '%s'"
-
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
-msgstr "impossibile creare il path '%s' : %s"
-
-#: lib/libalpm/util.c:280
-#, c-format
-msgid "could not open %s: %s\n"
-msgstr "impossibile aprire %s: %s\n"
-
-#: lib/libalpm/util.c:293
+#: lib/libalpm/trans.c:214
#, c-format
-msgid "could not extract %s: %s\n"
-msgstr "impossibile estrarre %s: %s\n"
+msgid "could not remove lock file %s\n"
+msgstr "impossibile rimuovere il file di lock %s\n"
-#: lib/libalpm/util.c:350
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "logaction called: %s"
-msgstr "logaction chiamata: %s"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
+msgstr ""
+"/bin/sh non è presente nella root directory (%s), lo scriptlet sarà "
+"interrotto\n"
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
-msgstr "impossibile creare la directory temporanea"
+#: lib/libalpm/trans.c:494
+msgid "could not create temp directory\n"
+msgstr "impossibile creare la directory temporanea\n"
-#: lib/libalpm/util.c:472
+#: lib/libalpm/trans.c:536
#, c-format
-msgid "could not change directory to %s (%s)"
-msgstr "impossibile spostarsi nella directory %s (%s)"
+msgid "could not change directory to %s (%s)\n"
+msgstr "impossibile spostarsi nella directory %s (%s)\n"
-#: lib/libalpm/util.c:476
+#: lib/libalpm/trans.c:554
#, c-format
-msgid "executing %s script..."
-msgstr "esecuzione dello script %s in corso..."
+msgid "could not fork a new process (%s)\n"
+msgstr "impossibile effettuare il fork di un nuovo processo (%s)\n"
-#: lib/libalpm/util.c:489
+#: lib/libalpm/trans.c:564
#, c-format
-msgid "could not fork a new process (%s)"
-msgstr "impossibile effettuare il fork di un nuovo processo (%s)"
+msgid "could not change the root directory (%s)\n"
+msgstr "impossibile cambiare la root directory (%s)\n"
-#: lib/libalpm/util.c:496
+#: lib/libalpm/trans.c:569
#, c-format
-msgid "chrooting in %s"
-msgstr "chroot in corso nella directory %s"
+msgid "could not change directory to / (%s)\n"
+msgstr "impossibile spostarsi nella directory / (%s)\n"
-#: lib/libalpm/util.c:498
+#: lib/libalpm/trans.c:578
#, c-format
-msgid "could not change the root directory (%s)"
-msgstr "impossibile cambiare la root directory (%s)"
+msgid "call to popen failed (%s)"
+msgstr "chiamata a popen non riuscita (%s)"
-#: lib/libalpm/util.c:502
+#: lib/libalpm/trans.c:597
#, c-format
-msgid "could not change directory to / (%s)"
-msgstr "impossibile spostarsi nella directory / (%s)"
+msgid "call to waitpid failed (%s)\n"
+msgstr "chiamata a waitpid non riuscita (%s)\n"
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
-msgstr "esecuzione in corso di \"%s\""
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
+msgstr "L'esecuzione dello scriptlet non è riuscita correttamente\n"
-#: lib/libalpm/util.c:509
+#: lib/libalpm/trans.c:615
#, c-format
-msgid "call to popen failed (%s)"
-msgstr "chiamata a popen non riuscita (%s)"
+msgid "could not remove tmpdir %s\n"
+msgstr "impossibile rimuovere la directory temporanea %s\n"
-#: lib/libalpm/util.c:541
+#: lib/libalpm/util.c:204
#, c-format
-msgid "call to waitpid failed (%s)"
-msgstr "chiamata a waitpid non riuscita (%s)"
+msgid "failed to make path '%s' : %s\n"
+msgstr "impossibile seguire il percorso '%s' : %s\n"
-#: lib/libalpm/util.c:550
+#: lib/libalpm/util.c:389
#, c-format
-msgid "could not remove tmpdir %s"
-msgstr "impossibile rimuovere la directory temporanea %s"
+msgid "could not open %s: %s\n"
+msgstr "impossibile aprire %s: %s\n"
-#: lib/libalpm/util.c:568
+#: lib/libalpm/util.c:573
#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr "impossibile leggere le informazioni dello spazio del disco da %s: %s"
+msgid "no %s cache exists, creating...\n"
+msgstr "la cache di %s non esiste, creazione in corso...\n"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
+#: lib/libalpm/util.c:593
+msgid "couldn't create package cache, using /tmp instead\n"
msgstr ""
-"check_freespace: dimensione totale dei pacchetti: %lld, spazio disponibile: %"
-"lld"
+"impossibile creare la cache del pacchetto, al suo posto sarà usata /tmp\n"
-#: lib/libalpm/versioncmp.c:279
+#: lib/libalpm/util.c:643
#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr "depcmp: %s-%s %s %s-%s => %s"
+msgid "md5: %s can't be opened\n"
+msgstr "md5: impossibile aprire %s\n"
-#: lib/libalpm/versioncmp.c:284
+#: lib/libalpm/util.c:645
#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr "depcmp: %s-%s %s %s => %s"
-
-#~ msgid "%s saved as %s.pacorig"
-#~ msgstr "%s salvato come %s.pacorig"
+msgid "md5: %s can't be read\n"
+msgstr "md5: impossibile leggere %s\n"
-#~ msgid "notice: %s is in NoExtract -- skipping extraction"
-#~ msgstr "avviso: %s è in NoExtract -- estrazione ignorata"
+#~ msgid "please remove '%s' first, using -Rd\n"
+#~ msgstr "Si consiglia di rimuovere prima '%s', usando l'opzione -Rd\n"
-#~ msgid "loading package cache (infolevel=%#x) for repository '%s'"
-#~ msgstr ""
-#~ "caricamento della cache del pacchetto (infolevel=%#x) per il repository '%"
-#~ "s'"
+#~ msgid "cannot resolve dependencies for \"%s\"\n"
+#~ msgstr "impossibile risolvere le dipendenze per \"%s\"\n"
-#~ msgid "package cache reloaded (infolevel=%#x) for repository '%s'"
+#~ msgid "could not update requiredby for database entry %s-%s\n"
#~ msgstr ""
-#~ "ricaricamento della cache del pacchetto (infolevel=%#x) per il repository "
-#~ "'%s'"
-
-#~ msgid "targs vs db: found %s as a conflict for %s"
-#~ msgstr "target vs db: trovato %s come conflitto per %s"
-
-#~ msgid "targs vs targs: found %s as a conflict for %s"
-#~ msgstr "targs vs targs: trovato %s come conflitto per %s"
-
-#~ msgid "db vs targs: found %s as a conflict for %s"
-#~ msgstr "db vs targs: trovato %s come conflitto per %s"
-
-#~ msgid "no dependencies for target '%s'"
-#~ msgstr "nessuna dipendenza richiesta dal pacchetto '%s'"
-
-#~ msgid "could not parse token %s"
-#~ msgstr "impossibile analizzare il simbolo %s"
-
-#~ msgid "compare versions for %s: %s vs %s, result=%d"
-#~ msgstr "confronto delle versioni di %s: %s vs %s, risultato=%d"
-
-#~ msgid "%s-%s: ignoring package upgrade (%s => %s)"
-#~ msgstr "%s-%s: aggiornamento del pacchetto (%s => %s) ignorato"
-
-#~ msgid "db scan found package: %s"
-#~ msgstr "trovato il pacchetto: %s"
+#~ "impossibile aggiornare il campo richiesto da per la voce del database %s-%"
+#~ "s\n"
-#~ msgid "dep is NULL!"
-#~ msgstr "dep è NULL!"
+#~ msgid "could not update new database entry %s-%s\n"
+#~ msgstr "impossibile aggiornare la nuova voce del database %s-%s\n"
-#~ msgid "loading ALL info for '%s'"
-#~ msgstr "caricamento in corso di tutte le informazioni di '%s'"
+#~ msgid "could not update 'requiredby' database entry %s-%s\n"
+#~ msgstr "impossibile aggiornare la voce 'richiesto da' del database %s-%s\n"
diff --git a/lib/libalpm/po/libalpm.pot b/lib/libalpm/po/libalpm.pot
index 4f7a1bf3..9e0f1829 100644
--- a/lib/libalpm/po/libalpm.pot
+++ b/lib/libalpm/po/libalpm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,1487 +16,658 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: lib/libalpm/add.c:77
+#: lib/libalpm/add.c:88
#, c-format
-msgid "loading target '%s'"
+msgid "replacing older version %s-%s by %s in target list\n"
msgstr ""
-#: lib/libalpm/add.c:122
+#: lib/libalpm/add.c:97
#, c-format
-msgid "replacing older version %s-%s by %s in target list"
+msgid "newer version %s-%s is in the target list -- skipping\n"
msgstr ""
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
-msgstr ""
-
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr ""
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr ""
-
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr ""
-
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
-msgstr ""
-
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr ""
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr ""
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr ""
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr ""
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr ""
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr ""
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:411
-#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr ""
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr ""
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr ""
-
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
-#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr ""
-
-#: lib/libalpm/add.c:508
-#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
-msgstr ""
-
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr ""
-
-#: lib/libalpm/add.c:600
-#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr ""
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr ""
-
-#: lib/libalpm/add.c:603
-#, c-format
-msgid "new: %s"
-msgstr ""
-
-#: lib/libalpm/add.c:604
-#, c-format
-msgid "original: %s"
-msgstr ""
-
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
-msgstr ""
-
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr ""
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr ""
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr ""
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
-msgstr ""
-
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr ""
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
-msgstr ""
-
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr ""
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr ""
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
-msgstr ""
-
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr ""
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr ""
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr ""
-
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
-msgstr ""
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr ""
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr ""
-
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr ""
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr ""
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr ""
-
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr ""
-
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr ""
-
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
-msgstr ""
-
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
-msgstr ""
-
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr ""
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr ""
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr ""
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr ""
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr ""
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr ""
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr ""
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr ""
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr ""
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr ""
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr ""
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr ""
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr ""
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr ""
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1044
-#, c-format
-msgid "config: rootdir: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr ""
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr ""
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
msgstr ""
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
msgstr ""
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
+#: lib/libalpm/add.c:172
+msgid "replacing packages with -A and -U is not supported yet\n"
msgstr ""
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
msgstr ""
-#: lib/libalpm/be_files.c:226
+#: lib/libalpm/add.c:365
#, c-format
msgid ""
-"request to read database info for a file-based package '%s', skipping..."
-msgstr ""
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
-msgstr ""
-
-#: lib/libalpm/be_files.c:247
-#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr ""
-
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
-msgstr ""
-
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr ""
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr ""
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr ""
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
msgstr ""
-#: lib/libalpm/cache.c:129
+#: lib/libalpm/add.c:392
#, c-format
-msgid "adding entry '%s' in '%s' cache"
+msgid "extract: symlink %s does not point to dir\n"
msgstr ""
-#: lib/libalpm/cache.c:149
+#: lib/libalpm/add.c:399
#, c-format
-msgid "removing entry '%s' from '%s' cache"
+msgid "extract: not overwriting dir with file %s\n"
msgstr ""
-#: lib/libalpm/cache.c:156
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
+msgid "could not extract %s (%s)\n"
msgstr ""
-#: lib/libalpm/cache.c:178
+#: lib/libalpm/add.c:505
#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
+msgid "could not rename %s (%s)\n"
msgstr ""
-#: lib/libalpm/cache.c:201
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
#, c-format
-msgid "loading group cache for repository '%s'"
+msgid "could not copy tempfile to %s (%s)\n"
msgstr ""
-#: lib/libalpm/conflict.c:69
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
#, c-format
-msgid " found conflict '%s' : package '%s'"
+msgid "%s saved as %s\n"
msgstr ""
-#: lib/libalpm/conflict.c:78
+#: lib/libalpm/add.c:556
#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
+msgid "could not install %s as %s: %s\n"
msgstr ""
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
+#: lib/libalpm/add.c:559
#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
+msgid "%s installed as %s\n"
msgstr ""
-#: lib/libalpm/conflict.c:107
+#: lib/libalpm/add.c:576
#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr ""
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr ""
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:201
-#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr ""
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr ""
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr ""
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr ""
-
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
-msgstr ""
-
-#: lib/libalpm/db.c:175
-#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr ""
-
-#: lib/libalpm/db.c:181
-#, c-format
-msgid "registering database '%s'"
-msgstr ""
-
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr ""
-
-#: lib/libalpm/db.c:197
-#, c-format
-msgid "opening database '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr ""
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr ""
-
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
+msgid "extracting %s as %s.pacnew\n"
msgstr ""
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+msgid "could not get current working directory\n"
msgstr ""
-#: lib/libalpm/deps.c:230
+#: lib/libalpm/add.c:765
#, c-format
-msgid "cannot find package installed '%s'"
+msgid "problem occurred while upgrading %s\n"
msgstr ""
-#: lib/libalpm/deps.c:261
+#: lib/libalpm/add.c:770
#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
+msgid "problem occurred while installing %s\n"
msgstr ""
-#: lib/libalpm/deps.c:280
+#: lib/libalpm/add.c:785
#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
+msgid "could not update database entry %s-%s\n"
msgstr ""
-#: lib/libalpm/deps.c:289
+#: lib/libalpm/add.c:793
#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
+msgid "could not add entry '%s' in cache\n"
msgstr ""
-#: lib/libalpm/deps.c:359
+#: lib/libalpm/be_files.c:223
#, c-format
-msgid "missing dependency '%s' for package '%s'"
+msgid "invalid name for database entry '%s'\n"
msgstr ""
-#: lib/libalpm/deps.c:409
+#: lib/libalpm/be_files.c:275
#, c-format
-msgid "checkdeps: found %s as required by %s"
+msgid "loading package data for %s : level=%d\n"
msgstr ""
-#: lib/libalpm/deps.c:485
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
#, c-format
-msgid "excluding %s -- explicitly installed"
+msgid "could not open file %s: %s\n"
msgstr ""
-#: lib/libalpm/deps.c:532
+#: lib/libalpm/cache.c:62
#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
+msgid "adding '%s' to package cache for db '%s'\n"
msgstr ""
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
+#: lib/libalpm/db.c:285
#, c-format
-msgid "adding '%s' to the targets"
+msgid "could not remove database entry %s%s\n"
msgstr ""
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
+#: lib/libalpm/db.c:553
+msgid "attempt to re-register the 'local' DB\n"
msgstr ""
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+msgid "database path is undefined\n"
msgstr ""
-#: lib/libalpm/deps.c:630
-#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+#: lib/libalpm/deps.c:173
+msgid "dependency cycle detected:\n"
msgstr ""
-#: lib/libalpm/deps.c:647
+#: lib/libalpm/deps.c:175
#, c-format
-msgid "dependency %s is already in the target list -- skipping"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-#: lib/libalpm/deps.c:667
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "pulling dependency %s (needed by %s)"
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-#: lib/libalpm/deps.c:671
+#: lib/libalpm/deps.c:573
#, c-format
-msgid "cannot resolve dependencies for \"%s\""
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr ""
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr ""
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr ""
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr ""
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr ""
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr ""
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr ""
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+msgid "could not find or read directory"
+msgstr ""
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr ""
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr ""
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr ""
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr ""
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr ""
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr ""
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr ""
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr ""
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr ""
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr ""
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr ""
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr ""
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr ""
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr ""
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr ""
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr ""
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr ""
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr ""
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr ""
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr ""
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr ""
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr ""
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr ""
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr ""
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr ""
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr ""
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr ""
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr ""
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr ""
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr ""
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr ""
-#: lib/libalpm/error.c:123
-msgid "group not found"
-msgstr ""
-
-#: lib/libalpm/error.c:126
-msgid "could not satisfy dependencies"
-msgstr ""
-
#: lib/libalpm/error.c:128
-msgid "conflicting dependencies"
+msgid "corrupted delta"
msgstr ""
#: lib/libalpm/error.c:130
-msgid "conflicting files"
+msgid "delta patch failed"
msgstr ""
#: lib/libalpm/error.c:133
-msgid "user aborted the operation"
+msgid "group not found"
msgstr ""
-#: lib/libalpm/error.c:135
-msgid "internal error"
+#: lib/libalpm/error.c:136
+msgid "could not satisfy dependencies"
msgstr ""
-#: lib/libalpm/error.c:137
-msgid "libarchive error"
+#: lib/libalpm/error.c:138
+msgid "conflicting dependencies"
msgstr ""
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
+#: lib/libalpm/error.c:140
+msgid "conflicting files"
msgstr ""
-#: lib/libalpm/error.c:142
-msgid "not confirmed"
+#: lib/libalpm/error.c:143
+msgid "user aborted the operation"
msgstr ""
#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
+msgid "internal error"
msgstr ""
#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr ""
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
+msgid "libarchive error"
msgstr ""
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
+#: lib/libalpm/error.c:150
+msgid "not confirmed"
msgstr ""
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr ""
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr ""
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr ""
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr ""
-
-#: lib/libalpm/handle.c:175
-#, c-format
-msgid "option 'root' = %s"
-msgstr ""
-
-#: lib/libalpm/handle.c:195
+#: lib/libalpm/package.c:124
#, c-format
-msgid "option 'dbpath' = %s"
+msgid "could not get md5sum for package %s-%s\n"
msgstr ""
-#: lib/libalpm/handle.c:211
+#: lib/libalpm/package.c:133
#, c-format
-msgid "option 'cachedir' = %s"
+msgid "md5sums do not match for package %s-%s\n"
msgstr ""
-#: lib/libalpm/md5driver.c:56
+#: lib/libalpm/package.c:737
#, c-format
-msgid "%s can't be opened\n"
+msgid "%s: forcing upgrade to version %s\n"
msgstr ""
-#: lib/libalpm/md5driver.c:74
+#: lib/libalpm/package.c:742
#, c-format
-msgid "md5(%s) = %s"
+msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr ""
-#: lib/libalpm/package.c:147
+#: lib/libalpm/package.c:750
#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
+msgid "%s-%s: delaying upgrade of package (%s)\n"
msgstr ""
-#: lib/libalpm/package.c:158
+#: lib/libalpm/package.c:931
#, c-format
-msgid "%s: forcing upgrade to version %s"
+msgid "could not parse package description file in %s\n"
msgstr ""
-#: lib/libalpm/package.c:163
+#: lib/libalpm/package.c:936
#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
+msgid "missing package name in %s\n"
msgstr ""
-#: lib/libalpm/package.c:171
+#: lib/libalpm/package.c:940
#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
+msgid "missing package version in %s\n"
msgstr ""
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
+#: lib/libalpm/package.c:970
#, c-format
-msgid "%s: syntax error in description file line %d"
+msgid "could not remove tempfile %s\n"
msgstr ""
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
-msgstr ""
-
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
-msgstr ""
-
-#: lib/libalpm/package.c:363
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
#, c-format
-msgid "missing package version in %s"
+msgid "error while reading package %s: %s\n"
msgstr ""
-#: lib/libalpm/package.c:398
+#: lib/libalpm/package.c:1005
#, c-format
-msgid "could not remove tempfile %s"
+msgid "missing package metadata in %s\n"
msgstr ""
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
+#: lib/libalpm/package.c:1012
#, c-format
-msgid "error while reading package: %s"
-msgstr ""
-
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
-msgstr ""
-
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
-msgstr ""
-
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr ""
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr ""
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr ""
-
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
+msgid "missing package filelist in %s, generating one\n"
msgstr ""
#: lib/libalpm/remove.c:121
#, c-format
-msgid "pulling %s in the targets list"
-msgstr ""
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
-msgstr ""
-
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr ""
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
-msgstr ""
-
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr ""
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr ""
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr ""
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
+msgid "could not find %s in database -- skipping\n"
msgstr ""
-#: lib/libalpm/remove.c:236
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr ""
-
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
-msgstr ""
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr ""
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr ""
-
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr ""
-
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
-msgstr ""
-
-#: lib/libalpm/remove.c:316
-#, c-format
-msgid "removing %d files"
+msgid "cannot remove file '%s': %s\n"
msgstr ""
#: lib/libalpm/remove.c:337
#, c-format
-msgid "removing database entry '%s'"
-msgstr ""
-
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
+msgid "could not remove database entry %s-%s\n"
msgstr ""
-#: lib/libalpm/remove.c:344
+#: lib/libalpm/remove.c:342
#, c-format
-msgid "could not remove entry '%s' from cache"
+msgid "could not remove entry '%s' from cache\n"
msgstr ""
-#: lib/libalpm/sha1.c:397
+#: lib/libalpm/server.c:56
#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr ""
-
-#: lib/libalpm/sha1.c:412
-#, c-format
-msgid "sha1(%s) = %s"
-msgstr ""
-
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
+msgid "url '%s' is invalid, ignoring\n"
msgstr ""
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
msgstr ""
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
+#: lib/libalpm/server.c:241
+msgid "disk"
msgstr ""
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
+#: lib/libalpm/server.c:245
#, c-format
-msgid "target '%s' not found -- looking for provisions"
+msgid "failed retrieving file '%s' from %s : %s\n"
msgstr ""
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
msgstr ""
-#: lib/libalpm/sync.c:290
+#: lib/libalpm/server.c:288
#, c-format
-msgid "repository '%s' not found"
+msgid "cannot write to file '%s'\n"
msgstr ""
-#: lib/libalpm/sync.c:331
+#: lib/libalpm/server.c:307
#, c-format
-msgid "%s-%s is up to date -- skipping"
+msgid "error downloading '%s': %s\n"
msgstr ""
-#: lib/libalpm/sync.c:354
+#: lib/libalpm/server.c:319
#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr ""
-
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
+msgid "error writing to file '%s': %s\n"
msgstr ""
-#: lib/libalpm/sync.c:422
+#: lib/libalpm/server.c:387
#, c-format
-msgid "adding package %s-%s to the transaction targets"
+msgid "could not chdir to %s\n"
msgstr ""
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
msgstr ""
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
msgstr ""
-#: lib/libalpm/sync.c:516
+#: lib/libalpm/server.c:458
#, c-format
-msgid "'%s' not found in transaction set -- skipping"
+msgid "failed to download %s\n"
msgstr ""
-#: lib/libalpm/sync.c:527
+#: lib/libalpm/sync.c:135
#, c-format
-msgid "package '%s' provides its own conflict"
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
msgstr ""
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
+#: lib/libalpm/sync.c:250
#, c-format
-msgid "'%s' is in the target list -- keeping it"
+msgid "%s: ignoring package upgrade (%s => %s)\n"
msgstr ""
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
+#: lib/libalpm/sync.c:320
#, c-format
-msgid "removing '%s' from target list"
+msgid "repository '%s' not found\n"
msgstr ""
-#: lib/libalpm/sync.c:576
-#, c-format
-msgid "resolving package '%s' conflict"
-msgstr ""
-
-#: lib/libalpm/sync.c:599
-#, c-format
-msgid "electing '%s' for removal"
-msgstr ""
-
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
-msgstr ""
-
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr ""
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr ""
-
-#: lib/libalpm/sync.c:712
+#: lib/libalpm/sync.c:354
#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
+msgid "%s-%s is up to date -- skipping\n"
msgstr ""
-#: lib/libalpm/sync.c:808
+#: lib/libalpm/sync.c:358
#, c-format
-msgid "%s is already in the cache\n"
+msgid "%s-%s is up to date -- reinstalling\n"
msgstr ""
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+msgid "unresolvable package conflicts detected\n"
msgstr ""
-#: lib/libalpm/sync.c:820
+#: lib/libalpm/sync.c:628
#, c-format
-msgid "warning: no %s cache exists, creating..."
+msgid "malloc failure: could not allocate %zd bytes\n"
msgstr ""
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr ""
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr ""
-
-#: lib/libalpm/sync.c:833
-#, c-format
-msgid "failed to retrieve some files from %s\n"
-msgstr ""
-
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
-msgstr ""
-
-#: lib/libalpm/sync.c:894
-#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr ""
-
-#: lib/libalpm/sync.c:896
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr ""
-
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr ""
-
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr ""
-
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
+msgid "command: %s\n"
msgstr ""
-#: lib/libalpm/sync.c:1030
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
#, c-format
-msgid "could not update requiredby for database entry %s-%s"
+msgid "can't get md5 checksum for file %s\n"
msgstr ""
-#: lib/libalpm/sync.c:1039
+#: lib/libalpm/sync.c:910
#, c-format
-msgid "could not update new database entry %s-%s"
+msgid "file %s was corrupted (bad MD5 checksum)\n"
msgstr ""
-#: lib/libalpm/sync.c:1079
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "found package '%s-%s' in sync"
+msgid "failed to retrieve some files from %s\n"
msgstr ""
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
+#: lib/libalpm/sync.c:1137
+msgid "could not create removal transaction\n"
msgstr ""
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
+#: lib/libalpm/sync.c:1143
+msgid "could not initialize the removal transaction\n"
msgstr ""
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
+#: lib/libalpm/sync.c:1165
+msgid "could not prepare removal transaction\n"
msgstr ""
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
+#: lib/libalpm/sync.c:1171
+msgid "could not commit removal transaction\n"
msgstr ""
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
-#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
+#: lib/libalpm/sync.c:1182
+msgid "could not create transaction\n"
msgstr ""
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
+#: lib/libalpm/sync.c:1187
+msgid "could not initialize transaction\n"
msgstr ""
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
+#: lib/libalpm/sync.c:1214
+msgid "could not prepare transaction\n"
msgstr ""
-#: lib/libalpm/util.c:280
-#, c-format
-msgid "could not open %s: %s\n"
+#: lib/libalpm/sync.c:1219
+msgid "could not commit transaction\n"
msgstr ""
-#: lib/libalpm/util.c:293
+#: lib/libalpm/trans.c:214
#, c-format
-msgid "could not extract %s: %s\n"
+msgid "could not remove lock file %s\n"
msgstr ""
-#: lib/libalpm/util.c:350
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "logaction called: %s"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
msgstr ""
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
+#: lib/libalpm/trans.c:494
+msgid "could not create temp directory\n"
msgstr ""
-#: lib/libalpm/util.c:472
+#: lib/libalpm/trans.c:536
#, c-format
-msgid "could not change directory to %s (%s)"
+msgid "could not change directory to %s (%s)\n"
msgstr ""
-#: lib/libalpm/util.c:476
+#: lib/libalpm/trans.c:554
#, c-format
-msgid "executing %s script..."
+msgid "could not fork a new process (%s)\n"
msgstr ""
-#: lib/libalpm/util.c:489
+#: lib/libalpm/trans.c:564
#, c-format
-msgid "could not fork a new process (%s)"
+msgid "could not change the root directory (%s)\n"
msgstr ""
-#: lib/libalpm/util.c:496
+#: lib/libalpm/trans.c:569
#, c-format
-msgid "chrooting in %s"
+msgid "could not change directory to / (%s)\n"
msgstr ""
-#: lib/libalpm/util.c:498
+#: lib/libalpm/trans.c:578
#, c-format
-msgid "could not change the root directory (%s)"
+msgid "call to popen failed (%s)"
msgstr ""
-#: lib/libalpm/util.c:502
+#: lib/libalpm/trans.c:597
#, c-format
-msgid "could not change directory to / (%s)"
+msgid "call to waitpid failed (%s)\n"
msgstr ""
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
msgstr ""
-#: lib/libalpm/util.c:509
+#: lib/libalpm/trans.c:615
#, c-format
-msgid "call to popen failed (%s)"
+msgid "could not remove tmpdir %s\n"
msgstr ""
-#: lib/libalpm/util.c:541
+#: lib/libalpm/util.c:204
#, c-format
-msgid "call to waitpid failed (%s)"
+msgid "failed to make path '%s' : %s\n"
msgstr ""
-#: lib/libalpm/util.c:550
+#: lib/libalpm/util.c:389
#, c-format
-msgid "could not remove tmpdir %s"
+msgid "could not open %s: %s\n"
msgstr ""
-#: lib/libalpm/util.c:568
+#: lib/libalpm/util.c:573
#, c-format
-msgid "cannot read disk space information from %s: %s"
+msgid "no %s cache exists, creating...\n"
msgstr ""
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
+#: lib/libalpm/util.c:593
+msgid "couldn't create package cache, using /tmp instead\n"
msgstr ""
-#: lib/libalpm/versioncmp.c:279
+#: lib/libalpm/util.c:643
#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
+msgid "md5: %s can't be opened\n"
msgstr ""
-#: lib/libalpm/versioncmp.c:284
+#: lib/libalpm/util.c:645
#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
+msgid "md5: %s can't be read\n"
msgstr ""
diff --git a/lib/libalpm/po/pl_PL.po b/lib/libalpm/po/pl_PL.po
index 0790a611..01e0fa07 100644
--- a/lib/libalpm/po/pl_PL.po
+++ b/lib/libalpm/po/pl_PL.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pacman package manager 3.0.1\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
"PO-Revision-Date: 2007-04-12 04:23+0200\n"
"Last-Translator: Mateusz Jędrasik <m.jedrasik@gmail.com>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@@ -18,1507 +18,728 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
-#: lib/libalpm/add.c:77
-#, c-format
-msgid "loading target '%s'"
-msgstr "ładowanie celu '%s'"
-
-#: lib/libalpm/add.c:122
-#, c-format
-msgid "replacing older version %s-%s by %s in target list"
+#: lib/libalpm/add.c:88
+#, fuzzy, c-format
+msgid "replacing older version %s-%s by %s in target list\n"
msgstr "zastępowanie starszej wersji %s-%s na %s z listy celów"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
+#: lib/libalpm/add.c:97
+#, fuzzy, c-format
+msgid "newer version %s-%s is in the target list -- skipping\n"
msgstr "nowsza wersja %s-%s znajduje się w liście celów -- pomijam"
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "czytanie metadane '%s'"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "szukanie nieusatysfakcjonowanych zależności"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
+msgstr ""
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "szukanie konfliktów"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
+msgstr ""
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
+#: lib/libalpm/add.c:172
+#, fuzzy
+msgid "replacing packages with -A and -U is not supported yet\n"
msgstr "zastępowanie pakietów z -A i -U nie jest jeszcze wspierane"
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "proszę usunąć pierw '%s', korzystając z -Rd"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "sortowanie według zależności"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "czyszczenie"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "szukanie konfliktów plików"
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "aktualizowanie pakietu %s-%s"
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "dodawanie pakietu %s-%s"
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "usuwanie wpierw starego pakietu (%s-%s)"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
+msgstr ""
-#: lib/libalpm/add.c:411
+#: lib/libalpm/add.c:365
#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr "dodawanie %s tymczasowo do tablicy NoUpgrade"
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "rozpakowywanie plików"
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "nie można znaleźć obecnego katalogu"
+msgid ""
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
+msgstr ""
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
+#: lib/libalpm/add.c:392
#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s znajduje się w NoExtract, pomijanie rozpakowywania"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr ""
-#: lib/libalpm/add.c:508
+#: lib/libalpm/add.c:399
#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
-msgstr "%s znajduje się w trans->skip_add, pomijanie rozpakowywania"
+msgid "extract: not overwriting dir with file %s\n"
+msgstr ""
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
+#, fuzzy, c-format
+msgid "could not extract %s (%s)\n"
msgstr "nie udało się rozpakować %s (%s)"
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "sprawdzanie sum md5 dla %s"
-
-#: lib/libalpm/add.c:600
-#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "sprawdzanie sum sha1 dla %s"
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr "bieżące: %s"
-
-#: lib/libalpm/add.c:603
-#, c-format
-msgid "new: %s"
-msgstr "nowe: %s"
-
-#: lib/libalpm/add.c:604
-#, c-format
-msgid "original: %s"
-msgstr "oryginalne: %s"
-
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
+#: lib/libalpm/add.c:505
+#, fuzzy, c-format
+msgid "could not rename %s (%s)\n"
msgstr "nie udało się zmienić nazwy %s (%s)"
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "błąd: nie udało się zmienić nazwy %s (%s)"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
+#, fuzzy, c-format
+msgid "could not copy tempfile to %s (%s)\n"
msgstr "nie udało się skopiować pliku tymczasowego do %s (%s)"
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "błąd: nie udało się skopiować pliku tymczasowego do %s (%s)"
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
+#, fuzzy, c-format
+msgid "%s saved as %s\n"
msgstr "%s zachowane jako %s"
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "uwaga: %s zachowane jako %s"
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "czynność: instalowanie nowego pliku: %s"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "czynność: zostawianie obecnych plików na miejscu"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-"czynność: zachowywanie obecnego pliku i instalowanie nowego z końcówką ."
-"pacnew"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
+#: lib/libalpm/add.c:556
+#, fuzzy, c-format
+msgid "could not install %s as %s: %s\n"
msgstr "nie udało się zainstalować %s jako %s: %s"
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "błąd: nie udało się zainstalować %s jako %s: %s"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
+#: lib/libalpm/add.c:559
+#, fuzzy, c-format
+msgid "%s installed as %s\n"
msgstr "%s zainstalowano jako %s"
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "uwaga: %s zainstalowano jako %s"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s znajduje się w NoUpgrade -- pomijanie"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
+#: lib/libalpm/add.c:576
+#, fuzzy, c-format
+msgid "extracting %s as %s.pacnew\n"
msgstr "rozpakowywanie %s jako %s.pacnew"
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "uwaga: rozpakowywanie %s jako %s.pacnew"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "rozpakowywanie %s"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "błąd: nie udało się rozpakować %s (%s)"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr "dodawanie pozycji kopii zapasowej dla %s"
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+#, fuzzy
+msgid "could not get current working directory\n"
+msgstr "nie można znaleźć obecnego katalogu"
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
+#: lib/libalpm/add.c:765
+#, fuzzy, c-format
+msgid "problem occurred while upgrading %s\n"
msgstr "wystąpiły błędy podczas %s %s"
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "aktualizowanie"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "instalowanie"
-
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr "zasób '%s' został usunięty z pakietu %s (%s => %s)"
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr "aktualizowanie '%s' z powodu zmiany zasobu (%s)"
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr "nie udało się zaktualizować zasobu '%s' z '%s'"
-
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "aktualizowanie bazy danych"
-
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "dodawanie pozycji bazy danych '%s'"
+#: lib/libalpm/add.c:770
+#, fuzzy, c-format
+msgid "problem occurred while installing %s\n"
+msgstr "wystąpiły błędy podczas %s %s"
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
+#: lib/libalpm/add.c:785
+#, fuzzy, c-format
+msgid "could not update database entry %s-%s\n"
msgstr "nie udało się zaktualizować pozycji bazy danych %s-%s"
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
+#: lib/libalpm/add.c:793
+#, fuzzy, c-format
+msgid "could not add entry '%s' in cache\n"
msgstr "nie udało się dodać pozycji '%s' w pliku podręcznym"
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "uruchamianie \"ldconfig -r %s\""
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr "usuwanie BD %s, pozostało %d..."
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr "odrejestrowywanie bazy danych '%s'"
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "zamykanie bazy danych '%s'"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-"dodawanie nowego serwera do bazy danych '%s': protokół '%s', serwer '%s', "
-"ścieżka '%s'"
-
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "lista serwerów spuszczona(?) dla '%s'"
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr ""
-"nie udało się otrzymać czasu ostatniej aktualizacji dla %s (nic wielkiego)"
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "nie udało się zsynchronizować bd: %s [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr "sync: nowy mtime dla %s: %s"
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr "spuszczanie(?) bazy danych %s%s"
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr "nie udało się usunąć wpisu %s%s z bazy danych"
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "nie udało się otrzymać sumy sha1 dla pakietu %s-%s"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "sumy kontrolne sha1 zgadzają się dla pakietu %s-%s"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "sumy kontrolne sha1 dla pakietu %s-%s nie zgadzają się"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "nie udało się otrzymać sumy md5 dla pakietu %s-%s"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "sumy kontrolne md5 zgadzają się dla pakietu %s-%s"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "sumy kontrolne md5 dla pakietu %s-%s nie zgadzają się"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "nie udało się usunąć pliku blokującego %s"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "uwaga: nie udało się usunąć pliku blokującego %s"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "konfiguracja: nowa sekcja '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr "konfiguracja: nopassiveftp"
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr "konfiguracja: usesyslog"
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr "konfiguracja: chomp"
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr "konfiguracja: usecolor"
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr "konfiguracja: zawieranie %s"
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr "konfiguracja: noupgrade: %s"
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr "konfiguracja: noextract: %s"
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr "konfiguracja: ignorepkg: %s"
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr "konfiguracja: holdpkg: %s"
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr "konfiguracja: dbpath: %s"
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr "konfiguracja: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1044
-#, c-format
-msgid "config: rootdir: %s"
-msgstr "konfiguracja: rootdir: %s"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr "konfiguracja: logfile: %s"
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr "konfiguracja: xfercommand: %s"
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr "konfiguracja: upgradedelay: %d"
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "sprawdzanie potencjalnych pakietów zastępczych"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "sprawdzanie zastępcy '%s' dla pakietu '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s: ignorowanie aktualizowania pakietu (do zastąpienia przez %s-%s)"
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s wybrany do zaktualizowania (do zastąpienia przez %s-%s)"
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr "'%s' nie odnaleziony w bd sync -- pomijanie"
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr "'%s' jest już wybrany do usunięcia -- pomijanie"
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr "%s wybrany do zaktualizowania (%s => %s)"
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "rozpakowywanie bazy danych '%s'"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr "otwieranie bazy danych ze ścieżki '%s'"
-
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
-msgstr "skan bd nie odnalazł pakietu: %s"
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
+#: lib/libalpm/be_files.c:223
+#, fuzzy, c-format
+msgid "invalid name for database entry '%s'\n"
msgstr "nieprawidłowa nazwa dla wpisu bazy danych '%s'"
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr "dostarczono nieprawidłowy wpis pakietu do _alpm_db_read, pomijanie"
-
-#: lib/libalpm/be_files.c:226
-#, c-format
-msgid ""
-"request to read database info for a file-based package '%s', skipping..."
-msgstr ""
-"żądanie odczytania informacji bazy danych dla pakietu '%s' bazowanego na "
-"pliku, pomijanie..."
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
+#: lib/libalpm/be_files.c:275
+#, fuzzy, c-format
+msgid "loading package data for %s : level=%d\n"
msgstr "ładowanie danych pakietu dla %s : poziom=%d"
-#: lib/libalpm/be_files.c:247
-#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr "nie udało się odnaleźć '%s-%s' w bd '%s'"
-
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
+#, fuzzy, c-format
+msgid "could not open file %s: %s\n"
msgstr "nie udało się otworzyć pliku %s: %s"
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr "zapisywanie informacji DESC dla %s-%s spowrotem do bd"
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr "zapisywanie informacji FILES dla %s-%s spowrotem do bd"
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr "zapisywanie informacji DEPENDS dla %s-%s spowrotem do bd"
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr "ładowanie pamięci podręcznej pakietów dla repozytorium '%s'"
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
+#: lib/libalpm/cache.c:62
+#, fuzzy, c-format
+msgid "adding '%s' to package cache for db '%s'\n"
msgstr "dodawanie '%s' do pamięci podręcznej pakietów dla bd '%s'"
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr "uwalnianie pamięci podręcznej pakietów dla repozytorium '%s'"
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr "błąd: pkgcache jest równy NULL dla bd '%s'"
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr "dodawanie wpisu '%s' pamięci podręcznej '%s'"
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr "usuwanie wpisu '%s' z pamięci podręcznej '%s'"
-
-#: lib/libalpm/cache.c:156
-#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr ""
-"nie udało się usunąć wpisu '%s' z pamięci podręcznej '%s': nie znaleziono"
-
-#: lib/libalpm/cache.c:178
-#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr "błąd: nie udało się otrzymać '%s' z NULL pkgcache"
-
-#: lib/libalpm/cache.c:201
-#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr "ładowanie pamięci podręcznej grup z repozytorium '%s'"
-
-#: lib/libalpm/conflict.c:69
-#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr " znaleziono konflikt '%s' : pakiet '%s'"
-
-#: lib/libalpm/conflict.c:78
-#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr " znaleziono konflikt '%s' : pakiet '%s' dostarcza '%s'"
-
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
-#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr "pakiet '%s' konfliktuje ze sobą - błąd pakowania"
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr "checkconflicts: cel '%s' vs bd"
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr "checkconflicts: cel '%s' vs wszystkie cele"
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr "checkconflicts: bd vs cel '%s'"
-
-#: lib/libalpm/conflict.c:201
-#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr "cel '%s' jest także w liście celów, używanie NOWYCH konfliktów"
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr "\tCONFLICTS:: %s konfliktuje z %s"
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr "błąd malloc: nie udało się zaalokować %d bajtów"
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr "błąd malloc: nie udało się zaalokować %d bajtów"
+#: lib/libalpm/db.c:285
+#, fuzzy, c-format
+msgid "could not remove database entry %s%s\n"
+msgstr "nie udało się usunąć wpisu %s%s z bazy danych"
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
+#: lib/libalpm/db.c:553
+#, fuzzy
+msgid "attempt to re-register the 'local' DB\n"
msgstr "próba ponownej rejestracji 'lokalnej' BD"
-#: lib/libalpm/db.c:175
-#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr "próba ponownej rejestracji bazy danych '%s', używając obecnej"
-
-#: lib/libalpm/db.c:181
-#, c-format
-msgid "registering database '%s'"
-msgstr "rejestrowanie bazy danych '%s'"
-
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr "katalog bazy danych '%s' nie istnieje, utwarzanie"
-
-#: lib/libalpm/db.c:197
-#, c-format
-msgid "opening database '%s'"
-msgstr "otwieranie bazy danych '%s'"
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr "rozpoczynanie sortowania zależności"
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr "odkryto potencjalny cykl zależności"
-
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr "sortowanie zależności ukończone"
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr "zerowy pakiet odnaleziony w liście pakietów"
-
-#: lib/libalpm/deps.c:230
-#, c-format
-msgid "cannot find package installed '%s'"
-msgstr "nie udało się odnaleźć pakietu który zainstalował '%s'"
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+#, fuzzy
+msgid "database path is undefined\n"
+msgstr "baza danych nie została zainicjowana"
-#: lib/libalpm/deps.c:261
-#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr "checkdeps: zależność '%s' została przesunięta z '%s' do '%s'"
+#: lib/libalpm/deps.c:173
+#, fuzzy
+msgid "dependency cycle detected:\n"
+msgstr "wykryto cykl zależności: %s"
-#: lib/libalpm/deps.c:280
+#: lib/libalpm/deps.c:175
#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-"checkdeps: zależność '%s' satysfakcjonowana przez zainstalowany pakiet '%s'"
-
-#: lib/libalpm/deps.c:289
-#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
-msgstr "checkdeps: zaktualizowany '%s' nie satysfakcjonuje zależności '%s'"
-#: lib/libalpm/deps.c:359
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr "brakująca zależność '%s' dla pakietu '%s'"
-
-#: lib/libalpm/deps.c:409
-#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr "checkdeps: znaleziono %s wymagane przez %s"
-
-#: lib/libalpm/deps.c:485
-#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr "wykluczanie %s -- zainstalowany eksplicytnie"
-
-#: lib/libalpm/deps.c:532
-#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
-msgstr "nie udało się odnaleźć pakietu \"%s\" ani niczego co go dostarcza!"
-
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
-#, c-format
-msgid "adding '%s' to the targets"
-msgstr "dodawanie '%s' do celów"
-
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
-msgstr "rozpoczynanie rozwiązywania zależności"
-
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
-msgstr "%s dostarcza zależność %s -- pomijanie"
-
-#: lib/libalpm/deps.c:630
-#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-"nie udało się rozwiązać zależności dla \"%s\" (\"%s\" nie znajduje się w "
-"zbiorze pakietów)"
-
-#: lib/libalpm/deps.c:647
-#, c-format
-msgid "dependency %s is already in the target list -- skipping"
-msgstr "zależność %s jest już w liście celów -- pomijanie"
-#: lib/libalpm/deps.c:667
-#, c-format
-msgid "pulling dependency %s (needed by %s)"
-msgstr "wciąganie zależności %s (wymagane przez %s)"
-
-#: lib/libalpm/deps.c:671
-#, c-format
-msgid "cannot resolve dependencies for \"%s\""
+#: lib/libalpm/deps.c:573
+#, fuzzy, c-format
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "nie udało się rozwiązać zależności dla \"%s\""
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr "wykryto cykl zależności: %s"
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr "zakończono rozwiązywanie zależności"
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr "brak pamięci!"
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr "niespodziewany błąd systemu"
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr "niewystarczające przywileje"
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr "nie udało się znaleźć bądź odczytać pliku"
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+#, fuzzy
+msgid "could not find or read directory"
+msgstr "nie udało się znaleźć bądź odczytać pliku"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr "błędny bądź ZEROWY argument dany"
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr "biblioteka nie została zainicjowana"
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr "biblioteka już zainicjowana"
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr "nie udało się zablokować bazy danych"
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "nie udało się otworzyć bazy danych"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "nie udało się stworzyć bazy danych"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "baza danych nie została zainicjowana"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "baza danych już zarejestrowana"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "nie udało się odnaleźc bazy danych"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "nie udało się zaktualizować bazy danych"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "nie udało się usunąć wpisu do bazy danych"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr "nieprawidłowy url dla serwera"
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr "nie udało się ustawić parametru"
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr "tranzakcja już zainicjowana"
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr "tranzakcja nie została zainicjowana"
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr "duplikat celu"
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr "tranzakcja nie została przygotowana"
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr "tranzakcja zaniechana"
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr "operacja niekompatybilna z typem tranzakcji"
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr "nie udało się wykonać tranzakcji"
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr "nie udało się pobrać wszystkich plików"
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr "nie udało się znaleźć bądź odczytać pakietu"
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
-msgstr "nieprawidłowy bądź uszkodzony pakiet"
+msgstr "nieprawidłowy bądź skorumpowany pakiet"
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr "nie udało się otworzyć pliku pakietu"
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr "nie udało się załadować danych pakietu"
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr "pakiet już zainstalowany"
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr "pakiet nie zainstalowany lub zainstalowany w niższej wersji"
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr "nie udało się usunąć wszystkich plików pakietu"
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "nieprawidłowa nazwa pakietu"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
-msgstr "uszkodzony pakiet"
+msgstr "skorumpowany pakiet"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr "nie ma takiego repozytorium"
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+#, fuzzy
+msgid "corrupted delta"
+msgstr "skorumpowany pakiet"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr ""
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "grupa nie została odnaleziona"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr "nie udało się usatysfakcjonować zależności"
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr "konfliktujące zależności"
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr "konfliktujące pliki"
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr "użytkownik zaniechał operacji"
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "błąd wewnętrzny"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr "błąd libarchive"
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "nie wystarczająca ilość wolnego miejsca na dysku"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr "nie potwierdzono"
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr "zła nazwa sekcji konfiguracji"
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr ""
-"'local' jest nazwą zarezerwowaną i nie może zostać użyty jako nazwa "
-"repozytorium"
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr "błąd składni w pliku konfiguracyjnym"
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr "wszystkie dyrektywy muszą być własnością sekcji"
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "nieprawidłowe wyrażenie regularne"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr "połączenie ze zdalnym hostem nieudane"
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "niespodziewany błąd"
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr "nie udało się skanonizować podanej ścieżki docelowej '%s'"
-
-#: lib/libalpm/handle.c:175
-#, c-format
-msgid "option 'root' = %s"
-msgstr "opcja 'root' = %s"
-
-#: lib/libalpm/handle.c:195
-#, c-format
-msgid "option 'dbpath' = %s"
-msgstr "opcja 'dbpath' = %s"
-
-#: lib/libalpm/handle.c:211
-#, c-format
-msgid "option 'cachedir' = %s"
-msgstr "opcja 'cachedir' = %s"
-
-#: lib/libalpm/md5driver.c:56
-#, c-format
-msgid "%s can't be opened\n"
-msgstr "%s nie może być otwarte\n"
-
-#: lib/libalpm/md5driver.c:74
-#, c-format
-msgid "md5(%s) = %s"
-msgstr "md5(%s) = %s"
+#: lib/libalpm/package.c:124
+#, fuzzy, c-format
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "nie udało się otrzymać sumy md5 dla pakietu %s-%s"
-#: lib/libalpm/package.c:147
-#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr "%s-%s: ignorowanie aktualizacji pakietu (%s)"
+#: lib/libalpm/package.c:133
+#, fuzzy, c-format
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "sumy kontrolne md5 dla pakietu %s-%s nie zgadzają się"
-#: lib/libalpm/package.c:158
-#, c-format
-msgid "%s: forcing upgrade to version %s"
+#: lib/libalpm/package.c:737
+#, fuzzy, c-format
+msgid "%s: forcing upgrade to version %s\n"
msgstr "%s: wymuszanie aktualizacji do wersji %s"
-#: lib/libalpm/package.c:163
-#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
+#: lib/libalpm/package.c:742
+#, fuzzy, c-format
+msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%s: local (%s) jest nowsze niż %s (%s)"
-#: lib/libalpm/package.c:171
-#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
+#: lib/libalpm/package.c:750
+#, fuzzy, c-format
+msgid "%s-%s: delaying upgrade of package (%s)\n"
msgstr "%s-%s: opóźnianie aktualizacji pakietu (%s)"
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
-#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr "%s: błąd składni w pliku opisu linia %d"
-
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
+#: lib/libalpm/package.c:931
+#, fuzzy, c-format
+msgid "could not parse package description file in %s\n"
msgstr "nie udało się przeczytać pliku opisu"
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
+#: lib/libalpm/package.c:936
+#, fuzzy, c-format
+msgid "missing package name in %s\n"
msgstr "brak nazwy pakietu w %s"
-#: lib/libalpm/package.c:363
-#, c-format
-msgid "missing package version in %s"
+#: lib/libalpm/package.c:940
+#, fuzzy, c-format
+msgid "missing package version in %s\n"
msgstr "brak wersji pakietu w %s"
-#: lib/libalpm/package.c:398
-#, c-format
-msgid "could not remove tempfile %s"
+#: lib/libalpm/package.c:970
+#, fuzzy, c-format
+msgid "could not remove tempfile %s\n"
msgstr "nie udało się usunąć pliku tymczasowego %s"
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
+#, fuzzy, c-format
+msgid "error while reading package %s: %s\n"
msgstr "błąd odczytywania pakietu: %s"
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
+#: lib/libalpm/package.c:1005
+#, fuzzy, c-format
+msgid "missing package metadata in %s\n"
msgstr "brak metadanych pakietu"
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
+#: lib/libalpm/package.c:1012
+#, fuzzy, c-format
+msgid "missing package filelist in %s, generating one\n"
msgstr "brak listy plików pakietu w %s, generowanie"
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr "dodawanie '%s' w polu requiredby dla '%s'"
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr "dodawanie '%s' w polu requiredby dla '%s' (dostarcza: %s)"
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr "nie udało się odnaleźć %s w bazie danych"
-
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
-msgstr "dodawanie %s do listy celów"
-
#: lib/libalpm/remove.c:121
-#, c-format
-msgid "pulling %s in the targets list"
-msgstr "wciąganie %s na listę celów"
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
+#, fuzzy, c-format
+msgid "could not find %s in database -- skipping\n"
msgstr "nie udało się odnaleźć %s w bazie danych -- pomijanie"
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr "odnajdywanie usuwalnych zależności"
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
+#, fuzzy, c-format
+msgid "cannot remove file '%s': %s\n"
msgstr "nie udało się usunąć pliku '%s': %s"
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr "Pomijanie usunięcia '%s' ze względu na NoUpgrade"
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "plik %s nie istnieje"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "zachowywanie katalogu %s"
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "usuwanie katalogu %s"
+#: lib/libalpm/remove.c:337
+#, fuzzy, c-format
+msgid "could not remove database entry %s-%s\n"
+msgstr "nie udało się usunąć wpisu %s-%s z bazy danych"
-#: lib/libalpm/remove.c:236
-#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr "%s jest w trans->skip_remove, pomijanie usunięcia"
+#: lib/libalpm/remove.c:342
+#, fuzzy, c-format
+msgid "could not remove entry '%s' from cache\n"
+msgstr "nie udało się usunąć wpisu '%s' z pamięci podręcznej"
-#: lib/libalpm/remove.c:250
+#: lib/libalpm/server.c:56
#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
+msgid "url '%s' is invalid, ignoring\n"
msgstr ""
-"tranzakcja ustawiona jako NOSAVE, brak tworzenia kopii zapasowej dla '%s'"
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr "odlinkowywanie %s"
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr "nie udało się usunąć pliku %s: %s"
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr "usuwanie pakietu %s-%s"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
+msgstr ""
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
+#: lib/libalpm/server.c:241
+msgid "disk"
msgstr ""
-"pakiet '%s' nie zostanie usunięty, nie udało się usunąć wszystkich plików"
-#: lib/libalpm/remove.c:316
-#, c-format
-msgid "removing %d files"
-msgstr "usuwanie %d plików"
+#: lib/libalpm/server.c:245
+#, fuzzy, c-format
+msgid "failed retrieving file '%s' from %s : %s\n"
+msgstr "nie udało się pobrać niektórych plików z %s\n"
-#: lib/libalpm/remove.c:337
-#, c-format
-msgid "removing database entry '%s'"
-msgstr "usuwanie wpisu '%s' z bazy danych"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
+msgstr ""
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
-msgstr "nie udało się usunąć wpisu %s-%s z bazy danych"
+#: lib/libalpm/server.c:288
+#, fuzzy, c-format
+msgid "cannot write to file '%s'\n"
+msgstr "nie udało się usunąć pliku '%s': %s"
-#: lib/libalpm/remove.c:344
-#, c-format
-msgid "could not remove entry '%s' from cache"
-msgstr "nie udało się usunąć wpisu '%s' z pamięci podręcznej"
+#: lib/libalpm/server.c:307
+#, fuzzy, c-format
+msgid "error downloading '%s': %s\n"
+msgstr "błąd odczytywania pakietu: %s"
-#: lib/libalpm/sha1.c:397
-#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr "sha1: %s nie może zostać otwarty\n"
+#: lib/libalpm/server.c:319
+#, fuzzy, c-format
+msgid "error writing to file '%s': %s\n"
+msgstr "nie udało się usunąć pliku '%s': %s"
-#: lib/libalpm/sha1.c:412
-#, c-format
-msgid "sha1(%s) = %s"
-msgstr "sha1(%s) = %s"
+#: lib/libalpm/server.c:387
+#, fuzzy, c-format
+msgid "could not chdir to %s\n"
+msgstr "nie udało się zmienić katalogu na / (%s)"
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
-msgstr "sprawdzanie potencjalnych uaktualnień pakietów"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
+msgstr ""
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
-msgstr "%s-%s wybrany do aktualizacji (%s => %s)"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
+msgstr ""
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
-msgstr "poszukiwanie celu w repo '%s'"
+#: lib/libalpm/server.c:458
+#, fuzzy, c-format
+msgid "failed to download %s\n"
+msgstr "nie udało się pobrać wszystkich plików"
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
-#, c-format
-msgid "target '%s' not found -- looking for provisions"
-msgstr "cel '%s' nie został odnaleziony -- szukanie zasobów dostarczających"
+#: lib/libalpm/sync.c:135
+#, fuzzy, c-format
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
+msgstr "%s-%s: ignorowanie aktualizowania pakietu (do zastąpienia przez %s-%s)"
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr "znaleziono '%s' jako zasób dla '%s'"
+#: lib/libalpm/sync.c:250
+#, fuzzy, c-format
+msgid "%s: ignoring package upgrade (%s => %s)\n"
+msgstr "%s-%s: ignorowanie aktualizacji pakietu (%s)"
-#: lib/libalpm/sync.c:290
-#, c-format
-msgid "repository '%s' not found"
+#: lib/libalpm/sync.c:320
+#, fuzzy, c-format
+msgid "repository '%s' not found\n"
msgstr "repozytorium '%s' nie zostało znalezione"
-#: lib/libalpm/sync.c:331
-#, c-format
-msgid "%s-%s is up to date -- skipping"
-msgstr "%s-%s jest w najnowszej wersji -- pomijanie"
-
#: lib/libalpm/sync.c:354
-#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr "dodawanie celu '%s' do zestawu tranzakcji"
-
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr "rozwiązywanie zależności celu"
-
-#: lib/libalpm/sync.c:422
-#, c-format
-msgid "adding package %s-%s to the transaction targets"
-msgstr "dodawanie pakietu %s-%s do celów tranzakcji"
-
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
-msgstr "szukanie nierozwiązywalnych zależności"
-
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "pakiet '%s' konfliktuje z '%s'"
-
-#: lib/libalpm/sync.c:516
-#, c-format
-msgid "'%s' not found in transaction set -- skipping"
-msgstr "'%s' nie znaleziony w zestawie tranzakcji -- pomijanie"
-
-#: lib/libalpm/sync.c:527
-#, c-format
-msgid "package '%s' provides its own conflict"
-msgstr "pakiet '%s' dostarcza swój własny konflikt"
-
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
-#, c-format
-msgid "'%s' is in the target list -- keeping it"
-msgstr "'%s' jest w liście celów -- zachowywanie"
-
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
-#, c-format
-msgid "removing '%s' from target list"
-msgstr "usuwanie '%s' z listy celów"
-
-#: lib/libalpm/sync.c:576
-#, c-format
-msgid "resolving package '%s' conflict"
-msgstr "rozwiązywanie konfliktu pakietu '%s'"
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "%s-%s jest w najnowszej wersji -- pomijanie"
-#: lib/libalpm/sync.c:599
-#, c-format
-msgid "electing '%s' for removal"
-msgstr "wybieranie '%s' do usunięcia"
+#: lib/libalpm/sync.c:358
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- reinstalling\n"
+msgstr "%s-%s jest w najnowszej wersji -- pomijanie"
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+#, fuzzy
+msgid "unresolvable package conflicts detected\n"
msgstr "odkryto nierozwiązywalne konflikty pakietów"
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr "sprawdzanie zależności pakietów wyznaczonych do usunięcia"
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr "coś się bardzo nie udało"
-
-#: lib/libalpm/sync.c:712
-#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
-msgstr "znaleziono '%s' jako zasób dla '%s' -- konflikt zaniechany"
-
-#: lib/libalpm/sync.c:808
-#, c-format
-msgid "%s is already in the cache\n"
-msgstr "%s jest już w pamięci podręcznej\n"
-
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
-msgstr "brak pamięci podręcznej dla %s, tworzenie...\n"
-
-#: lib/libalpm/sync.c:820
-#, c-format
-msgid "warning: no %s cache exists, creating..."
-msgstr "uwaga: brak pamięci podręcznej dla %s, tworzenie..."
+#: lib/libalpm/sync.c:628
+#, fuzzy, c-format
+msgid "malloc failure: could not allocate %zd bytes\n"
+msgstr "błąd malloc: nie udało się zaalokować %d bajtów"
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr ""
-"nie udało się stworzenie pamięci podręcznej pakietu, używanie /tmp w zamian\n"
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr ""
-"uwaga: nie udało się stworzenie pamięci podręcznej pakietu, używanie /tmp w "
-"zamian"
-
-#: lib/libalpm/sync.c:833
#, c-format
-msgid "failed to retrieve some files from %s\n"
-msgstr "nie udało się pobrać niektórych plików z %s\n"
+msgid "command: %s\n"
+msgstr ""
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
+#, fuzzy, c-format
+msgid "can't get md5 checksum for file %s\n"
msgstr "nie udało się otrzymać sum kontrolnych md5 lub sha1 dla pakietu %s\n"
-#: lib/libalpm/sync.c:894
-#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "archiwum %s było uszkodzone (błąd sumy kontrolnej MD5 lub SHA1)\n"
+#: lib/libalpm/sync.c:910
+#, fuzzy, c-format
+msgid "file %s was corrupted (bad MD5 checksum)\n"
+msgstr "archiwum %s było skorumpowane (błąd sumy kontrolnej MD5 lub SHA1)\n"
-#: lib/libalpm/sync.c:896
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "archiwum %s jest uszkodzone (błąd sumy kontrolnej MD5 lub SHA1)\n"
+msgid "failed to retrieve some files from %s\n"
+msgstr "nie udało się pobrać niektórych plików z %s\n"
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
+#: lib/libalpm/sync.c:1137
+#, fuzzy
+msgid "could not create removal transaction\n"
msgstr "nie udało się utworzyć tranzakcji usuwania"
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
+#: lib/libalpm/sync.c:1143
+#, fuzzy
+msgid "could not initialize the removal transaction\n"
msgstr "nie udało się zainicjować tranzakcji usuwania"
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr "usuwanie pakietów konfliktujących i pakietów do zastąpienia"
-
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
+#: lib/libalpm/sync.c:1165
+#, fuzzy
+msgid "could not prepare removal transaction\n"
msgstr "nie udało się przygotować tranzakcji usuwania"
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
+#: lib/libalpm/sync.c:1171
+#, fuzzy
+msgid "could not commit removal transaction\n"
msgstr "nie udało się wykonać tranzakcji usuwania"
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr "instalowanie pakietów"
-
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
+#: lib/libalpm/sync.c:1182
+#, fuzzy
+msgid "could not create transaction\n"
msgstr "nie udało się stworzyć tranzakcji"
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
+#: lib/libalpm/sync.c:1187
+#, fuzzy
+msgid "could not initialize transaction\n"
msgstr "nie udało się zainicjować tranzakcji"
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
+#: lib/libalpm/sync.c:1214
+#, fuzzy
+msgid "could not prepare transaction\n"
msgstr "nie udało się przygotować tranzakcji"
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
-msgstr "aktualizowanie baz danych dla zależności zastąpionych pakietów"
+#: lib/libalpm/sync.c:1219
+#, fuzzy
+msgid "could not commit transaction\n"
+msgstr "nie udało się wykonać tranzakcji"
-#: lib/libalpm/sync.c:1030
-#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr "nie udało się zaktualizować requiredby dla wpisu %s-%s w bazie danych"
+#: lib/libalpm/trans.c:214
+#, fuzzy, c-format
+msgid "could not remove lock file %s\n"
+msgstr "nie udało się usunąć pliku blokującego %s"
-#: lib/libalpm/sync.c:1039
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "could not update new database entry %s-%s"
-msgstr "nie udało się zaktualizować nowego wpisu %s-%s w bazie danych"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
+msgstr ""
-#: lib/libalpm/sync.c:1079
-#, c-format
-msgid "found package '%s-%s' in sync"
-msgstr "znaleziono pakiet '%s-%s' w sync"
+#: lib/libalpm/trans.c:494
+#, fuzzy
+msgid "could not create temp directory\n"
+msgstr "nie udało się stworzyć katalogu tymczasowego"
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr "pakiet '%s' nie został odnaleziony w sync"
+#: lib/libalpm/trans.c:536
+#, fuzzy, c-format
+msgid "could not change directory to %s (%s)\n"
+msgstr "nie udało się zmienić katalogu na %s (%s)"
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr "aktualizowanie pól 'requiredby' pakietów zależności dla %s-%s"
+#: lib/libalpm/trans.c:554
+#, fuzzy, c-format
+msgid "could not fork a new process (%s)\n"
+msgstr "nie udało się odwidlić nowego procesu (%s)"
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
-msgstr ""
-"pakiet nie ma żadnych zależności, brak innych pakietów do zaktualizowania"
+#: lib/libalpm/trans.c:564
+#, fuzzy, c-format
+msgid "could not change the root directory (%s)\n"
+msgstr "nie udało się zmienić katalogu głównego (%s)"
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr "aktualizowanie pola 'requiredby' dla pakietu '%s'"
+#: lib/libalpm/trans.c:569
+#, fuzzy, c-format
+msgid "could not change directory to / (%s)\n"
+msgstr "nie udało się zmienić katalogu na / (%s)"
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
-#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
+#: lib/libalpm/trans.c:578
+#, fuzzy, c-format
+msgid "call to popen failed (%s)"
+msgstr "zawołanie do waitpid nieudane (%s)"
+
+#: lib/libalpm/trans.c:597
+#, fuzzy, c-format
+msgid "call to waitpid failed (%s)\n"
+msgstr "zawołanie do waitpid nieudane (%s)"
+
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
msgstr ""
-"nie udało się zaktualizować wpisu do bazy danych 'requiredby' dla %s-%s"
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr "nie udało się odnaleźć zależności '%s'"
+#: lib/libalpm/trans.c:615
+#, fuzzy, c-format
+msgid "could not remove tmpdir %s\n"
+msgstr "nie udało się usunąć katalogu tymczasowego %s"
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
+#: lib/libalpm/util.c:204
+#, fuzzy, c-format
+msgid "failed to make path '%s' : %s\n"
msgstr "nie udało się stworzyć ścieżki '%s' : %s"
-#: lib/libalpm/util.c:280
+#: lib/libalpm/util.c:389
#, c-format
msgid "could not open %s: %s\n"
msgstr "nie udało się otworzyć %s: %s\n"
-#: lib/libalpm/util.c:293
+#: lib/libalpm/util.c:573
#, c-format
-msgid "could not extract %s: %s\n"
-msgstr "nie udało się rozpakować %s: %s\n"
+msgid "no %s cache exists, creating...\n"
+msgstr "brak pamięci podręcznej dla %s, tworzenie...\n"
-#: lib/libalpm/util.c:350
-#, c-format
-msgid "logaction called: %s"
-msgstr "zawołane logaction: %s"
+#: lib/libalpm/util.c:593
+#, fuzzy
+msgid "couldn't create package cache, using /tmp instead\n"
+msgstr ""
+"nie udało się stworzenie pamięci podręcznej pakietu, używanie /tmp w zamian\n"
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
-msgstr "nie udało się stworzyć katalogu tymczasowego"
+#: lib/libalpm/util.c:643
+#, fuzzy, c-format
+msgid "md5: %s can't be opened\n"
+msgstr "%s nie może być otwarte\n"
-#: lib/libalpm/util.c:472
-#, c-format
-msgid "could not change directory to %s (%s)"
-msgstr "nie udało się zmienić katalogu na %s (%s)"
+#: lib/libalpm/util.c:645
+#, fuzzy, c-format
+msgid "md5: %s can't be read\n"
+msgstr "%s nie może być otwarte\n"
-#: lib/libalpm/util.c:476
-#, c-format
-msgid "executing %s script..."
-msgstr "wykonywanie skryptu %s..."
+#~ msgid "please remove '%s' first, using -Rd"
+#~ msgstr "proszę usunąć pierw '%s', korzystając z -Rd"
-#: lib/libalpm/util.c:489
-#, c-format
-msgid "could not fork a new process (%s)"
-msgstr "nie udało się odwidlić nowego procesu (%s)"
+#~ msgid "could not extract %s (%s)"
+#~ msgstr "nie udało się rozpakować %s (%s)"
-#: lib/libalpm/util.c:496
-#, c-format
-msgid "chrooting in %s"
-msgstr "chroot'owanie do %s"
+#~ msgid "could not update provision '%s' from '%s'"
+#~ msgstr "nie udało się zaktualizować zasobu '%s' z '%s'"
-#: lib/libalpm/util.c:498
-#, c-format
-msgid "could not change the root directory (%s)"
-msgstr "nie udało się zmienić katalogu głównego (%s)"
+#, fuzzy
+#~ msgid "%s: description file is missing"
+#~ msgstr "%s: błąd składni w pliku opisu linia %d"
-#: lib/libalpm/util.c:502
-#, c-format
-msgid "could not change directory to / (%s)"
-msgstr "nie udało się zmienić katalogu na / (%s)"
+#~ msgid "malloc failed: could not allocate %d bytes"
+#~ msgstr "błąd malloc: nie udało się zaalokować %d bajtów"
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
-msgstr "wykonywanie \"%s\""
+#~ msgid ""
+#~ "cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
+#~ msgstr ""
+#~ "nie udało się rozwiązać zależności dla \"%s\" (\"%s\" nie znajduje się w "
+#~ "zbiorze pakietów)"
-#: lib/libalpm/util.c:509
-#, c-format
-msgid "call to popen failed (%s)"
-msgstr "zawołanie do popen nieudane (%s)"
+#~ msgid "cannot canonicalize specified root path '%s'"
+#~ msgstr "nie udało się skanonizować podanej ścieżki docelowej '%s'"
-#: lib/libalpm/util.c:541
-#, c-format
-msgid "call to waitpid failed (%s)"
-msgstr "zawołanie do waitpid nieudane (%s)"
+#~ msgid "could not get sha1sum for package %s-%s"
+#~ msgstr "nie udało się otrzymać sumy sha1 dla pakietu %s-%s"
-#: lib/libalpm/util.c:550
-#, c-format
-msgid "could not remove tmpdir %s"
-msgstr "nie udało się usunąć katalogu tymczasowego %s"
+#~ msgid "sha1sums do not match for package %s-%s"
+#~ msgstr "sumy kontrolne sha1 dla pakietu %s-%s nie zgadzają się"
-#: lib/libalpm/util.c:568
-#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr "nie udało się odczytać informacji o ilości danych na dysku z %s: %s"
+#~ msgid "cannot remove file %s: %s"
+#~ msgstr "nie udało się usunąć pliku %s: %s"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
-msgstr "check_freespace: pełen rozmiar pakietu: %lld, wolna przestrzeń: %lld"
+#~ msgid "sha1: %s can't be opened\n"
+#~ msgstr "sha1: %s nie może zostać otwarty\n"
-#: lib/libalpm/versioncmp.c:279
-#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr "depcmp: %s-%s %s %s-%s => %s"
+#~ msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
+#~ msgstr "archiwum %s jest skorumpowane (błąd sumy kontrolnej MD5 lub SHA1)\n"
-#: lib/libalpm/versioncmp.c:284
-#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr "depcmp: %s-%s %s %s => %s"
+#~ msgid "could not update requiredby for database entry %s-%s"
+#~ msgstr ""
+#~ "nie udało się zaktualizować requiredby dla wpisu %s-%s w bazie danych"
+
+#~ msgid "could not update new database entry %s-%s"
+#~ msgstr "nie udało się zaktualizować nowego wpisu %s-%s w bazie danych"
+
+#~ msgid "could not update 'requiredby' database entry %s-%s"
+#~ msgstr ""
+#~ "nie udało się zaktualizować wpisu do bazy danych 'requiredby' dla %s-%s"
diff --git a/lib/libalpm/po/pt_BR.po b/lib/libalpm/po/pt_BR.po
index 5d734e38..35c7c880 100644
--- a/lib/libalpm/po/pt_BR.po
+++ b/lib/libalpm/po/pt_BR.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pt_BR\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
"PO-Revision-Date: 2007-03-07 01:18-0300\n"
"Last-Translator: Douglas Soares de Andrade <dsandrade@gmail.com>\n"
"Language-Team: Português do Brasil <pt@li.org>\n"
@@ -22,1495 +22,683 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: KBabel 1.11.4\n"
-#: lib/libalpm/add.c:77
-#, c-format
-msgid "loading target '%s'"
-msgstr "carregando pacotes '%s'"
-
-#: lib/libalpm/add.c:122
-#, c-format
-msgid "replacing older version %s-%s by %s in target list"
+#: lib/libalpm/add.c:88
+#, fuzzy, c-format
+msgid "replacing older version %s-%s by %s in target list\n"
msgstr "substituindo a versão antiga %s-%s por '%s' na lista de pacotes"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
+#: lib/libalpm/add.c:97
+#, fuzzy, c-format
+msgid "newer version %s-%s is in the target list -- skipping\n"
msgstr "versão atualizada %s-%s está na lista de pacotes -- pulando"
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "lendo os metadados de '%s'"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "procurando por dependências não satisfeitas"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
+msgstr ""
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "procurando por conflitos"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
+msgstr ""
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
+#: lib/libalpm/add.c:172
+#, fuzzy
+msgid "replacing packages with -A and -U is not supported yet\n"
msgstr "substituir pacotes com -A e -U ainda não é suportado"
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "por favor, remova '%s' primeiro usando -Rd"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "ordenando por dependências"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "finalizando"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "procurando por conflitos de arquivos"
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "atualizando pacote %s-%s"
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "adicionando pacote %s-%s"
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "removendo pacotes antigos primeiro (%s-%s)"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
+msgstr ""
-#: lib/libalpm/add.c:411
+#: lib/libalpm/add.c:365
#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr "adicionando %s para NoUpgrade temporariamente"
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "extraindo arquivos"
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "não foi possível obter o diretório de trabalho atual"
+msgid ""
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
+msgstr ""
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
+#: lib/libalpm/add.c:392
#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s está incluso em NoExtract -- não descompactando"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr ""
-#: lib/libalpm/add.c:508
+#: lib/libalpm/add.c:399
#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
-msgstr "o pacote %s está incluso em trans->skip_add, não descompactando"
+msgid "extract: not overwriting dir with file %s\n"
+msgstr ""
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
+#, fuzzy, c-format
+msgid "could not extract %s (%s)\n"
msgstr "não foi possível extrair %s (%s)"
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "verificando hashes md5 para %s"
-
-#: lib/libalpm/add.c:600
-#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "verificando hashes sha1 para %s"
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr "atual: %s"
-
-#: lib/libalpm/add.c:603
-#, c-format
-msgid "new: %s"
-msgstr "novo: %s"
-
-#: lib/libalpm/add.c:604
-#, c-format
-msgid "original: %s"
-msgstr "original: %s"
-
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
+#: lib/libalpm/add.c:505
+#, fuzzy, c-format
+msgid "could not rename %s (%s)\n"
msgstr "não foi possível renomear %s (%s)"
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "erro: não foi possível renomear %s (%s)"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
+#, fuzzy, c-format
+msgid "could not copy tempfile to %s (%s)\n"
msgstr "não foi possível copiar arquivo temporário para %s (%s)"
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "erro: não foi possível copiar arquivo temporário para %s (%s)"
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
+#, fuzzy, c-format
+msgid "%s saved as %s\n"
msgstr "%s salvo como %s"
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "aviso: %s salvo como %s"
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "ação: instalando novo arquivo: %s"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "ação: preservando o arquivo existente"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-"ação: preservando o arquivo existente e instalando o novo com um final ."
-"pacnew"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
+#: lib/libalpm/add.c:556
+#, fuzzy, c-format
+msgid "could not install %s as %s: %s\n"
msgstr "não foi possível instalar %s como %s: %s"
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "erro: não foi possível instalar %s como %s: %s"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
+#: lib/libalpm/add.c:559
+#, fuzzy, c-format
+msgid "%s installed as %s\n"
msgstr "%s instalado como %s"
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "atenção: %s instalado como %s"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s está como NoUpgrade -- pulando"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
+#: lib/libalpm/add.c:576
+#, fuzzy, c-format
+msgid "extracting %s as %s.pacnew\n"
msgstr "extraindo %s como %s.pacnew"
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "aviso: extraindo %s como %s.pacnew"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "extraindo %s"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "erro: não foi possível descompactar %s (%s)"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr "adicionando entrada de backup para %s"
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+#, fuzzy
+msgid "could not get current working directory\n"
+msgstr "não foi possível obter o diretório de trabalho atual"
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
+#: lib/libalpm/add.c:765
+#, fuzzy, c-format
+msgid "problem occurred while upgrading %s\n"
msgstr "erros ocorreram durante %s %s"
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "atualizando"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "instalando"
-
-#: lib/libalpm/add.c:771
-#, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr "a provisão '%s' foi removida do pacote %s (%s => %s)"
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr "atualizando '%s' devido a uma mudança de provisão (%s)"
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr "não foi possível atualizar a provisão '%s' para '%s'"
-
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "atualizando base de dados"
-
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "adicionando a entrada de base de dados '%s'"
+#: lib/libalpm/add.c:770
+#, fuzzy, c-format
+msgid "problem occurred while installing %s\n"
+msgstr "erros ocorreram durante %s %s"
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
+#: lib/libalpm/add.c:785
+#, fuzzy, c-format
+msgid "could not update database entry %s-%s\n"
msgstr "não foi possível atualizar a entrada na base de dados %s-%s"
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
-msgstr "não foi possível adicionar a entrada '%s' ao cache"
-
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "executando \"ldconfig -r %s\""
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr "removendo DB %s, %d continua existindo..."
-
-#: lib/libalpm/alpm.c:181
-#, c-format
-msgid "unregistering database '%s'"
-msgstr "desregistrando a base de dados '%s'"
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "fechando a base de dados '%s'"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-"adicionando novo servidor à base de dados '%s': protocolo '%s', servidor '%"
-"s', caminho '%s'"
-
-#: lib/libalpm/alpm.c:236
-#, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "lista de servidores nivelada para '%s'"
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr ""
-"falha para conseguir o horário da última atualização de %s (no big deal)"
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "falha ao sincronizar base de dados: %s [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr "sincronizar: novo mtime para %s: %s"
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr "nivelando a base de dados %s%s"
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
-msgstr "não foi possível remover a entrada da base de dados %s%s"
-
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "não foi possível conseguir a soma sha1 para o pacote %s-%s"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "somas sha1 para o pacote %s - %s coincidem"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "somas sha1 não coincidem para o pacote %s-%s"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "não foi possível conseguir a soma md5 para o pacote %s-%s"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "somas md5 para o pacote %s - %s coincidem"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "somas md5 não coincidem para o pacote %s-%s"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "não foi possível remover o arquivo de lock %s"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "aviso: não foi possível remover o arquivo de lock %s"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "configuração: nova seção '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr "configuração: nopassiveftp"
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr "configuração: usesyslog"
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr "configuração: chomp"
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr "configuração: usecolor"
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr "configuração: including %s"
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr "configuração: noupgrade: %s"
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr "configuração: noextract: %s"
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr "configuração: ignorepkg: %s"
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr "configuração: holdpkg: %s"
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr "configuração: dbpath: %s"
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr "configuração: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1044
+#: lib/libalpm/add.c:793
#, fuzzy, c-format
-msgid "config: rootdir: %s"
-msgstr "configuração: cachedir: %s"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr "configuração: logfile: %s"
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr "configuração: xfercommand: %s"
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr "configuração: upgradedelay: %d"
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "verificando por substitutos do pacote"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "verificando substituto '%s' para o pacote '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr ""
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "descompactando base de dados '%s'"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr "abrindo base de dados '%s'"
+msgid "could not add entry '%s' in cache\n"
+msgstr "não foi possível adicionar a entrada '%s' ao cache"
-#: lib/libalpm/be_files.c:182
+#: lib/libalpm/be_files.c:223
#, fuzzy, c-format
-msgid "db scan could not find package: %s"
-msgstr "não foi possível encontrar a base de dados"
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
+msgid "invalid name for database entry '%s'\n"
msgstr "nome inválido para a entrada na base de dados '%s'"
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr ""
-
-#: lib/libalpm/be_files.c:226
-#, c-format
-msgid ""
-"request to read database info for a file-based package '%s', skipping..."
-msgstr ""
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
-msgstr ""
-
-#: lib/libalpm/be_files.c:247
+#: lib/libalpm/be_files.c:275
#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
+msgid "loading package data for %s : level=%d\n"
msgstr ""
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
+#, fuzzy, c-format
+msgid "could not open file %s: %s\n"
msgstr "não foi possível abrir o arquivo %s: %s"
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr ""
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr ""
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr ""
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:85
+#: lib/libalpm/cache.c:62
#, c-format
-msgid "freeing package cache for repository '%s'"
+msgid "adding '%s' to package cache for db '%s'\n"
msgstr ""
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr ""
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr ""
-
-#: lib/libalpm/cache.c:156
-#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr ""
-
-#: lib/libalpm/cache.c:178
-#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr ""
-
-#: lib/libalpm/cache.c:201
-#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:69
-#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:78
-#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
+#: lib/libalpm/db.c:285
#, fuzzy, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr "pacote '%s' conflita com '%s'"
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr ""
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr ""
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:201
-#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr ""
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr ""
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr ""
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr ""
-
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
-msgstr ""
-
-#: lib/libalpm/db.c:175
-#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr ""
-
-#: lib/libalpm/db.c:181
-#, c-format
-msgid "registering database '%s'"
-msgstr ""
-
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr ""
-
-#: lib/libalpm/db.c:197
-#, c-format
-msgid "opening database '%s'"
-msgstr "abrindo base de dados '%s'"
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr ""
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr ""
-
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr ""
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr ""
-
-#: lib/libalpm/deps.c:230
-#, c-format
-msgid "cannot find package installed '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:261
-#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:280
-#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:289
-#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:359
-#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:409
-#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr ""
-
-#: lib/libalpm/deps.c:485
-#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr ""
-
-#: lib/libalpm/deps.c:532
-#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
-msgstr ""
-
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
-#, c-format
-msgid "adding '%s' to the targets"
-msgstr ""
-
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
-msgstr ""
+msgid "could not remove database entry %s%s\n"
+msgstr "não foi possível remover a entrada da base de dados %s%s"
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
+#: lib/libalpm/db.c:553
+msgid "attempt to re-register the 'local' DB\n"
msgstr ""
-#: lib/libalpm/deps.c:630
-#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
-msgstr ""
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+#, fuzzy
+msgid "database path is undefined\n"
+msgstr "base de dados não inicializada"
-#: lib/libalpm/deps.c:647
-#, c-format
-msgid "dependency %s is already in the target list -- skipping"
+#: lib/libalpm/deps.c:173
+msgid "dependency cycle detected:\n"
msgstr ""
-#: lib/libalpm/deps.c:667
+#: lib/libalpm/deps.c:175
#, c-format
-msgid "pulling dependency %s (needed by %s)"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-#: lib/libalpm/deps.c:671
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "cannot resolve dependencies for \"%s\""
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-#: lib/libalpm/deps.c:687
+#: lib/libalpm/deps.c:573
#, c-format
-msgid "dependency cycle detected: %s"
-msgstr ""
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr ""
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr ""
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr ""
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr ""
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr ""
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+#, fuzzy
+msgid "could not find or read directory"
+msgstr "não foi possível obter o diretório de trabalho atual"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr ""
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr "biblioteca não inicializada"
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr "biblioteca já inicializada"
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr ""
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "não foi possível abrir a base de dados"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "não foi possível criar a base de dados"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "base de dados não inicializada"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "base de dados já registrada"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "não foi possível encontrar a base de dados"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "não foi possível atualizar a base de dados"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "não foi possível remover a entrada da base de dados"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr ""
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr ""
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr ""
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr ""
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr "alvo duplicado"
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr ""
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr ""
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr ""
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr ""
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr ""
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr ""
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr ""
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr ""
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr ""
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr ""
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr ""
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr ""
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "o nome do pacote não é valido"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr "pacote corrompido"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr ""
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+#, fuzzy
+msgid "corrupted delta"
+msgstr "pacote corrompido"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr ""
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "grupo não encontrado"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr ""
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr ""
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr ""
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr ""
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "erro interno"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr ""
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "espaço insuficiente em disco"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr ""
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr ""
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr ""
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr ""
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr ""
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "expressão regular inválida"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr ""
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "erro inesperado"
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr ""
-
-#: lib/libalpm/handle.c:175
-#, c-format
-msgid "option 'root' = %s"
-msgstr ""
-
-#: lib/libalpm/handle.c:195
-#, c-format
-msgid "option 'dbpath' = %s"
-msgstr ""
-
-#: lib/libalpm/handle.c:211
-#, c-format
-msgid "option 'cachedir' = %s"
-msgstr ""
-
-#: lib/libalpm/md5driver.c:56
-#, c-format
-msgid "%s can't be opened\n"
-msgstr ""
-
-#: lib/libalpm/md5driver.c:74
-#, c-format
-msgid "md5(%s) = %s"
-msgstr ""
-
-#: lib/libalpm/package.c:147
-#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr ""
-
-#: lib/libalpm/package.c:158
-#, c-format
-msgid "%s: forcing upgrade to version %s"
-msgstr ""
-
-#: lib/libalpm/package.c:163
-#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
-msgstr ""
-
-#: lib/libalpm/package.c:171
-#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
-msgstr ""
-
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
-#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr ""
+#: lib/libalpm/package.c:124
+#, fuzzy, c-format
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "não foi possível conseguir a soma md5 para o pacote %s-%s"
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
-msgstr ""
+#: lib/libalpm/package.c:133
+#, fuzzy, c-format
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "somas md5 não coincidem para o pacote %s-%s"
-#: lib/libalpm/package.c:359
+#: lib/libalpm/package.c:737
#, c-format
-msgid "missing package name in %s"
+msgid "%s: forcing upgrade to version %s\n"
msgstr ""
-#: lib/libalpm/package.c:363
+#: lib/libalpm/package.c:742
#, c-format
-msgid "missing package version in %s"
+msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr ""
-#: lib/libalpm/package.c:398
+#: lib/libalpm/package.c:750
#, c-format
-msgid "could not remove tempfile %s"
+msgid "%s-%s: delaying upgrade of package (%s)\n"
msgstr ""
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
-msgstr ""
+#: lib/libalpm/package.c:931
+#, fuzzy, c-format
+msgid "could not parse package description file in %s\n"
+msgstr "não foi possível remover o arquivo de lock %s"
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
-msgstr ""
+#: lib/libalpm/package.c:936
+#, fuzzy, c-format
+msgid "missing package name in %s\n"
+msgstr "o nome do pacote não é valido"
-#: lib/libalpm/package.c:431
+#: lib/libalpm/package.c:940
#, c-format
-msgid "missing package filelist in %s, generating one"
+msgid "missing package version in %s\n"
msgstr ""
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr ""
+#: lib/libalpm/package.c:970
+#, fuzzy, c-format
+msgid "could not remove tempfile %s\n"
+msgstr "não foi possível remover o arquivo de lock %s"
-#: lib/libalpm/package.c:584
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
+msgid "error while reading package %s: %s\n"
msgstr ""
-#: lib/libalpm/remove.c:79
+#: lib/libalpm/package.c:1005
#, c-format
-msgid "could not find %s in database"
+msgid "missing package metadata in %s\n"
msgstr ""
-#: lib/libalpm/remove.c:93
+#: lib/libalpm/package.c:1012
#, c-format
-msgid "adding %s in the targets list"
+msgid "missing package filelist in %s, generating one\n"
msgstr ""
#: lib/libalpm/remove.c:121
-#, c-format
-msgid "pulling %s in the targets list"
-msgstr ""
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
-msgstr ""
-
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr ""
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
-msgstr ""
-
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr ""
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "o arquivo %s não existe"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "mantendo diretório %s"
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "removendo diretório %s"
-
-#: lib/libalpm/remove.c:236
-#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr ""
-
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
-msgstr ""
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr ""
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr ""
-
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr ""
-
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
-msgstr ""
+#, fuzzy, c-format
+msgid "could not find %s in database -- skipping\n"
+msgstr "não foi possível encontrar a base de dados"
-#: lib/libalpm/remove.c:316
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
#, fuzzy, c-format
-msgid "removing %d files"
-msgstr "removendo diretório %s"
+msgid "cannot remove file '%s': %s\n"
+msgstr "não foi possível abrir o arquivo %s: %s"
#: lib/libalpm/remove.c:337
-#, c-format
-msgid "removing database entry '%s'"
-msgstr ""
-
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
-msgstr ""
-
-#: lib/libalpm/remove.c:344
-#, c-format
-msgid "could not remove entry '%s' from cache"
-msgstr ""
+#, fuzzy, c-format
+msgid "could not remove database entry %s-%s\n"
+msgstr "não foi possível remover a entrada da base de dados %s%s"
-#: lib/libalpm/sha1.c:397
-#, c-format
-msgid "sha1: %s can't be opened\n"
-msgstr ""
+#: lib/libalpm/remove.c:342
+#, fuzzy, c-format
+msgid "could not remove entry '%s' from cache\n"
+msgstr "não foi possível adicionar a entrada '%s' ao cache"
-#: lib/libalpm/sha1.c:412
+#: lib/libalpm/server.c:56
#, c-format
-msgid "sha1(%s) = %s"
+msgid "url '%s' is invalid, ignoring\n"
msgstr ""
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
msgstr ""
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
+#: lib/libalpm/server.c:241
+msgid "disk"
msgstr ""
-#: lib/libalpm/sync.c:270
+#: lib/libalpm/server.c:245
#, c-format
-msgid "searching for target in repo '%s'"
+msgid "failed retrieving file '%s' from %s : %s\n"
msgstr ""
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
-#, c-format
-msgid "target '%s' not found -- looking for provisions"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
msgstr ""
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr ""
+#: lib/libalpm/server.c:288
+#, fuzzy, c-format
+msgid "cannot write to file '%s'\n"
+msgstr "não foi possível remover o arquivo de lock %s"
-#: lib/libalpm/sync.c:290
+#: lib/libalpm/server.c:307
#, c-format
-msgid "repository '%s' not found"
+msgid "error downloading '%s': %s\n"
msgstr ""
-#: lib/libalpm/sync.c:331
+#: lib/libalpm/server.c:319
#, c-format
-msgid "%s-%s is up to date -- skipping"
+msgid "error writing to file '%s': %s\n"
msgstr ""
-#: lib/libalpm/sync.c:354
-#, c-format
-msgid "adding target '%s' to the transaction set"
-msgstr ""
-
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr ""
-
-#: lib/libalpm/sync.c:422
-#, c-format
-msgid "adding package %s-%s to the transaction targets"
-msgstr ""
+#: lib/libalpm/server.c:387
+#, fuzzy, c-format
+msgid "could not chdir to %s\n"
+msgstr "não foi possível extrair %s (%s)"
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
msgstr ""
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "pacote '%s' conflita com '%s'"
-
-#: lib/libalpm/sync.c:516
-#, c-format
-msgid "'%s' not found in transaction set -- skipping"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
msgstr ""
-#: lib/libalpm/sync.c:527
+#: lib/libalpm/server.c:458
#, c-format
-msgid "package '%s' provides its own conflict"
+msgid "failed to download %s\n"
msgstr ""
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
+#: lib/libalpm/sync.c:135
#, c-format
-msgid "'%s' is in the target list -- keeping it"
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
msgstr ""
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
-#, c-format
-msgid "removing '%s' from target list"
-msgstr "removendo '%s' da lista de alvos"
-
-#: lib/libalpm/sync.c:576
+#: lib/libalpm/sync.c:250
#, c-format
-msgid "resolving package '%s' conflict"
+msgid "%s: ignoring package upgrade (%s => %s)\n"
msgstr ""
-#: lib/libalpm/sync.c:599
+#: lib/libalpm/sync.c:320
#, c-format
-msgid "electing '%s' for removal"
-msgstr ""
-
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
-msgstr ""
-
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr ""
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
+msgid "repository '%s' not found\n"
msgstr ""
-#: lib/libalpm/sync.c:712
-#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
-msgstr ""
+#: lib/libalpm/sync.c:354
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "versão atualizada %s-%s está na lista de pacotes -- pulando"
-#: lib/libalpm/sync.c:808
+#: lib/libalpm/sync.c:358
#, c-format
-msgid "%s is already in the cache\n"
+msgid "%s-%s is up to date -- reinstalling\n"
msgstr ""
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+msgid "unresolvable package conflicts detected\n"
msgstr ""
-#: lib/libalpm/sync.c:820
+#: lib/libalpm/sync.c:628
#, c-format
-msgid "warning: no %s cache exists, creating..."
+msgid "malloc failure: could not allocate %zd bytes\n"
msgstr ""
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr ""
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr ""
-
-#: lib/libalpm/sync.c:833
#, c-format
-msgid "failed to retrieve some files from %s\n"
+msgid "command: %s\n"
msgstr ""
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
-msgstr ""
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
+#, fuzzy, c-format
+msgid "can't get md5 checksum for file %s\n"
+msgstr "não foi possível conseguir a soma md5 para o pacote %s-%s"
-#: lib/libalpm/sync.c:894
+#: lib/libalpm/sync.c:910
#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
+msgid "file %s was corrupted (bad MD5 checksum)\n"
msgstr ""
-#: lib/libalpm/sync.c:896
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr ""
-
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr ""
-
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
+msgid "failed to retrieve some files from %s\n"
msgstr ""
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
-msgstr ""
+#: lib/libalpm/sync.c:1137
+#, fuzzy
+msgid "could not create removal transaction\n"
+msgstr "não foi possível criar a base de dados"
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
+#: lib/libalpm/sync.c:1143
+msgid "could not initialize the removal transaction\n"
msgstr ""
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
-msgstr ""
+#: lib/libalpm/sync.c:1165
+#, fuzzy
+msgid "could not prepare removal transaction\n"
+msgstr "não foi possível criar a base de dados"
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
+#: lib/libalpm/sync.c:1171
+msgid "could not commit removal transaction\n"
msgstr ""
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
-msgstr ""
+#: lib/libalpm/sync.c:1182
+#, fuzzy
+msgid "could not create transaction\n"
+msgstr "não foi possível criar a base de dados"
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
+#: lib/libalpm/sync.c:1187
+msgid "could not initialize transaction\n"
msgstr ""
-#: lib/libalpm/sync.c:1030
-#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr ""
+#: lib/libalpm/sync.c:1214
+#, fuzzy
+msgid "could not prepare transaction\n"
+msgstr "não foi possível criar a base de dados"
-#: lib/libalpm/sync.c:1039
-#, c-format
-msgid "could not update new database entry %s-%s"
+#: lib/libalpm/sync.c:1219
+msgid "could not commit transaction\n"
msgstr ""
-#: lib/libalpm/sync.c:1079
+#: lib/libalpm/trans.c:214
#, fuzzy, c-format
-msgid "found package '%s-%s' in sync"
-msgstr "atualizando pacote %s-%s"
-
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr ""
-
-#: lib/libalpm/trans.c:271
-#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr ""
-
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
-msgstr ""
-
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr ""
+msgid "could not remove lock file %s\n"
+msgstr "não foi possível remover o arquivo de lock %s"
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
msgstr ""
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr "não foi possível encontrar a dependência '%s'"
+#: lib/libalpm/trans.c:494
+#, fuzzy
+msgid "could not create temp directory\n"
+msgstr "não foi possível obter o diretório de trabalho atual"
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
-msgstr ""
+#: lib/libalpm/trans.c:536
+#, fuzzy, c-format
+msgid "could not change directory to %s (%s)\n"
+msgstr "não foi possível extrair %s (%s)"
-#: lib/libalpm/util.c:280
-#, c-format
-msgid "could not open %s: %s\n"
-msgstr ""
+#: lib/libalpm/trans.c:554
+#, fuzzy, c-format
+msgid "could not fork a new process (%s)\n"
+msgstr "não foi possível renomear %s (%s)"
-#: lib/libalpm/util.c:293
-#, c-format
-msgid "could not extract %s: %s\n"
-msgstr ""
+#: lib/libalpm/trans.c:564
+#, fuzzy, c-format
+msgid "could not change the root directory (%s)\n"
+msgstr "não foi possível obter o diretório de trabalho atual"
-#: lib/libalpm/util.c:350
-#, c-format
-msgid "logaction called: %s"
-msgstr ""
+#: lib/libalpm/trans.c:569
+#, fuzzy, c-format
+msgid "could not change directory to / (%s)\n"
+msgstr "não foi possível extrair %s (%s)"
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
-msgstr ""
+#: lib/libalpm/trans.c:578
+#, fuzzy, c-format
+msgid "call to popen failed (%s)"
+msgstr "não foi possível abrir o arquivo %s: %s"
-#: lib/libalpm/util.c:472
+#: lib/libalpm/trans.c:597
#, c-format
-msgid "could not change directory to %s (%s)"
+msgid "call to waitpid failed (%s)\n"
msgstr ""
-#: lib/libalpm/util.c:476
-#, c-format
-msgid "executing %s script..."
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
msgstr ""
-#: lib/libalpm/util.c:489
-#, c-format
-msgid "could not fork a new process (%s)"
-msgstr ""
+#: lib/libalpm/trans.c:615
+#, fuzzy, c-format
+msgid "could not remove tmpdir %s\n"
+msgstr "não foi possível remover o arquivo de lock %s"
-#: lib/libalpm/util.c:496
+#: lib/libalpm/util.c:204
#, c-format
-msgid "chrooting in %s"
+msgid "failed to make path '%s' : %s\n"
msgstr ""
-#: lib/libalpm/util.c:498
+#: lib/libalpm/util.c:389
#, c-format
-msgid "could not change the root directory (%s)"
+msgid "could not open %s: %s\n"
msgstr ""
-#: lib/libalpm/util.c:502
+#: lib/libalpm/util.c:573
#, c-format
-msgid "could not change directory to / (%s)"
+msgid "no %s cache exists, creating...\n"
msgstr ""
-#: lib/libalpm/util.c:506
-#, c-format
-msgid "executing \"%s\""
-msgstr "executando \"%s\""
-
-#: lib/libalpm/util.c:509
-#, c-format
-msgid "call to popen failed (%s)"
+#: lib/libalpm/util.c:593
+msgid "couldn't create package cache, using /tmp instead\n"
msgstr ""
-#: lib/libalpm/util.c:541
+#: lib/libalpm/util.c:643
#, c-format
-msgid "call to waitpid failed (%s)"
+msgid "md5: %s can't be opened\n"
msgstr ""
-#: lib/libalpm/util.c:550
+#: lib/libalpm/util.c:645
#, c-format
-msgid "could not remove tmpdir %s"
+msgid "md5: %s can't be read\n"
msgstr ""
-#: lib/libalpm/util.c:568
-#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr ""
+#~ msgid "please remove '%s' first, using -Rd"
+#~ msgstr "por favor, remova '%s' primeiro usando -Rd"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
-msgstr ""
+#~ msgid "could not extract %s (%s)"
+#~ msgstr "não foi possível extrair %s (%s)"
-#: lib/libalpm/versioncmp.c:279
-#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr ""
+#~ msgid "could not update provision '%s' from '%s'"
+#~ msgstr "não foi possível atualizar a provisão '%s' para '%s'"
-#: lib/libalpm/versioncmp.c:284
-#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr ""
+#~ msgid "could not get sha1sum for package %s-%s"
+#~ msgstr "não foi possível conseguir a soma sha1 para o pacote %s-%s"
-#~ msgid "%s saved as %s.pacorig"
-#~ msgstr "%s salvo como %s.pacorig"
+#~ msgid "sha1sums do not match for package %s-%s"
+#~ msgstr "somas sha1 não coincidem para o pacote %s-%s"
diff --git a/lib/libalpm/po/ru_RU.po b/lib/libalpm/po/ru_RU.po
index ec5eb0d7..89fb8f28 100644
--- a/lib/libalpm/po/ru_RU.po
+++ b/lib/libalpm/po/ru_RU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pacman package manager 3.0.0\n"
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
-"POT-Creation-Date: 2007-09-16 16:55-0500\n"
+"POT-Creation-Date: 2007-12-02 21:40-0600\n"
"PO-Revision-Date: 2007-03-16 02:52+1000\n"
"Last-Translator: Vladimir Bayrakovskiy <4rayven@gmail.com>\n"
"MIME-Version: 1.0\n"
@@ -16,1494 +16,692 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-#: lib/libalpm/add.c:77
+#: lib/libalpm/add.c:88
#, c-format
-msgid "loading target '%s'"
+msgid "replacing older version %s-%s by %s in target list\n"
msgstr ""
-#: lib/libalpm/add.c:122
-#, c-format
-msgid "replacing older version %s-%s by %s in target list"
-msgstr ""
+#: lib/libalpm/add.c:97
+#, fuzzy, c-format
+msgid "newer version %s-%s is in the target list -- skipping\n"
+msgstr "%s-%s не устарел -- пропускаю"
-#: lib/libalpm/add.c:131
-#, c-format
-msgid "newer version %s-%s is in the target list -- skipping"
+#: lib/libalpm/add.c:168
+msgid "conflicting packages were found in the target list\n"
msgstr ""
-#: lib/libalpm/add.c:138
-#, c-format
-msgid "reading '%s' metadata"
-msgstr "читаю метаданные из '%s'"
-
-#: lib/libalpm/add.c:191 lib/libalpm/remove.c:111
-msgid "looking for unsatisfied dependencies"
-msgstr "поиск неразрешенных зависимостей"
-
-#: lib/libalpm/add.c:203 lib/libalpm/sync.c:483
-msgid "looking for conflicts"
-msgstr "поиск конфликтов"
+#: lib/libalpm/add.c:169
+msgid "you cannot install two conflicting packages at the same time\n"
+msgstr ""
-#: lib/libalpm/add.c:208
-msgid "replacing packages with -A and -U is not supported yet"
+#: lib/libalpm/add.c:172
+#, fuzzy
+msgid "replacing packages with -A and -U is not supported yet\n"
msgstr "замещение пакетов с использованием опций -A и -U еще не реализовано"
-#: lib/libalpm/add.c:209
-#, c-format
-msgid "please remove '%s' first, using -Rd"
-msgstr "пожалуйста, уделите сначала '%s' используя -Rd"
-
-#: lib/libalpm/add.c:250 lib/libalpm/remove.c:147
-msgid "sorting by dependencies"
-msgstr "сортировка по зависимостям"
-
-#: lib/libalpm/add.c:262
-msgid "cleaning up"
-msgstr "прибираем за собой"
-
-#: lib/libalpm/add.c:277
-msgid "looking for file conflicts"
-msgstr "поиск конфликтующих файлов"
-
-#: lib/libalpm/add.c:346
-#, c-format
-msgid "upgrading package %s-%s"
-msgstr "обновляется пакет %s-%s"
-
-#: lib/libalpm/add.c:370
-#, c-format
-msgid "adding package %s-%s"
-msgstr "добавляю пакет %s-%s"
-
-#: lib/libalpm/add.c:383
-#, c-format
-msgid "removing old package first (%s-%s)"
-msgstr "сперва удаляю старый пакет (%s-%s)"
+#: lib/libalpm/add.c:173
+msgid "you can replace packages manually using -Rd and -U\n"
+msgstr ""
-#: lib/libalpm/add.c:411
+#: lib/libalpm/add.c:365
#, c-format
-msgid "adding %s to the NoUpgrade array temporarily"
-msgstr "временно добавляю %s в список NoUpgrade"
-
-#: lib/libalpm/add.c:429
-msgid "extracting files"
-msgstr "извлекаю файлы из архива"
-
-#: lib/libalpm/add.c:444 lib/libalpm/util.c:465
-msgid "could not get current working directory"
-msgstr "не могу определить текущую рабочую директорию"
+msgid ""
+"directory permissions differ on %s\n"
+"filesystem: %o package: %o\n"
+msgstr ""
-#: lib/libalpm/add.c:500 lib/libalpm/add.c:501
+#: lib/libalpm/add.c:392
#, c-format
-msgid "%s is in NoExtract, skipping extraction"
-msgstr "%s в списке NoExtract, пропускаю при распаковке"
+msgid "extract: symlink %s does not point to dir\n"
+msgstr ""
-#: lib/libalpm/add.c:508
+#: lib/libalpm/add.c:399
#, c-format
-msgid "%s is in trans->skip_add, skipping extraction"
+msgid "extract: not overwriting dir with file %s\n"
msgstr ""
-#: lib/libalpm/add.c:554 lib/libalpm/add.c:555 lib/libalpm/add.c:706
-#, c-format
-msgid "could not extract %s (%s)"
+#: lib/libalpm/add.c:454 lib/libalpm/add.c:598 lib/libalpm/util.c:422
+#, fuzzy, c-format
+msgid "could not extract %s (%s)\n"
msgstr "не могу извлечь %s (%s)"
-#: lib/libalpm/add.c:598
-#, c-format
-msgid "checking md5 hashes for %s"
-msgstr "проверяю md5 хеши для %s"
-
-#: lib/libalpm/add.c:600
-#, c-format
-msgid "checking sha1 hashes for %s"
-msgstr "проверяю sha1 хеши для %s"
-
-#: lib/libalpm/add.c:602
-#, c-format
-msgid "current: %s"
-msgstr "текущий: %s"
-
-#: lib/libalpm/add.c:603
-#, c-format
-msgid "new: %s"
-msgstr "новый: %s"
-
-#: lib/libalpm/add.c:604
-#, c-format
-msgid "original: %s"
-msgstr "исходный: %s"
-
-#: lib/libalpm/add.c:616
-#, c-format
-msgid "could not rename %s (%s)"
+#: lib/libalpm/add.c:505
+#, fuzzy, c-format
+msgid "could not rename %s (%s)\n"
msgstr "не могу переименовать %s (%s)"
-#: lib/libalpm/add.c:617
-#, c-format
-msgid "error: could not rename %s (%s)"
-msgstr "ошибка: не могу переименовать %s (%s)"
-
-#: lib/libalpm/add.c:623 lib/libalpm/add.c:642
-#, c-format
-msgid "could not copy tempfile to %s (%s)"
+#: lib/libalpm/add.c:512 lib/libalpm/add.c:532 lib/libalpm/trans.c:508
+#, fuzzy, c-format
+msgid "could not copy tempfile to %s (%s)\n"
msgstr "не могу скопировать временный файл в %s (%s)"
-#: lib/libalpm/add.c:624
-#, c-format
-msgid "error: could not copy tempfile to %s (%s)"
-msgstr "ошибка: не могу скопировать временный файл в %s (%s)"
-
-#: lib/libalpm/add.c:628 lib/libalpm/remove.c:247
-#, c-format
-msgid "%s saved as %s"
+#: lib/libalpm/add.c:517 lib/libalpm/remove.c:234
+#, fuzzy, c-format
+msgid "%s saved as %s\n"
msgstr "%s сохранен как %s"
-#: lib/libalpm/add.c:629
-#, c-format
-msgid "warning: %s saved as %s"
-msgstr "предупреждение: %s сохранен как %s"
-
-#: lib/libalpm/add.c:639
-#, c-format
-msgid "action: installing new file: %s"
-msgstr "действие: устанавливаю новый файл: %s"
-
-#: lib/libalpm/add.c:649 lib/libalpm/add.c:655 lib/libalpm/add.c:660
-msgid "action: leaving existing file in place"
-msgstr "действие: оставляем существующий файл на месте"
-
-#: lib/libalpm/add.c:663
-msgid "action: keeping current file and installing new one with .pacnew ending"
-msgstr ""
-"действие: оставляем текущий файл нетронутым и устанавливаем новый с "
-"суффиксом .pacnew"
-
-#: lib/libalpm/add.c:666
-#, c-format
-msgid "could not install %s as %s: %s"
+#: lib/libalpm/add.c:556
+#, fuzzy, c-format
+msgid "could not install %s as %s: %s\n"
msgstr "не могу установить %s как %s: %s"
-#: lib/libalpm/add.c:667
-#, c-format
-msgid "error: could not install %s as %s: %s"
-msgstr "ошибка: не могу установить %s как %s: %s"
-
-#: lib/libalpm/add.c:669
-#, c-format
-msgid "%s installed as %s"
+#: lib/libalpm/add.c:559
+#, fuzzy, c-format
+msgid "%s installed as %s\n"
msgstr "%s установлен как %s"
-#: lib/libalpm/add.c:670
-#, c-format
-msgid "warning: %s installed as %s"
-msgstr "предупреждение: %s установлен как %s"
-
-#: lib/libalpm/add.c:684
-#, c-format
-msgid "%s is in NoUpgrade -- skipping"
-msgstr "%s есть в списке NoUpgrade -- пропускаю"
-
-#: lib/libalpm/add.c:685
-#, c-format
-msgid "extracting %s as %s.pacnew"
+#: lib/libalpm/add.c:576
+#, fuzzy, c-format
+msgid "extracting %s as %s.pacnew\n"
msgstr "извлекаю %s как %s.pacnew"
-#: lib/libalpm/add.c:686
-#, c-format
-msgid "warning: extracting %s as %s.pacnew"
-msgstr "предупреждение: извлекаю %s как %s.pacnew"
-
-#: lib/libalpm/add.c:689
-#, c-format
-msgid "extracting %s"
-msgstr "извлекаю %s"
-
-#: lib/libalpm/add.c:707
-#, c-format
-msgid "error: could not extract %s (%s)"
-msgstr "ошибка: не могу извлечь %s (%s)"
-
-#: lib/libalpm/add.c:719
-#, c-format
-msgid "appending backup entry for %s"
-msgstr "добавляю запись для отката для %s"
+#: lib/libalpm/add.c:711 lib/libalpm/trans.c:529
+#, fuzzy
+msgid "could not get current working directory\n"
+msgstr "не могу определить текущую рабочую директорию"
-#: lib/libalpm/add.c:751 lib/libalpm/add.c:753
-#, c-format
-msgid "errors occurred while %s %s"
+#: lib/libalpm/add.c:765
+#, fuzzy, c-format
+msgid "problem occurred while upgrading %s\n"
msgstr "во время %s %s произошли ошибки"
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "upgrading"
-msgstr "обновляю"
-
-#: lib/libalpm/add.c:752 lib/libalpm/add.c:754
-msgid "installing"
-msgstr "устанавливаю"
-
-#: lib/libalpm/add.c:771
+#: lib/libalpm/add.c:770
#, fuzzy, c-format
-msgid "provision '%s' has been removed from package %s (%s => %s)"
-msgstr "'%s' был удален из пакета %s (%s => %s)"
-
-#: lib/libalpm/add.c:783
-#, c-format
-msgid "updating '%s' due to provision change (%s)"
-msgstr "обновляю '%s' в связи с изменениями в (%s)"
-
-#: lib/libalpm/add.c:787 lib/libalpm/add.c:788
-#, c-format
-msgid "could not update provision '%s' from '%s'"
-msgstr "не могу обновить '%s' из '%s'"
-
-#: lib/libalpm/add.c:801 lib/libalpm/remove.c:336
-msgid "updating database"
-msgstr "обновляю базу данных"
-
-#: lib/libalpm/add.c:802
-#, c-format
-msgid "adding database entry '%s'"
-msgstr "добавляю в базу данных запись '%s'"
+msgid "problem occurred while installing %s\n"
+msgstr "во время %s %s произошли ошибки"
-#: lib/libalpm/add.c:805 lib/libalpm/add.c:807
-#, c-format
-msgid "could not update database entry %s-%s"
+#: lib/libalpm/add.c:785
+#, fuzzy, c-format
+msgid "could not update database entry %s-%s\n"
msgstr "не могу обновить в базе данных запись %s-%s"
-#: lib/libalpm/add.c:813
-#, c-format
-msgid "could not add entry '%s' in cache"
-msgstr "не могу добавить запись '%s' в кэш"
-
-#: lib/libalpm/add.c:843 lib/libalpm/remove.c:363 lib/libalpm/sync.c:1055
-#, c-format
-msgid "running \"ldconfig -r %s\""
-msgstr "запускаю \"ldconfig -r %s\""
-
-#: lib/libalpm/alpm.c:116
-#, c-format
-msgid "removing DB %s, %d remaining..."
-msgstr "удаляю БД %s, %d осталось..."
-
-#: lib/libalpm/alpm.c:181
+#: lib/libalpm/add.c:793
#, fuzzy, c-format
-msgid "unregistering database '%s'"
-msgstr "дерегестрирую базу данных '%s'"
-
-#: lib/libalpm/alpm.c:186
-#, c-format
-msgid "closing database '%s'"
-msgstr "закрываю базу данных '%s'"
-
-#: lib/libalpm/alpm.c:232
-#, c-format
-msgid ""
-"adding new server to database '%s': protocol '%s', server '%s', path '%s'"
-msgstr ""
-"добавляю новый сервер в базу данных '%s': протокол '%s', сервер '%s', путь '%"
-"s'"
+msgid "could not add entry '%s' in cache\n"
+msgstr "не могу добавить запись '%s' в кэш"
-#: lib/libalpm/alpm.c:236
+#: lib/libalpm/be_files.c:223
#, fuzzy, c-format
-msgid "serverlist flushed for '%s'"
-msgstr "список серверов пополнен для '%s'"
-
-#: lib/libalpm/alpm.c:279
-#, c-format
-msgid "failed to get lastupdate time for %s (no big deal)"
-msgstr ""
-"не удалось узнать время последнего обновления для %s (ни чего страшного)"
-
-#: lib/libalpm/alpm.c:298
-#, c-format
-msgid "failed to sync db: %s [%d]"
-msgstr "не удалось синхронизировать базу данных: %s [%d]"
-
-#: lib/libalpm/alpm.c:302
-#, c-format
-msgid "sync: new mtime for %s: %s"
-msgstr "синхронизация: обновлен mtime для %s: %s"
-
-#: lib/libalpm/alpm.c:308
-#, c-format
-msgid "flushing database %s%s"
-msgstr "обновляю базу данных %s%s"
-
-#: lib/libalpm/alpm.c:312
-#, c-format
-msgid "could not remove database entry %s%s"
+msgid "invalid name for database entry '%s'\n"
msgstr "не могу удалить из базы данных запись %s%s"
-#: lib/libalpm/alpm.c:481
-#, c-format
-msgid "could not get sha1sum for package %s-%s"
-msgstr "не могу получить контрольную сумму sha1sum для пакета %s-%s"
-
-#: lib/libalpm/alpm.c:487
-#, c-format
-msgid "sha1sums for package %s-%s match"
-msgstr "контрольные суммы sha1sum для пакета %s-%s совпали"
-
-#: lib/libalpm/alpm.c:490
-#, c-format
-msgid "sha1sums do not match for package %s-%s"
-msgstr "контрольные суммы sha1sum для пакета %s-%s не совпали"
-
-#: lib/libalpm/alpm.c:525
-#, c-format
-msgid "could not get md5sum for package %s-%s"
-msgstr "не могу получить контрольную сумму md5sum для пакета %s-%s"
-
-#: lib/libalpm/alpm.c:531
-#, c-format
-msgid "md5sums for package %s-%s match"
-msgstr "контрольные суммы md5sum для пакета %s-%s совпали"
-
-#: lib/libalpm/alpm.c:534
-#, c-format
-msgid "md5sums do not match for package %s-%s"
-msgstr "контрольные суммы md5sum для пакета %s-%s не совпали"
-
-#: lib/libalpm/alpm.c:783
-#, c-format
-msgid "could not remove lock file %s"
-msgstr "не могу удалить lock-файл %s"
-
-#: lib/libalpm/alpm.c:784
-#, c-format
-msgid "warning: could not remove lock file %s"
-msgstr "предупреждение: не могу удалить lock-файл %s"
-
-#: lib/libalpm/alpm.c:920
-#, c-format
-msgid "config: new section '%s'"
-msgstr "config: новая секция '%s'"
-
-#: lib/libalpm/alpm.c:951
-msgid "config: nopassiveftp"
-msgstr ""
-
-#: lib/libalpm/alpm.c:954
-msgid "config: usesyslog"
-msgstr ""
-
-#: lib/libalpm/alpm.c:957
-msgid "config: chomp"
-msgstr ""
-
-#: lib/libalpm/alpm.c:960
-msgid "config: usecolor"
-msgstr ""
-
-#: lib/libalpm/alpm.c:969
-#, c-format
-msgid "config: including %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:979 lib/libalpm/alpm.c:984
-#, c-format
-msgid "config: noupgrade: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:992 lib/libalpm/alpm.c:997
-#, c-format
-msgid "config: noextract: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1005 lib/libalpm/alpm.c:1010
-#, c-format
-msgid "config: ignorepkg: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1018 lib/libalpm/alpm.c:1023
-#, c-format
-msgid "config: holdpkg: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1030
-#, c-format
-msgid "config: dbpath: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1037
-#, c-format
-msgid "config: cachedir: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1044
+#: lib/libalpm/be_files.c:275
#, fuzzy, c-format
-msgid "config: rootdir: %s"
-msgstr "config: новая секция '%s'"
-
-#: lib/libalpm/alpm.c:1047
-#, c-format
-msgid "config: logfile: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1050
-#, c-format
-msgid "config: xfercommand: %s"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1055
-#, c-format
-msgid "config: upgradedelay: %d"
-msgstr ""
-
-#: lib/libalpm/alpm.c:1093 lib/libalpm/sync.c:107
-msgid "checking for package replacements"
-msgstr "проверяю замены для пакетов"
-
-#: lib/libalpm/alpm.c:1104 lib/libalpm/sync.c:123
-#, c-format
-msgid "checking replacement '%s' for package '%s'"
-msgstr "проверяю замену '%s' для пакета '%s'"
-
-#: lib/libalpm/alpm.c:1107 lib/libalpm/sync.c:125
-#, c-format
-msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s: игнорирую обновление этого пакета (он будет заменен на %s-%s)"
-
-#: lib/libalpm/alpm.c:1137 lib/libalpm/sync.c:160
-#, c-format
-msgid "%s-%s elected for upgrade (to be replaced by %s-%s)"
-msgstr "%s-%s выбран для обновления (будет заменен на %s-%s)"
-
-#: lib/libalpm/alpm.c:1159 lib/libalpm/sync.c:194
-#, c-format
-msgid "'%s' not found in sync db -- skipping"
-msgstr "'%s' не найден в базе данных -- пропускаю"
-
-#: lib/libalpm/alpm.c:1173 lib/libalpm/sync.c:208 lib/libalpm/sync.c:509
-#, c-format
-msgid "'%s' is already elected for removal -- skipping"
-msgstr "'%s' уже выбран для удаления -- пропускаю"
-
-#: lib/libalpm/alpm.c:1179
-#, c-format
-msgid "%s elected for upgrade (%s => %s)"
-msgstr "%s выбран для обновления (%s => %s)"
-
-#: lib/libalpm/be_files.c:61
-#, c-format
-msgid "unpacking database '%s'"
-msgstr "распаковываю базу данных '%s'"
-
-#: lib/libalpm/be_files.c:78
-#, c-format
-msgid "opening database from path '%s'"
-msgstr "открываю базу данных расположенную в '%s'"
-
-#: lib/libalpm/be_files.c:182
-#, c-format
-msgid "db scan could not find package: %s"
-msgstr "в БД не удалось найти пакет: %s"
-
-#: lib/libalpm/be_files.c:186
-#, c-format
-msgid "invalid name for database entry '%s'"
-msgstr ""
-
-#: lib/libalpm/be_files.c:221
-msgid "invalid package entry provided to _alpm_db_read, skipping"
-msgstr ""
-
-#: lib/libalpm/be_files.c:226
-#, c-format
-msgid ""
-"request to read database info for a file-based package '%s', skipping..."
-msgstr ""
-
-#: lib/libalpm/be_files.c:239
-#, c-format
-msgid "loading package data for %s : level=%d"
+msgid "loading package data for %s : level=%d\n"
msgstr "загружаю данные пакета %s : уровень=%d"
-#: lib/libalpm/be_files.c:247
-#, c-format
-msgid "cannot find '%s-%s' in db '%s'"
-msgstr ""
-
-#: lib/libalpm/be_files.c:255 lib/libalpm/be_files.c:401
-#: lib/libalpm/be_files.c:424 lib/libalpm/be_files.c:515
-#: lib/libalpm/be_files.c:605 lib/libalpm/be_files.c:632
-#: lib/libalpm/package.c:208
-#, c-format
-msgid "could not open file %s: %s"
-msgstr ""
-
-#: lib/libalpm/be_files.c:512
-#, c-format
-msgid "writing %s-%s DESC information back to db"
-msgstr ""
-
-#: lib/libalpm/be_files.c:602
-#, c-format
-msgid "writing %s-%s FILES information back to db"
-msgstr ""
-
-#: lib/libalpm/be_files.c:629
-#, c-format
-msgid "writing %s-%s DEPENDS information back to db"
-msgstr ""
-
-#: lib/libalpm/cache.c:59
-#, c-format
-msgid "loading package cache for repository '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:64
-#, c-format
-msgid "adding '%s' to package cache for db '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:85
-#, c-format
-msgid "freeing package cache for repository '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:109
-#, c-format
-msgid "error: pkgcache is NULL for db '%s'"
-msgstr ""
-
-#: lib/libalpm/cache.c:129
-#, c-format
-msgid "adding entry '%s' in '%s' cache"
-msgstr ""
-
-#: lib/libalpm/cache.c:149
-#, c-format
-msgid "removing entry '%s' from '%s' cache"
-msgstr ""
-
-#: lib/libalpm/cache.c:156
-#, c-format
-msgid "cannot remove entry '%s' from '%s' cache: not found"
-msgstr ""
-
-#: lib/libalpm/cache.c:178
-#, c-format
-msgid "error: failed to get '%s' from NULL pkgcache"
-msgstr ""
-
-#: lib/libalpm/cache.c:201
-#, c-format
-msgid "loading group cache for repository '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:69
-#, c-format
-msgid " found conflict '%s' : package '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:78
-#, c-format
-msgid " found conflict '%s' : package '%s' provides '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:101 lib/libalpm/conflict.c:143
-#, c-format
-msgid "package '%s' conflicts with itself - packaging error"
-msgstr ""
-
-#: lib/libalpm/conflict.c:107
-#, c-format
-msgid "checkconflicts: target '%s' vs db"
-msgstr ""
-
-#: lib/libalpm/conflict.c:149
-#, c-format
-msgid "checkconflicts: target '%s' vs all targets"
-msgstr ""
-
-#: lib/libalpm/conflict.c:181
-#, c-format
-msgid "checkconflicts: db vs target '%s'"
-msgstr ""
-
-#: lib/libalpm/conflict.c:201
-#, c-format
-msgid "target '%s' is also in target list, using NEW conflicts"
-msgstr ""
-
-#: lib/libalpm/conflict.c:257
-#, c-format
-msgid "\tCONFLICTS:: %s conflicts with %s"
-msgstr ""
-
-#: lib/libalpm/conflict.c:349 lib/libalpm/deps.c:60 lib/libalpm/deps.c:438
-#: lib/libalpm/deps.c:634 lib/libalpm/deps.c:674 lib/libalpm/group.c:45
-#: lib/libalpm/handle.c:51 lib/libalpm/package.c:82 lib/libalpm/sync.c:67
-#: lib/libalpm/sync.c:614 lib/libalpm/sync.c:630 lib/libalpm/sync.c:727
-#: lib/libalpm/trans.c:55 lib/libalpm/util.c:614 lib/libalpm/util.c:621
-#, c-format
-msgid "malloc failure: could not allocate %d bytes"
-msgstr ""
-
-#: lib/libalpm/db.c:64 lib/libalpm/db.c:71
-#, c-format
-msgid "malloc failed: could not allocate %d bytes"
-msgstr ""
-
-#: lib/libalpm/db.c:167
-msgid "attempt to re-register the 'local' DB"
-msgstr ""
-
-#: lib/libalpm/db.c:175
-#, c-format
-msgid "attempt to re-register the '%s' database, using existing"
-msgstr ""
-
-#: lib/libalpm/db.c:181
-#, c-format
-msgid "registering database '%s'"
-msgstr ""
-
-#: lib/libalpm/db.c:186
-#, c-format
-msgid "database directory '%s' does not exist, creating it"
-msgstr ""
-
-#: lib/libalpm/db.c:197
-#, c-format
-msgid "opening database '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:131
-msgid "started sorting dependencies"
-msgstr ""
-
-#: lib/libalpm/deps.c:136
-msgid "possible dependency cycle detected"
-msgstr ""
-
-#: lib/libalpm/deps.c:183
-msgid "sorting dependencies finished"
-msgstr ""
-
-#: lib/libalpm/deps.c:225 lib/libalpm/deps.c:310
-msgid "null package found in package list"
-msgstr ""
-
-#: lib/libalpm/deps.c:230
-#, c-format
-msgid "cannot find package installed '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:261
-#, c-format
-msgid "checkdeps: dependency '%s' has moved from '%s' to '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:280
-#, c-format
-msgid "checkdeps: dependency '%s' satisfied by installed package '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:289
-#, c-format
-msgid "checkdeps: updated '%s' won't satisfy a dependency of '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:359
-#, c-format
-msgid "missing dependency '%s' for package '%s'"
-msgstr ""
-
-#: lib/libalpm/deps.c:409
-#, c-format
-msgid "checkdeps: found %s as required by %s"
-msgstr ""
-
-#: lib/libalpm/deps.c:485
-#, c-format
-msgid "excluding %s -- explicitly installed"
-msgstr ""
+#: lib/libalpm/be_files.c:292 lib/libalpm/be_files.c:429
+#: lib/libalpm/be_files.c:452 lib/libalpm/be_files.c:563
+#: lib/libalpm/be_files.c:641 lib/libalpm/be_files.c:669
+#: lib/libalpm/package.c:787
+#, fuzzy, c-format
+msgid "could not open file %s: %s\n"
+msgstr "не могу скопировать временный файл в %s (%s)"
-#: lib/libalpm/deps.c:532
+#: lib/libalpm/cache.c:62
#, c-format
-msgid "cannot find package \"%s\" or anything that provides it!"
+msgid "adding '%s' to package cache for db '%s'\n"
msgstr ""
-#: lib/libalpm/deps.c:540 lib/libalpm/deps.c:551
-#, c-format
-msgid "adding '%s' to the targets"
-msgstr ""
+#: lib/libalpm/db.c:285
+#, fuzzy, c-format
+msgid "could not remove database entry %s%s\n"
+msgstr "не могу удалить из базы данных запись %s%s"
-#: lib/libalpm/deps.c:583
-msgid "started resolving dependencies"
+#: lib/libalpm/db.c:553
+msgid "attempt to re-register the 'local' DB\n"
msgstr ""
-#: lib/libalpm/deps.c:601
-#, c-format
-msgid "%s provides dependency %s -- skipping"
-msgstr ""
+#: lib/libalpm/db.c:562 lib/libalpm/db.c:613
+#, fuzzy
+msgid "database path is undefined\n"
+msgstr "база данных не инициализирована"
-#: lib/libalpm/deps.c:630
-#, c-format
-msgid ""
-"cannot resolve dependencies for \"%s\" (\"%s\" is not in the package set)"
-msgstr ""
+#: lib/libalpm/deps.c:173
+#, fuzzy
+msgid "dependency cycle detected:\n"
+msgstr "обнаружена циклическая зависимость: %s"
-#: lib/libalpm/deps.c:647
+#: lib/libalpm/deps.c:175
#, c-format
-msgid "dependency %s is already in the target list -- skipping"
+msgid "%s will be removed after its %s dependency\n"
msgstr ""
-#: lib/libalpm/deps.c:667
+#: lib/libalpm/deps.c:177
#, c-format
-msgid "pulling dependency %s (needed by %s)"
+msgid "%s will be installed before its %s dependency\n"
msgstr ""
-#: lib/libalpm/deps.c:671
-#, c-format
-msgid "cannot resolve dependencies for \"%s\""
+#: lib/libalpm/deps.c:573
+#, fuzzy, c-format
+msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "не удается удовлетворить зависимости для \"%s\""
-#: lib/libalpm/deps.c:687
-#, c-format
-msgid "dependency cycle detected: %s"
-msgstr "обнаружена циклическая зависимость: %s"
-
-#: lib/libalpm/deps.c:691
-msgid "finished resolving dependencies"
-msgstr ""
-
-#: lib/libalpm/error.c:40
+#: lib/libalpm/error.c:43
msgid "out of memory!"
msgstr ""
-#: lib/libalpm/error.c:42
+#: lib/libalpm/error.c:45
msgid "unexpected system error"
msgstr ""
-#: lib/libalpm/error.c:44
+#: lib/libalpm/error.c:47
msgid "insufficient privileges"
msgstr ""
-#: lib/libalpm/error.c:46
+#: lib/libalpm/error.c:49
msgid "could not find or read file"
msgstr ""
-#: lib/libalpm/error.c:48
+#: lib/libalpm/error.c:51
+#, fuzzy
+msgid "could not find or read directory"
+msgstr "не удается найти или прочитать пакет"
+
+#: lib/libalpm/error.c:53
msgid "wrong or NULL argument passed"
msgstr ""
-#: lib/libalpm/error.c:51
+#: lib/libalpm/error.c:56
msgid "library not initialized"
msgstr ""
-#: lib/libalpm/error.c:53
+#: lib/libalpm/error.c:58
msgid "library already initialized"
msgstr ""
-#: lib/libalpm/error.c:55
+#: lib/libalpm/error.c:60
msgid "unable to lock database"
msgstr "не удается заблокировать базу данных"
-#: lib/libalpm/error.c:58
+#: lib/libalpm/error.c:63
msgid "could not open database"
msgstr "не удается открыть базу данных"
-#: lib/libalpm/error.c:60
+#: lib/libalpm/error.c:65
msgid "could not create database"
msgstr "не удается создать базу данных"
-#: lib/libalpm/error.c:62
+#: lib/libalpm/error.c:67
msgid "database not initialized"
msgstr "база данных не инициализирована"
-#: lib/libalpm/error.c:64
+#: lib/libalpm/error.c:69
msgid "database already registered"
msgstr "база данных уже зарегистрирована"
-#: lib/libalpm/error.c:66
+#: lib/libalpm/error.c:71
msgid "could not find database"
msgstr "не удается найти базу данных"
-#: lib/libalpm/error.c:68
+#: lib/libalpm/error.c:73
msgid "could not update database"
msgstr "не удается обновить базу данных"
-#: lib/libalpm/error.c:70
+#: lib/libalpm/error.c:75
msgid "could not remove database entry"
msgstr "не удается удалить запись в базе данных"
-#: lib/libalpm/error.c:73
+#: lib/libalpm/error.c:78
msgid "invalid url for server"
msgstr "неверный url"
-#: lib/libalpm/error.c:80
+#: lib/libalpm/error.c:85
msgid "could not set parameter"
msgstr "ну могу установить параметр"
-#: lib/libalpm/error.c:83
+#: lib/libalpm/error.c:88
msgid "transaction already initialized"
msgstr ""
-#: lib/libalpm/error.c:85 lib/libalpm/error.c:89
+#: lib/libalpm/error.c:90 lib/libalpm/error.c:94
msgid "transaction not initialized"
msgstr ""
-#: lib/libalpm/error.c:87
+#: lib/libalpm/error.c:92
msgid "duplicate target"
msgstr ""
-#: lib/libalpm/error.c:91
+#: lib/libalpm/error.c:96
msgid "transaction not prepared"
msgstr ""
-#: lib/libalpm/error.c:93
+#: lib/libalpm/error.c:98
msgid "transaction aborted"
msgstr ""
-#: lib/libalpm/error.c:95
+#: lib/libalpm/error.c:100
msgid "operation not compatible with the transaction type"
msgstr ""
-#: lib/libalpm/error.c:97 lib/libalpm/sync.c:994
+#: lib/libalpm/error.c:102
msgid "could not commit transaction"
msgstr ""
-#: lib/libalpm/error.c:99
+#: lib/libalpm/error.c:104
msgid "could not download all files"
msgstr "не могу загрузить все файлы"
-#: lib/libalpm/error.c:102
+#: lib/libalpm/error.c:107
msgid "could not find or read package"
msgstr "не удается найти или прочитать пакет"
-#: lib/libalpm/error.c:104
+#: lib/libalpm/error.c:109
msgid "invalid or corrupted package"
msgstr "пакет неправильный или поврежден"
-#: lib/libalpm/error.c:106
+#: lib/libalpm/error.c:111
msgid "cannot open package file"
msgstr "не удается открыть файл пакета"
-#: lib/libalpm/error.c:108
+#: lib/libalpm/error.c:113
msgid "cannot load package data"
msgstr "не удается загрузить данные пакета"
-#: lib/libalpm/error.c:110
+#: lib/libalpm/error.c:115
msgid "package already installed"
msgstr "пакет уже установлен"
-#: lib/libalpm/error.c:112
+#: lib/libalpm/error.c:117
msgid "package not installed or lesser version"
msgstr ""
-#: lib/libalpm/error.c:114
+#: lib/libalpm/error.c:119
msgid "cannot remove all files for package"
msgstr "не могу удалить все файлы пакета"
-#: lib/libalpm/error.c:116
+#: lib/libalpm/error.c:121
msgid "package name is not valid"
msgstr "неверное имя пакета"
-#: lib/libalpm/error.c:118
+#: lib/libalpm/error.c:123
msgid "corrupted package"
msgstr "пакет поврежден"
-#: lib/libalpm/error.c:120
+#: lib/libalpm/error.c:125
msgid "no such repository"
msgstr "нет такого репозитория"
-#: lib/libalpm/error.c:123
+#: lib/libalpm/error.c:128
+#, fuzzy
+msgid "corrupted delta"
+msgstr "пакет поврежден"
+
+#: lib/libalpm/error.c:130
+msgid "delta patch failed"
+msgstr ""
+
+#: lib/libalpm/error.c:133
msgid "group not found"
msgstr "группа не найдена"
-#: lib/libalpm/error.c:126
+#: lib/libalpm/error.c:136
msgid "could not satisfy dependencies"
msgstr "не удается удовлетворить зависимости"
-#: lib/libalpm/error.c:128
+#: lib/libalpm/error.c:138
msgid "conflicting dependencies"
msgstr ""
-#: lib/libalpm/error.c:130
+#: lib/libalpm/error.c:140
msgid "conflicting files"
msgstr ""
-#: lib/libalpm/error.c:133
+#: lib/libalpm/error.c:143
msgid "user aborted the operation"
msgstr "пользователь прервал операцию"
-#: lib/libalpm/error.c:135
+#: lib/libalpm/error.c:145
msgid "internal error"
msgstr "внутренняя ошибка"
-#: lib/libalpm/error.c:137
+#: lib/libalpm/error.c:147
msgid "libarchive error"
msgstr "ошибка в libarchive"
-#: lib/libalpm/error.c:139
-msgid "not enough space on disk"
-msgstr "недостаточно места на диске"
-
-#: lib/libalpm/error.c:142
+#: lib/libalpm/error.c:150
msgid "not confirmed"
msgstr ""
-#: lib/libalpm/error.c:145
-msgid "bad configuration section name"
-msgstr "неверное название секции в конфигурационном файле"
-
-#: lib/libalpm/error.c:147
-msgid "'local' is reserved and cannot be used as a repository name"
-msgstr ""
-"название 'local' зарезервировано и не может использоваться как название "
-"репозитория"
-
-#: lib/libalpm/error.c:149
-msgid "syntax error in config file"
-msgstr "синтаксическая ошибка в конфигурационном файле"
-
-#: lib/libalpm/error.c:151
-msgid "all directives must belong to a section"
-msgstr "все директивы должны находиться в соответствующих секциях"
-
-#: lib/libalpm/error.c:153
+#: lib/libalpm/error.c:152
msgid "invalid regular expression"
msgstr "неверное регулярное выражение"
-#: lib/libalpm/error.c:156
+#: lib/libalpm/error.c:155
msgid "connection to remote host failed"
msgstr "не удалось подключиться к удаленному хосту"
-#: lib/libalpm/error.c:159
+#: lib/libalpm/error.c:158
msgid "unexpected error"
msgstr "непредвиденная ошибка"
-#: lib/libalpm/handle.c:163
-#, c-format
-msgid "cannot canonicalize specified root path '%s'"
-msgstr ""
-
-#: lib/libalpm/handle.c:175
-#, c-format
-msgid "option 'root' = %s"
-msgstr ""
-
-#: lib/libalpm/handle.c:195
-#, c-format
-msgid "option 'dbpath' = %s"
-msgstr ""
-
-#: lib/libalpm/handle.c:211
-#, c-format
-msgid "option 'cachedir' = %s"
-msgstr ""
-
-#: lib/libalpm/md5driver.c:56
-#, c-format
-msgid "%s can't be opened\n"
-msgstr ""
-
-#: lib/libalpm/md5driver.c:74
-#, c-format
-msgid "md5(%s) = %s"
-msgstr ""
+#: lib/libalpm/package.c:124
+#, fuzzy, c-format
+msgid "could not get md5sum for package %s-%s\n"
+msgstr "не могу получить контрольную сумму md5sum для пакета %s-%s"
-#: lib/libalpm/package.c:147
-#, c-format
-msgid "%s-%s: ignoring package upgrade (%s)"
-msgstr ""
+#: lib/libalpm/package.c:133
+#, fuzzy, c-format
+msgid "md5sums do not match for package %s-%s\n"
+msgstr "контрольные суммы md5sum для пакета %s-%s не совпали"
-#: lib/libalpm/package.c:158
-#, c-format
-msgid "%s: forcing upgrade to version %s"
+#: lib/libalpm/package.c:737
+#, fuzzy, c-format
+msgid "%s: forcing upgrade to version %s\n"
msgstr "%s: принудительно обновляю до версии %s"
-#: lib/libalpm/package.c:163
-#, c-format
-msgid "%s: local (%s) is newer than %s (%s)"
+#: lib/libalpm/package.c:742
+#, fuzzy, c-format
+msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%s: установленная версия (%s) новее, чем в %s (%s)"
-#: lib/libalpm/package.c:171
-#, c-format
-msgid "%s-%s: delaying upgrade of package (%s)"
-msgstr ""
-
-#: lib/libalpm/package.c:222 lib/libalpm/package.c:281
-#, c-format
-msgid "%s: syntax error in description file line %d"
-msgstr ""
+#: lib/libalpm/package.c:750
+#, fuzzy, c-format
+msgid "%s-%s: delaying upgrade of package (%s)\n"
+msgstr "%s: принудительно обновляю до версии %s"
-#: lib/libalpm/package.c:355
-msgid "could not parse the package description file"
-msgstr ""
+#: lib/libalpm/package.c:931
+#, fuzzy, c-format
+msgid "could not parse package description file in %s\n"
+msgstr "не могу удалить временный файл %s"
-#: lib/libalpm/package.c:359
-#, c-format
-msgid "missing package name in %s"
-msgstr ""
+#: lib/libalpm/package.c:936
+#, fuzzy, c-format
+msgid "missing package name in %s\n"
+msgstr "отсутствует список файлов пакета в %s, генерирую его"
-#: lib/libalpm/package.c:363
-#, c-format
-msgid "missing package version in %s"
-msgstr ""
+#: lib/libalpm/package.c:940
+#, fuzzy, c-format
+msgid "missing package version in %s\n"
+msgstr "отсутствует список файлов пакета в %s, генерирую его"
-#: lib/libalpm/package.c:398
-#, c-format
-msgid "could not remove tempfile %s"
+#: lib/libalpm/package.c:970
+#, fuzzy, c-format
+msgid "could not remove tempfile %s\n"
msgstr "не могу удалить временный файл %s"
-#: lib/libalpm/package.c:411 lib/libalpm/package.c:418
-#, c-format
-msgid "error while reading package: %s"
+#: lib/libalpm/package.c:985 lib/libalpm/package.c:998
+#, fuzzy, c-format
+msgid "error while reading package %s: %s\n"
msgstr "ошибка при чтении пакета: %s"
-#: lib/libalpm/package.c:424
-msgid "missing package metadata"
-msgstr ""
-
-#: lib/libalpm/package.c:431
-#, c-format
-msgid "missing package filelist in %s, generating one"
+#: lib/libalpm/package.c:1005
+#, fuzzy, c-format
+msgid "missing package metadata in %s\n"
msgstr "отсутствует список файлов пакета в %s, генерирую его"
-#: lib/libalpm/package.c:570
-#, c-format
-msgid "adding '%s' in requiredby field for '%s'"
-msgstr "добавляю '%s' в поле requiredby для '%s'"
-
-#: lib/libalpm/package.c:584
-#, c-format
-msgid "adding '%s' in requiredby field for '%s' (provides: %s)"
-msgstr "добавляю '%s' в поле requiredby для '%s' (обеспечивает :%s)"
-
-#: lib/libalpm/remove.c:79
-#, c-format
-msgid "could not find %s in database"
-msgstr "не могу найти %s в базе данных"
-
-#: lib/libalpm/remove.c:93
-#, c-format
-msgid "adding %s in the targets list"
-msgstr ""
+#: lib/libalpm/package.c:1012
+#, fuzzy, c-format
+msgid "missing package filelist in %s, generating one\n"
+msgstr "отсутствует список файлов пакета в %s, генерирую его"
#: lib/libalpm/remove.c:121
-#, c-format
-msgid "pulling %s in the targets list"
-msgstr ""
-
-#: lib/libalpm/remove.c:124
-#, c-format
-msgid "could not find %s in database -- skipping"
+#, fuzzy, c-format
+msgid "could not find %s in database -- skipping\n"
msgstr "не могу найти %s в базе данных -- пропускаю"
-#: lib/libalpm/remove.c:142
-msgid "finding removable dependencies"
-msgstr "ищу устранимые зависимости"
-
-#: lib/libalpm/remove.c:175
-#, c-format
-msgid "cannot remove file '%s': %s"
+#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:243
+#, fuzzy, c-format
+msgid "cannot remove file '%s': %s\n"
msgstr "не могу удалить файл '%s': %s"
-#: lib/libalpm/remove.c:213
-#, c-format
-msgid "Skipping removal of '%s' due to NoUpgrade"
-msgstr "Пакет '%s' не будет удален, так как он входит в список NoUpgrade"
-
-#: lib/libalpm/remove.c:220
-#, c-format
-msgid "file %s does not exist"
-msgstr "файл %s не существует"
-
-#: lib/libalpm/remove.c:227
-#, c-format
-msgid "keeping directory %s"
-msgstr "сохраняю директорию %s"
-
-#: lib/libalpm/remove.c:229
-#, c-format
-msgid "removing directory %s"
-msgstr "удаляю директорию %s"
-
-#: lib/libalpm/remove.c:236
-#, c-format
-msgid "%s is in trans->skip_remove, skipping removal"
-msgstr ""
-
-#: lib/libalpm/remove.c:250
-#, c-format
-msgid "transaction is set to NOSAVE, not backing up '%s'"
-msgstr ""
-
-#: lib/libalpm/remove.c:254
-#, c-format
-msgid "unlinking %s"
-msgstr ""
-
-#: lib/libalpm/remove.c:261
-#, c-format
-msgid "cannot remove file %s: %s"
-msgstr "не могу удалить файл %s: %s"
-
-#: lib/libalpm/remove.c:294
-#, c-format
-msgid "removing package %s-%s"
-msgstr "удаляю пакет %s-%s"
-
-#: lib/libalpm/remove.c:309
-#, c-format
-msgid "not removing package '%s', can't remove all files"
-msgstr "пакет '%s' не удален, так как не удается удалить все файлы"
-
-#: lib/libalpm/remove.c:316
-#, c-format
-msgid "removing %d files"
-msgstr "удаляю %d файлов"
-
#: lib/libalpm/remove.c:337
-#, c-format
-msgid "removing database entry '%s'"
-msgstr "удаляю запись '%s' в базе данных"
+#, fuzzy, c-format
+msgid "could not remove database entry %s-%s\n"
+msgstr "не могу удалить из базы данных запись %s%s"
-#: lib/libalpm/remove.c:339
-#, c-format
-msgid "could not remove database entry %s-%s"
-msgstr ""
+#: lib/libalpm/remove.c:342
+#, fuzzy, c-format
+msgid "could not remove entry '%s' from cache\n"
+msgstr "не могу добавить запись '%s' в кэш"
-#: lib/libalpm/remove.c:344
+#: lib/libalpm/server.c:56
#, c-format
-msgid "could not remove entry '%s' from cache"
+msgid "url '%s' is invalid, ignoring\n"
msgstr ""
-#: lib/libalpm/sha1.c:397
-#, c-format
-msgid "sha1: %s can't be opened\n"
+#: lib/libalpm/server.c:60
+msgid "url scheme not specified, assuming http\n"
msgstr ""
-#: lib/libalpm/sha1.c:412
-#, c-format
-msgid "sha1(%s) = %s"
+#: lib/libalpm/server.c:241
+msgid "disk"
msgstr ""
-#: lib/libalpm/sync.c:183
-msgid "checking for package upgrades"
-msgstr "проверяю наличие обновлений"
-
-#: lib/libalpm/sync.c:215
-#, c-format
-msgid "%s-%s elected for upgrade (%s => %s)"
-msgstr "%s-%s выбран для обновления (%s => %s)"
+#: lib/libalpm/server.c:245
+#, fuzzy, c-format
+msgid "failed retrieving file '%s' from %s : %s\n"
+msgstr "не удалось получить некоторые файлы с %s\n"
-#: lib/libalpm/sync.c:270
-#, c-format
-msgid "searching for target in repo '%s'"
+#: lib/libalpm/server.c:275
+msgid "cannot resume download, starting over\n"
msgstr ""
-#: lib/libalpm/sync.c:278 lib/libalpm/sync.c:301
-#, c-format
-msgid "target '%s' not found -- looking for provisions"
-msgstr ""
+#: lib/libalpm/server.c:288
+#, fuzzy, c-format
+msgid "cannot write to file '%s'\n"
+msgstr "не могу удалить файл '%s': %s"
-#: lib/libalpm/sync.c:283 lib/libalpm/sync.c:306
-#, c-format
-msgid "found '%s' as a provision for '%s'"
-msgstr ""
+#: lib/libalpm/server.c:307
+#, fuzzy, c-format
+msgid "error downloading '%s': %s\n"
+msgstr "ошибка при чтении пакета: %s"
-#: lib/libalpm/sync.c:290
-#, c-format
-msgid "repository '%s' not found"
-msgstr "репозиторий '%s' не найден"
+#: lib/libalpm/server.c:319
+#, fuzzy, c-format
+msgid "error writing to file '%s': %s\n"
+msgstr "не могу удалить файл '%s': %s"
-#: lib/libalpm/sync.c:331
-#, c-format
-msgid "%s-%s is up to date -- skipping"
-msgstr "%s-%s не устарел -- пропускаю"
+#: lib/libalpm/server.c:387
+#, fuzzy, c-format
+msgid "could not chdir to %s\n"
+msgstr "не могу извлечь %s (%s)"
-#: lib/libalpm/sync.c:354
-#, c-format
-msgid "adding target '%s' to the transaction set"
+#: lib/libalpm/server.c:394
+msgid "running XferCommand: fork failed!\n"
msgstr ""
-#: lib/libalpm/sync.c:402
-msgid "resolving target's dependencies"
-msgstr "разрешаю зависимости пакетов"
-
-#: lib/libalpm/sync.c:422
-#, c-format
-msgid "adding package %s-%s to the transaction targets"
+#: lib/libalpm/server.c:445
+msgid "URL does not contain a file for download\n"
msgstr ""
-#: lib/libalpm/sync.c:463
-msgid "looking for unresolvable dependencies"
-msgstr "ищу неразрешимые зависимости"
-
-#: lib/libalpm/sync.c:494
-#, c-format
-msgid "package '%s' conflicts with '%s'"
-msgstr "пакет '%s' конфликтует с '%s'"
-
-#: lib/libalpm/sync.c:516
-#, c-format
-msgid "'%s' not found in transaction set -- skipping"
-msgstr ""
+#: lib/libalpm/server.c:458
+#, fuzzy, c-format
+msgid "failed to download %s\n"
+msgstr "не могу загрузить все файлы"
-#: lib/libalpm/sync.c:527
-#, c-format
-msgid "package '%s' provides its own conflict"
-msgstr ""
+#: lib/libalpm/sync.c:135
+#, fuzzy, c-format
+msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
+msgstr "%s-%s: игнорирую обновление этого пакета (он будет заменен на %s-%s)"
-#: lib/libalpm/sync.c:550 lib/libalpm/sync.c:555
-#, c-format
-msgid "'%s' is in the target list -- keeping it"
-msgstr ""
+#: lib/libalpm/sync.c:250
+#, fuzzy, c-format
+msgid "%s: ignoring package upgrade (%s => %s)\n"
+msgstr "%s-%s: игнорирую обновление этого пакета (он будет заменен на %s-%s)"
-#: lib/libalpm/sync.c:567 lib/libalpm/sync.c:604
-#, c-format
-msgid "removing '%s' from target list"
-msgstr ""
+#: lib/libalpm/sync.c:320
+#, fuzzy, c-format
+msgid "repository '%s' not found\n"
+msgstr "репозиторий '%s' не найден"
-#: lib/libalpm/sync.c:576
-#, c-format
-msgid "resolving package '%s' conflict"
-msgstr "разрешаю конфликт пакета '%s'"
+#: lib/libalpm/sync.c:354
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- skipping\n"
+msgstr "%s-%s не устарел -- пропускаю"
-#: lib/libalpm/sync.c:599
-#, c-format
-msgid "electing '%s' for removal"
-msgstr "помечаю '%s' для удаления"
+#: lib/libalpm/sync.c:358
+#, fuzzy, c-format
+msgid "%s-%s is up to date -- reinstalling\n"
+msgstr "%s-%s не устарел -- пропускаю"
-#: lib/libalpm/sync.c:610 lib/libalpm/sync.c:626
-msgid "unresolvable package conflicts detected"
+#: lib/libalpm/sync.c:613 lib/libalpm/sync.c:618
+#, fuzzy
+msgid "unresolvable package conflicts detected\n"
msgstr "обнаружен неразрешимый конфликт пакетов"
-#: lib/libalpm/sync.c:678
-msgid "checking dependencies of packages designated for removal"
-msgstr "проверяю зависимости пакетов отмеченных для удаления"
-
-#: lib/libalpm/sync.c:692
-msgid "something has gone horribly wrong"
-msgstr "произошло что-то ужасное и непонятное"
-
-#: lib/libalpm/sync.c:712
+#: lib/libalpm/sync.c:628
#, c-format
-msgid "found '%s' as a provision for '%s' -- conflict aborted"
+msgid "malloc failure: could not allocate %zd bytes\n"
msgstr ""
-#: lib/libalpm/sync.c:808
-#, c-format
-msgid "%s is already in the cache\n"
-msgstr "%s уже есть в кэше\n"
-
-#: lib/libalpm/sync.c:819
-#, c-format
-msgid "no %s cache exists, creating...\n"
-msgstr "кэш %s не существует, создаю...\n"
-
-#: lib/libalpm/sync.c:820
-#, c-format
-msgid "warning: no %s cache exists, creating..."
-msgstr "предупреждение: кэш %s не существует, создаю..."
-
#: lib/libalpm/sync.c:825
-msgid "couldn't create package cache, using /tmp instead\n"
-msgstr "не могу создать кэш пакета, будет использован /tmp\n"
-
-#: lib/libalpm/sync.c:826
-msgid "warning: couldn't create package cache, using /tmp instead"
-msgstr "предупреждение: не могу создать кэш пакета, будет использован /tmp"
-
-#: lib/libalpm/sync.c:833
#, c-format
-msgid "failed to retrieve some files from %s\n"
-msgstr "не удалось получить некоторые файлы с %s\n"
+msgid "command: %s\n"
+msgstr ""
-#: lib/libalpm/sync.c:863 lib/libalpm/sync.c:875
-#, c-format
-msgid "can't get md5 or sha1 checksum for package %s\n"
+#: lib/libalpm/sync.c:888 lib/libalpm/sync.c:896
+#, fuzzy, c-format
+msgid "can't get md5 checksum for file %s\n"
msgstr "не удалось получить md5 или sha1 контрольную сумму для пакета %s\n"
-#: lib/libalpm/sync.c:894
-#, c-format
-msgid "archive %s was corrupted (bad MD5 or SHA1 checksum)\n"
+#: lib/libalpm/sync.c:910
+#, fuzzy, c-format
+msgid "file %s was corrupted (bad MD5 checksum)\n"
msgstr "архив %s был поврежден (не сходится MD5 или SHA1 контрольная сумма)\n"
-#: lib/libalpm/sync.c:896
+#: lib/libalpm/sync.c:1056
#, c-format
-msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
-msgstr "архив %s поврежден (не сходится MD5 или SHA1 контрольная сумма)\n"
-
-#: lib/libalpm/sync.c:917
-msgid "could not create removal transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:923
-msgid "could not initialize the removal transaction"
-msgstr ""
-
-#: lib/libalpm/sync.c:943
-msgid "removing conflicting and to-be-replaced packages"
-msgstr ""
+msgid "failed to retrieve some files from %s\n"
+msgstr "не удалось получить некоторые файлы с %s\n"
-#: lib/libalpm/sync.c:945
-msgid "could not prepare removal transaction"
-msgstr ""
+#: lib/libalpm/sync.c:1137
+#, fuzzy
+msgid "could not create removal transaction\n"
+msgstr "не удается создать базу данных"
-#: lib/libalpm/sync.c:951
-msgid "could not commit removal transaction"
+#: lib/libalpm/sync.c:1143
+msgid "could not initialize the removal transaction\n"
msgstr ""
-#: lib/libalpm/sync.c:958
-msgid "installing packages"
-msgstr "устанавливаю пакеты"
-
-#: lib/libalpm/sync.c:961
-msgid "could not create transaction"
-msgstr ""
+#: lib/libalpm/sync.c:1165
+#, fuzzy
+msgid "could not prepare removal transaction\n"
+msgstr "не удается создать базу данных"
-#: lib/libalpm/sync.c:966
-msgid "could not initialize transaction"
+#: lib/libalpm/sync.c:1171
+msgid "could not commit removal transaction\n"
msgstr ""
-#: lib/libalpm/sync.c:989
-msgid "could not prepare transaction"
-msgstr ""
+#: lib/libalpm/sync.c:1182
+#, fuzzy
+msgid "could not create transaction\n"
+msgstr "не удается создать базу данных"
-#: lib/libalpm/sync.c:1001
-msgid "updating database for replaced packages' dependencies"
+#: lib/libalpm/sync.c:1187
+msgid "could not initialize transaction\n"
msgstr ""
-#: lib/libalpm/sync.c:1030
-#, c-format
-msgid "could not update requiredby for database entry %s-%s"
-msgstr ""
-
-#: lib/libalpm/sync.c:1039
-#, c-format
-msgid "could not update new database entry %s-%s"
-msgstr ""
+#: lib/libalpm/sync.c:1214
+#, fuzzy
+msgid "could not prepare transaction\n"
+msgstr "не удается создать базу данных"
-#: lib/libalpm/sync.c:1079
-#, c-format
-msgid "found package '%s-%s' in sync"
+#: lib/libalpm/sync.c:1219
+msgid "could not commit transaction\n"
msgstr ""
-#: lib/libalpm/sync.c:1085
-#, c-format
-msgid "package '%s' not found in sync"
-msgstr "пакет '%s' не найден в базе данных"
+#: lib/libalpm/trans.c:214
+#, fuzzy, c-format
+msgid "could not remove lock file %s\n"
+msgstr "не могу удалить lock-файл %s"
-#: lib/libalpm/trans.c:271
+#: lib/libalpm/trans.c:483
#, c-format
-msgid "updating dependency packages 'requiredby' fields for %s-%s"
-msgstr ""
-
-#: lib/libalpm/trans.c:274
-msgid "package has no dependencies, no other packages to update"
+msgid "No /bin/sh in root dir (%s), aborting scriptlet\n"
msgstr ""
-#: lib/libalpm/trans.c:311 lib/libalpm/trans.c:341
-#, c-format
-msgid "updating 'requiredby' field for package '%s'"
-msgstr ""
+#: lib/libalpm/trans.c:494
+#, fuzzy
+msgid "could not create temp directory\n"
+msgstr "не могу определить текущую рабочую директорию"
-#: lib/libalpm/trans.c:326 lib/libalpm/trans.c:356
-#, c-format
-msgid "could not update 'requiredby' database entry %s-%s"
-msgstr ""
+#: lib/libalpm/trans.c:536
+#, fuzzy, c-format
+msgid "could not change directory to %s (%s)\n"
+msgstr "не могу извлечь %s (%s)"
-#: lib/libalpm/trans.c:333
-#, c-format
-msgid "could not find dependency '%s'"
-msgstr ""
+#: lib/libalpm/trans.c:554
+#, fuzzy, c-format
+msgid "could not fork a new process (%s)\n"
+msgstr "не могу переименовать %s (%s)"
-#: lib/libalpm/util.c:142
-#, c-format
-msgid "failed to make path '%s' : %s"
-msgstr ""
+#: lib/libalpm/trans.c:564
+#, fuzzy, c-format
+msgid "could not change the root directory (%s)\n"
+msgstr "не могу определить текущую рабочую директорию"
-#: lib/libalpm/util.c:280
-#, c-format
-msgid "could not open %s: %s\n"
-msgstr ""
+#: lib/libalpm/trans.c:569
+#, fuzzy, c-format
+msgid "could not change directory to / (%s)\n"
+msgstr "не могу извлечь %s (%s)"
-#: lib/libalpm/util.c:293
+#: lib/libalpm/trans.c:578
#, c-format
-msgid "could not extract %s: %s\n"
+msgid "call to popen failed (%s)"
msgstr ""
-#: lib/libalpm/util.c:350
+#: lib/libalpm/trans.c:597
#, c-format
-msgid "logaction called: %s"
+msgid "call to waitpid failed (%s)\n"
msgstr ""
-#: lib/libalpm/util.c:445
-msgid "could not create temp directory"
+#: lib/libalpm/trans.c:606
+msgid "scriptlet failed to execute correctly\n"
msgstr ""
-#: lib/libalpm/util.c:472
-#, c-format
-msgid "could not change directory to %s (%s)"
-msgstr ""
+#: lib/libalpm/trans.c:615
+#, fuzzy, c-format
+msgid "could not remove tmpdir %s\n"
+msgstr "не могу удалить временный файл %s"
-#: lib/libalpm/util.c:476
+#: lib/libalpm/util.c:204
#, c-format
-msgid "executing %s script..."
+msgid "failed to make path '%s' : %s\n"
msgstr ""
-#: lib/libalpm/util.c:489
+#: lib/libalpm/util.c:389
#, c-format
-msgid "could not fork a new process (%s)"
+msgid "could not open %s: %s\n"
msgstr ""
-#: lib/libalpm/util.c:496
+#: lib/libalpm/util.c:573
#, c-format
-msgid "chrooting in %s"
-msgstr ""
+msgid "no %s cache exists, creating...\n"
+msgstr "кэш %s не существует, создаю...\n"
-#: lib/libalpm/util.c:498
-#, c-format
-msgid "could not change the root directory (%s)"
-msgstr ""
+#: lib/libalpm/util.c:593
+#, fuzzy
+msgid "couldn't create package cache, using /tmp instead\n"
+msgstr "не могу создать кэш пакета, будет использован /tmp\n"
-#: lib/libalpm/util.c:502
+#: lib/libalpm/util.c:643
#, c-format
-msgid "could not change directory to / (%s)"
+msgid "md5: %s can't be opened\n"
msgstr ""
-#: lib/libalpm/util.c:506
+#: lib/libalpm/util.c:645
#, c-format
-msgid "executing \"%s\""
+msgid "md5: %s can't be read\n"
msgstr ""
-#: lib/libalpm/util.c:509
-#, c-format
-msgid "call to popen failed (%s)"
-msgstr ""
+#~ msgid "please remove '%s' first, using -Rd"
+#~ msgstr "пожалуйста, уделите сначала '%s' используя -Rd"
-#: lib/libalpm/util.c:541
-#, c-format
-msgid "call to waitpid failed (%s)"
-msgstr ""
+#~ msgid "could not extract %s (%s)"
+#~ msgstr "не могу извлечь %s (%s)"
-#: lib/libalpm/util.c:550
-#, c-format
-msgid "could not remove tmpdir %s"
-msgstr ""
+#~ msgid "could not update provision '%s' from '%s'"
+#~ msgstr "не могу обновить '%s' из '%s'"
-#: lib/libalpm/util.c:568
-#, c-format
-msgid "cannot read disk space information from %s: %s"
-msgstr ""
+#~ msgid "could not get sha1sum for package %s-%s"
+#~ msgstr "не могу получить контрольную сумму sha1sum для пакета %s-%s"
-#: lib/libalpm/util.c:609
-#, c-format
-msgid "check_freespace: total pkg size: %lld, disk space: %lld"
-msgstr ""
+#~ msgid "sha1sums do not match for package %s-%s"
+#~ msgstr "контрольные суммы sha1sum для пакета %s-%s не совпали"
-#: lib/libalpm/versioncmp.c:279
-#, c-format
-msgid "depcmp: %s-%s %s %s-%s => %s"
-msgstr ""
+#~ msgid "cannot remove file %s: %s"
+#~ msgstr "не могу удалить файл %s: %s"
-#: lib/libalpm/versioncmp.c:284
-#, c-format
-msgid "depcmp: %s-%s %s %s => %s"
-msgstr ""
+#~ msgid "archive %s is corrupted (bad MD5 or SHA1 checksum)\n"
+#~ msgstr "архив %s поврежден (не сходится MD5 или SHA1 контрольная сумма)\n"
diff --git a/lib/libalpm/provide.c b/lib/libalpm/provide.c
deleted file mode 100644
index df600be7..00000000
--- a/lib/libalpm/provide.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * provide.c
- *
- * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-/* libalpm */
-#include "provide.h"
-#include "alpm_list.h"
-#include "cache.h"
-#include "db.h"
-#include "log.h"
-
-/* return a alpm_list_t of packages in "db" that provide "package"
- */
-alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, const char *package)
-{
- alpm_list_t *pkgs = NULL;
- alpm_list_t *lp;
-
- ALPM_LOG_FUNC;
-
- if(db == NULL || package == NULL || strlen(package) == 0) {
- return(NULL);
- }
-
- for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
- pmpkg_t *info = lp->data;
-
- if(alpm_list_find_str(alpm_pkg_get_provides(info), package)) {
- pkgs = alpm_list_add(pkgs, info);
- }
- }
-
- return(pkgs);
-}
-
-/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/provide.h b/lib/libalpm/provide.h
deleted file mode 100644
index b5c55db3..00000000
--- a/lib/libalpm/provide.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * provide.h
- *
- * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- */
-#ifndef _ALPM_PROVIDE_H
-#define _ALPM_PROVIDE_H
-
-#include "db.h"
-#include "alpm_list.h"
-#include "config.h"
-
-alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, const char *package);
-
-#endif /* _ALPM_PROVIDE_H */
-
-/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 291eb7a0..349ff10c 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -1,12 +1,12 @@
/*
* remove.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -19,7 +19,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -31,15 +31,8 @@
#include <fcntl.h>
#include <string.h>
#include <limits.h>
-#if defined(__APPLE__) || defined(__OpenBSD__)
-#include <sys/syslimits.h>
-#endif
-#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__)
-#include <sys/stat.h>
-#endif
#include <unistd.h>
-#include <errno.h>
-#include <libintl.h>
+#include <sys/stat.h>
/* libalpm */
#include "remove.h"
@@ -47,16 +40,12 @@
#include "trans.h"
#include "util.h"
#include "error.h"
-#include "versioncmp.h"
-#include "md5.h"
-#include "sha1.h"
#include "log.h"
#include "backup.h"
#include "package.h"
#include "db.h"
#include "cache.h"
#include "deps.h"
-#include "provide.h"
#include "handle.h"
#include "alpm.h"
@@ -76,7 +65,7 @@ int _alpm_remove_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
if((info = _alpm_db_scan(db, name)) == NULL) {
/* Unimportant - just ignore it if we can't find it */
- _alpm_log(PM_LOG_DEBUG, _("could not find %s in database"), name);
+ _alpm_log(PM_LOG_DEBUG, "could not find %s in database\n", name);
RET_ERR(PM_ERR_PKG_NOT_FOUND, -1);
}
@@ -90,7 +79,7 @@ int _alpm_remove_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
}
}
- _alpm_log(PM_LOG_DEBUG, _("adding %s in the targets list"), info->name);
+ _alpm_log(PM_LOG_DEBUG, "adding %s in the targets list\n", info->name);
trans->packages = alpm_list_add(trans->packages, info);
return(0);
@@ -105,28 +94,36 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
- if(!(trans->flags & (PM_TRANS_FLAG_NODEPS)) && (trans->type != PM_TRANS_TYPE_UPGRADE)) {
- EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
+ /* skip all checks if we are doing this removal as part of an upgrade */
+ if(trans->type == PM_TRANS_TYPE_REMOVEUPGRADE) {
+ return(0);
+ }
+
+ EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
- _alpm_log(PM_LOG_DEBUG, _("looking for unsatisfied dependencies"));
- lp = _alpm_checkdeps(trans, db, trans->type, trans->packages);
+ if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
+ _alpm_log(PM_LOG_DEBUG, "looking for unsatisfied dependencies\n");
+ lp = alpm_checkdeps(db, 1, trans->packages, NULL);
if(lp != NULL) {
if(trans->flags & PM_TRANS_FLAG_CASCADE) {
while(lp) {
alpm_list_t *i;
for(i = lp; i; i = i->next) {
pmdepmissing_t *miss = (pmdepmissing_t *)i->data;
- pmpkg_t *info = _alpm_db_scan(db, miss->depend.name);
+ pmpkg_t *info = _alpm_db_scan(db, miss->target);
if(info) {
- _alpm_log(PM_LOG_DEBUG, _("pulling %s in the targets list"), alpm_pkg_get_name(info));
- trans->packages = alpm_list_add(trans->packages, info);
+ if(!_alpm_pkg_find(alpm_pkg_get_name(info), trans->packages)) {
+ _alpm_log(PM_LOG_DEBUG, "pulling %s in the targets list\n",
+ alpm_pkg_get_name(info));
+ trans->packages = alpm_list_add(trans->packages, info);
+ }
} else {
- _alpm_log(PM_LOG_ERROR, _("could not find %s in database -- skipping"),
- miss->depend.name);
+ _alpm_log(PM_LOG_ERROR, _("could not find %s in database -- skipping\n"),
+ miss->target);
}
}
FREELIST(lp);
- lp = _alpm_checkdeps(trans, db, trans->type, trans->packages);
+ lp = alpm_checkdeps(db, 1, trans->packages, NULL);
}
} else {
if(data) {
@@ -137,22 +134,22 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
RET_ERR(PM_ERR_UNSATISFIED_DEPS, -1);
}
}
+ }
- if(trans->flags & PM_TRANS_FLAG_RECURSE) {
- _alpm_log(PM_LOG_DEBUG, _("finding removable dependencies"));
- trans->packages = _alpm_removedeps(db, trans->packages);
- }
-
- /* re-order w.r.t. dependencies */
- _alpm_log(PM_LOG_DEBUG, _("sorting by dependencies"));
- lp = _alpm_sortbydeps(trans->packages, PM_TRANS_TYPE_REMOVE);
- /* free the old alltargs */
- FREELISTPTR(trans->packages);
- trans->packages = lp;
+ /* re-order w.r.t. dependencies */
+ _alpm_log(PM_LOG_DEBUG, "sorting by dependencies\n");
+ lp = _alpm_sortbydeps(trans->packages, PM_TRANS_TYPE_REMOVE);
+ /* free the old alltargs */
+ alpm_list_free(trans->packages);
+ trans->packages = lp;
- EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
+ if(trans->flags & PM_TRANS_FLAG_RECURSE) {
+ _alpm_log(PM_LOG_DEBUG, "finding removable dependencies\n");
+ _alpm_recursedeps(db, trans->packages, 0);
}
+ EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
+
return(0);
}
@@ -169,10 +166,10 @@ static int can_remove_file(pmtrans_t *trans, const char *path)
/* If we fail write permissions due to a read-only filesystem, abort.
* Assume all other possible failures are covered somewhere else */
if(access(file, W_OK) == -1) {
- if(errno != EACCES && access(file, F_OK) == 0) {
+ if(errno != EACCES && errno != ETXTBSY && access(file, F_OK) == 0) {
/* only return failure if the file ACTUALLY exists and we can't write to
* it - ignore "chmod -w" simple permission failures */
- _alpm_log(PM_LOG_ERROR, _("cannot remove file '%s': %s"),
+ _alpm_log(PM_LOG_ERROR, _("cannot remove file '%s': %s\n"),
file, strerror(errno));
return(0);
}
@@ -182,97 +179,86 @@ static int can_remove_file(pmtrans_t *trans, const char *path)
}
/* Helper function for iterating through a package's file and deleting them
- * Used by _alpm_remove_commit
- *
- * TODO the parameters are a bit out of control here. This function doesn't
- * need to report PROGRESS, do it in the parent function.
-*/
-static void unlink_file(pmpkg_t *info, alpm_list_t *lp, alpm_list_t *targ,
- pmtrans_t *trans, int filenum, int *position)
+ * Used by _alpm_remove_commit. */
+static void unlink_file(pmpkg_t *info, alpm_list_t *lp, pmtrans_t *trans)
{
struct stat buf;
int needbackup = 0;
- double percent = 0.0;
char file[PATH_MAX+1];
ALPM_LOG_FUNC;
- if(*position != 0) {
- percent = (double)*position / filenum;
- }
-
char *hash = _alpm_needbackup(lp->data, alpm_pkg_get_backup(info));
if(hash) {
needbackup = 1;
FREE(hash);
}
-
- if(trans->type == PM_TRANS_TYPE_UPGRADE) {
+
+ snprintf(file, PATH_MAX, "%s%s", handle->root, (char *)lp->data);
+
+ if(trans->type == PM_TRANS_TYPE_REMOVEUPGRADE) {
/* check noupgrade */
if(alpm_list_find_str(handle->noupgrade, lp->data)) {
- _alpm_log(PM_LOG_DEBUG, _("Skipping removal of '%s' due to NoUpgrade"), file);
+ _alpm_log(PM_LOG_DEBUG, "Skipping removal of '%s' due to NoUpgrade\n",
+ file);
return;
}
}
- snprintf(file, PATH_MAX, "%s%s", handle->root, (char *)lp->data);
- if(lstat(file, &buf)) {
- _alpm_log(PM_LOG_DEBUG, _("file %s does not exist"), file);
+ if(_alpm_lstat(file, &buf)) {
+ _alpm_log(PM_LOG_DEBUG, "file %s does not exist\n", file);
return;
}
-
+
if(S_ISDIR(buf.st_mode)) {
if(rmdir(file)) {
- /* this is okay, other pakcages are probably using it (like /usr) */
- _alpm_log(PM_LOG_DEBUG, _("keeping directory %s"), file);
+ /* this is okay, other packages are probably using it (like /usr) */
+ _alpm_log(PM_LOG_DEBUG, "keeping directory %s\n", file);
} else {
- _alpm_log(PM_LOG_DEBUG, _("removing directory %s"), file);
+ _alpm_log(PM_LOG_DEBUG, "removing directory %s\n", file);
}
} else {
/* check the remove skip list before removing the file.
- * see the big comment block in db_find_conflicts() for an
+ * see the big comment block in db_find_fileconflicts() for an
* explanation. */
if(alpm_list_find_str(trans->skip_remove, file)) {
- _alpm_log(PM_LOG_DEBUG, _("%s is in trans->skip_remove, skipping removal"), file);
+ _alpm_log(PM_LOG_DEBUG, "%s is in trans->skip_remove, skipping removal\n",
+ file);
return;
} else if(needbackup) {
/* if the file is flagged, back it up to .pacsave */
- if(!(trans->type == PM_TRANS_TYPE_UPGRADE)) {
- /* if it was an upgrade, the file would be left alone because
- * pacman_add() would handle it */
- if(!(trans->flags & PM_TRANS_FLAG_NOSAVE)) {
- char newpath[PATH_MAX];
- snprintf(newpath, PATH_MAX, "%s.pacsave", file);
- rename(file, newpath);
- _alpm_log(PM_LOG_WARNING, _("%s saved as %s"), file, newpath);
- return;
- } else {
- _alpm_log(PM_LOG_DEBUG, _("transaction is set to NOSAVE, not backing up '%s'"), file);
- }
+ if(!(trans->flags & PM_TRANS_FLAG_NOSAVE)) {
+ char newpath[PATH_MAX];
+ snprintf(newpath, PATH_MAX, "%s.pacsave", file);
+ rename(file, newpath);
+ _alpm_log(PM_LOG_WARNING, _("%s saved as %s\n"), file, newpath);
+ return;
+ } else {
+ _alpm_log(PM_LOG_DEBUG, "transaction is set to NOSAVE, not backing up '%s'\n", file);
}
}
- _alpm_log(PM_LOG_DEBUG, _("unlinking %s"), file);
- int list_count = alpm_list_count(trans->packages); /* this way we don't have to call alpm_list_count twice during PROGRESS */
-
- PROGRESS(trans, PM_TRANS_PROGRESS_REMOVE_START, info->name, (double)(percent * 100), list_count, (list_count - alpm_list_count(targ) + 1));
- ++(*position);
+ _alpm_log(PM_LOG_DEBUG, "unlinking %s\n", file);
if(unlink(file) == -1) {
- _alpm_log(PM_LOG_ERROR, _("cannot remove file %s: %s"), lp->data, strerror(errno));
+ _alpm_log(PM_LOG_ERROR, _("cannot remove file '%s': %s\n"),
+ (char *)lp->data, strerror(errno));
}
}
}
int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
{
- pmpkg_t *info, *infodup;
+ pmpkg_t *info;
alpm_list_t *targ, *lp;
+ int pkg_count;
ALPM_LOG_FUNC;
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
+ pkg_count = alpm_list_count(trans->packages);
+
for(targ = trans->packages; targ; targ = targ->next) {
int position = 0;
char scriptlet[PATH_MAX];
@@ -281,7 +267,7 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
const char *pkgname = NULL;
if(handle->trans->state == STATE_INTERRUPTED) {
- break;
+ return(0);
}
/* get the name now so we can use it after package is removed */
@@ -289,9 +275,9 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
snprintf(scriptlet, PATH_MAX, "%s%s-%s/install", db->path,
pkgname, alpm_pkg_get_version(info));
- if(trans->type != PM_TRANS_TYPE_UPGRADE) {
+ if(trans->type != PM_TRANS_TYPE_REMOVEUPGRADE) {
EVENT(trans, PM_TRANS_EVT_REMOVE_START, info, NULL);
- _alpm_log(PM_LOG_DEBUG, _("removing package %s-%s"),
+ _alpm_log(PM_LOG_DEBUG, "removing package %s-%s\n",
pkgname, alpm_pkg_get_version(info));
/* run the pre-remove scriptlet if it exists */
@@ -306,22 +292,37 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
if(!(trans->flags & PM_TRANS_FLAG_DBONLY)) {
for(lp = files; lp; lp = lp->next) {
if(!can_remove_file(trans, lp->data)) {
- _alpm_log(PM_LOG_DEBUG, _("not removing package '%s', can't remove all files"),
+ _alpm_log(PM_LOG_DEBUG, "not removing package '%s', can't remove all files\n",
pkgname);
RET_ERR(PM_ERR_PKG_CANT_REMOVE, -1);
}
}
int filenum = alpm_list_count(files);
- _alpm_log(PM_LOG_DEBUG, _("removing %d files"), filenum);
+ double percent = 0.0;
+ alpm_list_t *newfiles;
+ _alpm_log(PM_LOG_DEBUG, "removing %d files\n", filenum);
/* iterate through the list backwards, unlinking files */
- for(lp = alpm_list_last(files); lp; lp = lp->prev) {
- unlink_file(info, lp, targ, trans, filenum, &position);
+ newfiles = alpm_list_reverse(files);
+ for(lp = newfiles; lp; lp = alpm_list_next(lp)) {
+ unlink_file(info, lp, trans);
+
+ /* update progress bar after each file */
+ percent = (double)position / (double)filenum;
+ PROGRESS(trans, PM_TRANS_PROGRESS_REMOVE_START, info->name,
+ (double)(percent * 100), pkg_count,
+ (pkg_count - alpm_list_count(targ) + 1));
+ position++;
}
+ alpm_list_free(newfiles);
}
- if(trans->type != PM_TRANS_TYPE_UPGRADE) {
+ /* set progress to 100% after we finish unlinking files */
+ PROGRESS(trans, PM_TRANS_PROGRESS_REMOVE_START, pkgname, 100,
+ pkg_count, (pkg_count - alpm_list_count(targ) + 1));
+
+ if(trans->type != PM_TRANS_TYPE_REMOVEUPGRADE) {
/* run the post-remove script if it exists */
if(alpm_pkg_has_scriptlet(info) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
_alpm_runscriptlet(handle->root, scriptlet, "post_remove",
@@ -329,38 +330,28 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
}
}
- /* duplicate the package so we can remove the requiredby fields later */
- infodup = _alpm_pkg_dup(info);
-
/* remove the package from the database */
- _alpm_log(PM_LOG_DEBUG, _("updating database"));
- _alpm_log(PM_LOG_DEBUG, _("removing database entry '%s'"), pkgname);
+ _alpm_log(PM_LOG_DEBUG, "updating database\n");
+ _alpm_log(PM_LOG_DEBUG, "removing database entry '%s'\n", pkgname);
if(_alpm_db_remove(db, info) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not remove database entry %s-%s"),
+ _alpm_log(PM_LOG_ERROR, _("could not remove database entry %s-%s\n"),
pkgname, alpm_pkg_get_version(info));
}
/* remove the package from the cache */
if(_alpm_db_remove_pkgfromcache(db, info) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not remove entry '%s' from cache"),
+ _alpm_log(PM_LOG_ERROR, _("could not remove entry '%s' from cache\n"),
pkgname);
}
-
- /* update dependency packages' REQUIREDBY fields */
- _alpm_trans_update_depends(trans, infodup);
- _alpm_pkg_free(infodup);
-
- PROGRESS(trans, PM_TRANS_PROGRESS_REMOVE_START, pkgname, 100,
- alpm_list_count(trans->packages),
- (alpm_list_count(trans->packages) - alpm_list_count(targ) +1));
- if(trans->type != PM_TRANS_TYPE_UPGRADE) {
+ /* call a done event if this isn't an upgrade */
+ if(trans->type != PM_TRANS_TYPE_REMOVEUPGRADE) {
EVENT(trans, PM_TRANS_EVT_REMOVE_DONE, info, NULL);
}
}
/* run ldconfig if it exists */
- if((trans->type != PM_TRANS_TYPE_UPGRADE) && (handle->trans->state != STATE_INTERRUPTED)) {
- _alpm_log(PM_LOG_DEBUG, _("running \"ldconfig -r %s\""), handle->root);
+ if(trans->type != PM_TRANS_TYPE_REMOVEUPGRADE) {
+ _alpm_log(PM_LOG_DEBUG, "running \"ldconfig -r %s\"\n", handle->root);
_alpm_ldconfig(handle->root);
}
diff --git a/lib/libalpm/remove.h b/lib/libalpm/remove.h
index 5ceba3b2..f1bc58eb 100644
--- a/lib/libalpm/remove.h
+++ b/lib/libalpm/remove.h
@@ -1,8 +1,8 @@
/*
* remove.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_REMOVE_H
diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c
index b8635629..8aa5a45b 100644
--- a/lib/libalpm/server.c
+++ b/lib/libalpm/server.c
@@ -1,8 +1,8 @@
/*
* server.c
- *
+ *
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,21 +15,21 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include "config.h"
#include <stdlib.h>
+#include <errno.h>
+#include <time.h>
#include <string.h>
+#include <limits.h>
#include <stdio.h>
-#include <libintl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <time.h>
-#include <errno.h>
#include <download.h>
/* libalpm */
@@ -40,7 +40,6 @@
#include "alpm.h"
#include "util.h"
#include "handle.h"
-#include "log.h"
#include "package.h"
pmserver_t *_alpm_server_new(const char *url)
@@ -50,20 +49,15 @@ pmserver_t *_alpm_server_new(const char *url)
ALPM_LOG_FUNC;
- server = (pmserver_t *)malloc(sizeof(pmserver_t));
- if(server == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmserver_t));
- RET_ERR(PM_ERR_MEMORY, NULL);
- }
+ CALLOC(server, 1, sizeof(pmserver_t), RET_ERR(PM_ERR_MEMORY, NULL));
- memset(server, 0, sizeof(pmserver_t));
u = downloadParseURL(url);
if(!u) {
- _alpm_log(PM_LOG_ERROR, _("url '%s' is invalid, ignoring"), url);
+ _alpm_log(PM_LOG_ERROR, _("url '%s' is invalid, ignoring\n"), url);
RET_ERR(PM_ERR_SERVER_BAD_URL, NULL);
}
if(strlen(u->scheme) == 0) {
- _alpm_log(PM_LOG_WARNING, _("url scheme not specified, assuming http"));
+ _alpm_log(PM_LOG_WARNING, _("url scheme not specified, assuming http\n"));
strcpy(u->scheme, "http");
}
@@ -81,10 +75,8 @@ pmserver_t *_alpm_server_new(const char *url)
return server;
}
-void _alpm_server_free(void *data)
+void _alpm_server_free(pmserver_t *server)
{
- pmserver_t *server = data;
-
ALPM_LOG_FUNC;
if(server == NULL) {
@@ -107,7 +99,8 @@ static char *strip_filename(pmserver_t *server)
p = strrchr(server->s_url->doc, '/');
if(p && *(++p)) {
fname = strdup(p);
- _alpm_log(PM_LOG_DEBUG, _("stripping '%s' from '%s'"), fname, server->s_url->doc);
+ _alpm_log(PM_LOG_DEBUG, "stripping '%s' from '%s'\n",
+ fname, server->s_url->doc);
*p = 0;
}
@@ -124,52 +117,59 @@ static struct url *url_for_file(pmserver_t *server, const char *filename)
int doclen = 0;
doclen = strlen(server->s_url->doc) + strlen(filename) + 2;
- doc = calloc(doclen, sizeof(char));
- if(!doc) {
- RET_ERR(PM_ERR_MEMORY, NULL);
- }
+ CALLOC(doc, doclen, sizeof(char), RET_ERR(PM_ERR_MEMORY, NULL));
snprintf(doc, doclen, "%s/%s", server->s_url->doc, filename);
- _alpm_log(PM_LOG_DEBUG, "file path: '%s'", doc);
ret = downloadMakeURL(server->s_url->scheme,
server->s_url->host,
server->s_url->port,
doc,
server->s_url->user,
server->s_url->pwd);
- free(doc);
+ FREE(doc);
return(ret);
}
/*
* Download a list of files from a list of servers
* - if one server fails, we try the next one in the list
+ * - if *dl_total is non-NULL, then it will be used as the starting
+ * download amount when TotalDownload is set. It will also be
+ * set to the final download amount for the calling function to use.
+ * - totalsize is the total download size for use when TotalDownload
+ * is set. Use 0 if the total download size is not known.
*
* RETURN: 0 for successful download, 1 on error
*/
-int _alpm_downloadfiles(alpm_list_t *servers, const char *localpath, alpm_list_t *files)
+int _alpm_downloadfiles(alpm_list_t *servers, const char *localpath,
+ alpm_list_t *files, int *dl_total, unsigned long totalsize)
{
- ALPM_LOG_FUNC;
- return(_alpm_downloadfiles_forreal(servers, localpath, files, NULL, NULL));
+ return(_alpm_downloadfiles_forreal(servers, localpath, files, 0, NULL,
+ dl_total, totalsize));
}
/*
* This is the real downloadfiles, used directly by sync_synctree() to check
* modtimes on remote files.
- * - if *mtime1 is non-NULL, then only download files
- * if they are different than *mtime1. String should be in the form
- * "YYYYMMDDHHMMSS" to match the form of ftplib's FtpModDate() function.
- * - if *mtime2 is non-NULL, then it will be filled with the mtime
- * of the remote file (from MDTM FTP cmd or Last-Modified HTTP header).
- *
+ * - if mtime1 is non-NULL, then only download files if they are different
+ * than mtime1.
+ * - if *mtime2 is non-NULL, it will be filled with the mtime of the remote
+ * file.
+ * - if *dl_total is non-NULL, then it will be used as the starting
+ * download amount when TotalDownload is set. It will also be
+ * set to the final download amount for the calling function to use.
+ * - totalsize is the total download size for use when TotalDownload
+ * is set. Use 0 if the total download size is not known.
+ *
* RETURN: 0 for successful download
* 1 if the mtimes are identical
* -1 on error
*/
int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
- alpm_list_t *files, const char *mtime1, char *mtime2)
+ alpm_list_t *files, time_t mtime1, time_t *mtime2, int *dl_total,
+ unsigned long totalsize)
{
- int dltotal_bytes = 0;
+ int dl_thisfile = 0;
alpm_list_t *lp;
int done = 0;
alpm_list_t *complete = NULL;
@@ -191,23 +191,15 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
char output[PATH_MAX];
char *fn = (char *)lp->data;
char pkgname[PKG_NAME_LEN];
- char *p;
fileurl = url_for_file(server, fn);
if(!fileurl) {
return(-1);
}
- /* Try to get JUST the name of the package from the filename */
- memset(pkgname, 0, PKG_NAME_LEN);
- if((p = strstr(fn, PM_EXT_PKG))) {
- _alpm_pkg_splitname(fn, pkgname, NULL, 1);
- }
- if(!strlen(pkgname)) {
- /* just use the raw filename if we can't find crap */
- STRNCPY(pkgname, fn, PKG_NAME_LEN+1);
- }
- _alpm_log(PM_LOG_DEBUG, _("using '%s' for download progress"), pkgname);
+ /* pass the raw filename for passing to the callback function */
+ strncpy(pkgname, fn, PKG_NAME_LEN);
+ _alpm_log(PM_LOG_DEBUG, "using '%s' for download progress\n", pkgname);
snprintf(realfile, PATH_MAX, "%s%s", localpath, fn);
snprintf(output, PATH_MAX, "%s%s.part", localpath, fn);
@@ -223,66 +215,64 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
int chk_resume = 0;
if(stat(output, &st) == 0 && st.st_size > 0) {
- _alpm_log(PM_LOG_DEBUG, _("existing file found, using it"));
+ _alpm_log(PM_LOG_DEBUG, "existing file found, using it\n");
fileurl->offset = (off_t)st.st_size;
- dltotal_bytes = st.st_size;
+ dl_thisfile = st.st_size;
+ if (dl_total != NULL) {
+ *dl_total += st.st_size;
+ }
localf = fopen(output, "a");
chk_resume = 1;
} else {
fileurl->offset = (off_t)0;
- dltotal_bytes = 0;
+ dl_thisfile = 0;
}
-
- /* libdownload does not reset the error code, reset it in the case of previous errors */
+
+ /* libdownload does not reset the error code, reset it in
+ * the case of previous errors */
downloadLastErrCode = 0;
/* 10s timeout - TODO make a config option */
downloadTimeout = 10000;
- /* Make libdownload super verbose... worthwhile for testing */
- if(alpm_option_get_logmask() & PM_LOG_DOWNLOAD) {
- downloadDebug = 1;
- }
- if(alpm_option_get_logmask() & PM_LOG_DEBUG) {
- dlf = downloadXGet(fileurl, &ust, (handle->nopassiveftp ? "v" : "vp"));
- } else {
- dlf = downloadXGet(fileurl, &ust, (handle->nopassiveftp ? "" : "p"));
- }
+ dlf = downloadXGet(fileurl, &ust, (handle->nopassiveftp ? "" : "p"));
if(downloadLastErrCode != 0 || dlf == NULL) {
- _alpm_log(PM_LOG_ERROR, _("failed retrieving file '%s' from %s : %s"),
- fn, fileurl->host, downloadLastErrString);
+ const char *host = _("disk");
+ if(strcmp(SCHEME_FILE, fileurl->scheme) != 0) {
+ host = fileurl->host;
+ }
+ _alpm_log(PM_LOG_ERROR, _("failed retrieving file '%s' from %s : %s\n"),
+ fn, host, downloadLastErrString);
if(localf != NULL) {
fclose(localf);
}
/* try the next server */
+ downloadFreeURL(fileurl);
continue;
} else {
- _alpm_log(PM_LOG_DEBUG, _("connected to %s successfully"), fileurl->host);
+ _alpm_log(PM_LOG_DEBUG, "connected to %s successfully\n", fileurl->host);
}
-
- if(ust.mtime && mtime1) {
- char strtime[15];
- _alpm_time2string(ust.mtime, strtime);
- if(strcmp(mtime1, strtime) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("mtimes are identical, skipping %s"), fn);
- complete = alpm_list_add(complete, fn);
- if(localf != NULL) {
- fclose(localf);
- }
- if(dlf != NULL) {
- fclose(dlf);
- }
- return(1);
+
+ if(ust.mtime && mtime1 && ust.mtime == mtime1) {
+ _alpm_log(PM_LOG_DEBUG, "mtimes are identical, skipping %s\n", fn);
+ complete = alpm_list_add(complete, fn);
+ if(localf != NULL) {
+ fclose(localf);
}
+ if(dlf != NULL) {
+ fclose(dlf);
+ }
+ downloadFreeURL(fileurl);
+ return(1);
}
-
+
if(ust.mtime && mtime2) {
- _alpm_time2string(ust.mtime, mtime2);
+ *mtime2 = ust.mtime;
}
if(chk_resume && fileurl->offset == 0) {
- _alpm_log(PM_LOG_WARNING, _("cannot resume download, starting over"));
+ _alpm_log(PM_LOG_WARNING, _("cannot resume download, starting over\n"));
if(localf != NULL) {
fclose(localf);
localf = NULL;
@@ -292,51 +282,64 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
if(localf == NULL) {
_alpm_rmrf(output);
fileurl->offset = (off_t)0;
- dltotal_bytes = 0;
+ dl_thisfile = 0;
localf = fopen(output, "w");
if(localf == NULL) { /* still null? */
- _alpm_log(PM_LOG_ERROR, _("cannot write to file '%s'"), output);
+ _alpm_log(PM_LOG_ERROR, _("cannot write to file '%s'\n"), output);
if(dlf != NULL) {
fclose(dlf);
}
- return -1;
+ downloadFreeURL(fileurl);
+ return(-1);
}
}
/* Progress 0 - initialize */
- if(handle->dlcb) handle->dlcb(pkgname, 0, ust.size);
+ if(handle->dlcb) {
+ handle->dlcb(pkgname, 0, ust.size, dl_total ? *dl_total : 0,
+ totalsize);
+ }
int nread = 0;
char buffer[PM_DLBUF_LEN];
while((nread = fread(buffer, 1, PM_DLBUF_LEN, dlf)) > 0) {
if(ferror(dlf)) {
- _alpm_log(PM_LOG_ERROR, _("error downloading '%s': %s"),
+ _alpm_log(PM_LOG_ERROR, _("error downloading '%s': %s\n"),
fn, downloadLastErrString);
fclose(localf);
fclose(dlf);
+ downloadFreeURL(fileurl);
return(-1);
}
-
+
int nwritten = 0;
while(nwritten < nread) {
nwritten += fwrite(buffer, 1, (nread - nwritten), localf);
if(ferror(localf)) {
- _alpm_log(PM_LOG_ERROR, _("error writing to file '%s': %s"),
+ _alpm_log(PM_LOG_ERROR, _("error writing to file '%s': %s\n"),
realfile, strerror(errno));
fclose(localf);
fclose(dlf);
+ downloadFreeURL(fileurl);
return(-1);
}
}
if(nwritten != nread) {
-
+
+ }
+ dl_thisfile += nread;
+ if (dl_total != NULL) {
+ *dl_total += nread;
}
- dltotal_bytes += nread;
- if(handle->dlcb) handle->dlcb(pkgname, dltotal_bytes, ust.size);
+ if(handle->dlcb) {
+ handle->dlcb(pkgname, dl_thisfile, ust.size,
+ dl_total ? *dl_total : 0, totalsize);
+ }
}
+ downloadFreeURL(fileurl);
fclose(localf);
fclose(dlf);
rename(output, realfile);
@@ -351,7 +354,10 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
char cwd[PATH_MAX];
/* build the full download url */
- snprintf(url, PATH_MAX, "%s://%s%s", fileurl->scheme, fileurl->host, fileurl->doc);
+ snprintf(url, PATH_MAX, "%s://%s%s", fileurl->scheme,
+ fileurl->host, fileurl->doc);
+ /* we don't need this anymore */
+ downloadFreeURL(fileurl);
/* replace all occurrences of %o with fn.part */
strncpy(origCmd, handle->xfercommand, sizeof(origCmd));
@@ -378,18 +384,18 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
/* cwd to the download directory */
getcwd(cwd, PATH_MAX);
if(chdir(localpath)) {
- _alpm_log(PM_LOG_WARNING, _("could not chdir to %s"), localpath);
+ _alpm_log(PM_LOG_WARNING, _("could not chdir to %s\n"), localpath);
return(PM_ERR_CONNECT_FAILED);
}
/* execute the parsed command via /bin/sh -c */
- _alpm_log(PM_LOG_DEBUG, _("running command: %s"), parsedCmd);
+ _alpm_log(PM_LOG_DEBUG, "running command: %s\n", parsedCmd);
ret = system(parsedCmd);
if(ret == -1) {
- _alpm_log(PM_LOG_WARNING, _("running XferCommand: fork failed!"));
+ _alpm_log(PM_LOG_WARNING, _("running XferCommand: fork failed!\n"));
return(PM_ERR_FORK_FAILED);
} else if(ret != 0) {
/* download failed */
- _alpm_log(PM_LOG_DEBUG, _("XferCommand command returned non-zero status code (%d)"), ret);
+ _alpm_log(PM_LOG_DEBUG, "XferCommand command returned non-zero status code (%d)\n", ret);
} else {
/* download was successful */
complete = alpm_list_add(complete, fn);
@@ -399,26 +405,36 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
}
chdir(cwd);
}
- downloadFreeURL(fileurl);
}
if(alpm_list_count(complete) == alpm_list_count(files)) {
done = 1;
}
+ alpm_list_free(complete);
}
return(done ? 0 : -1);
}
-char *_alpm_fetch_pkgurl(char *target)
+/** Fetch a remote pkg.
+ * @param url URL of the package to download
+ * @return the downloaded filepath on success, NULL on error
+ * @addtogroup alpm_misc
+ */
+char SYMEXPORT *alpm_fetch_pkgurl(const char *url)
{
pmserver_t *server;
- char *filename;
- struct stat st;
+ char *filename, *filepath;
+ const char *cachedir;
ALPM_LOG_FUNC;
- server = _alpm_server_new(target);
+ if(strstr(url, "://") == NULL) {
+ _alpm_log(PM_LOG_DEBUG, "Invalid URL passed to alpm_fetch_pkgurl\n");
+ return(NULL);
+ }
+
+ server = _alpm_server_new(url);
if(!server) {
return(NULL);
}
@@ -426,30 +442,30 @@ char *_alpm_fetch_pkgurl(char *target)
/* strip path information from the filename */
filename = strip_filename(server);
if(!filename) {
- _alpm_log(PM_LOG_ERROR, _("URL does not contain a file for download"));
+ _alpm_log(PM_LOG_ERROR, _("URL does not contain a file for download\n"));
return(NULL);
}
- /* do not download the file if it exists in the current dir */
- if(stat(filename, &st) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("%s has already been downloaded"), filename);
- } else {
- alpm_list_t *servers = alpm_list_add(NULL, server);
- alpm_list_t *files = alpm_list_add(NULL, filename);
+ /* find a valid cache dir to download to */
+ cachedir = _alpm_filecache_setup();
- if(_alpm_downloadfiles(servers, "./", files)) {
- _alpm_log(PM_LOG_WARNING, _("failed to download %s"), target);
- return(NULL);
- }
- _alpm_log(PM_LOG_DEBUG, _("successfully downloaded %s"), filename);
- alpm_list_free(files);
- alpm_list_free(servers);
- }
+ /* TODO this seems like needless complexity just to download one file */
+ alpm_list_t *servers = alpm_list_add(NULL, server);
+ alpm_list_t *files = alpm_list_add(NULL, filename);
+ /* download the file */
+ if(_alpm_downloadfiles(servers, cachedir, files, NULL, 0)) {
+ _alpm_log(PM_LOG_WARNING, _("failed to download %s\n"), url);
+ return(NULL);
+ }
+ _alpm_log(PM_LOG_DEBUG, "successfully downloaded %s\n", filename);
+ alpm_list_free(files);
+ alpm_list_free(servers);
_alpm_server_free(server);
- /* return the target with the raw filename, no URL */
- return(filename);
+ /* we should be able to find the file the second time around */
+ filepath = _alpm_filecache_find(filename);
+ return(filepath);
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/server.h b/lib/libalpm/server.h
index 8c357ab2..08194d58 100644
--- a/lib/libalpm/server.h
+++ b/lib/libalpm/server.h
@@ -1,8 +1,8 @@
/*
* server.h
- *
+ *
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_SERVER_H
@@ -27,8 +27,6 @@
#include <time.h>
#include <download.h>
-#define FREESERVER(p) do { if(p){_alpm_server_free(p); p = NULL;}} while(0)
-
/* Servers */
struct __pmserver_t {
/* useless abstraction now? */
@@ -38,12 +36,12 @@ struct __pmserver_t {
#define PM_DLBUF_LEN (1024 * 10)
pmserver_t *_alpm_server_new(const char *url);
-void _alpm_server_free(void *data);
-int _alpm_downloadfiles(alpm_list_t *servers, const char *localpath, alpm_list_t *files);
+void _alpm_server_free(pmserver_t *server);
+int _alpm_downloadfiles(alpm_list_t *servers, const char *localpath,
+ alpm_list_t *files, int *dl_total, unsigned long totalsize);
int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
- alpm_list_t *files, const char *mtime1, char *mtime2);
-
-char *_alpm_fetch_pkgurl(char *target);
+ alpm_list_t *files, time_t mtime1, time_t *mtime2, int *dl_total,
+ unsigned long totalsize);
#endif /* _ALPM_SERVER_H */
diff --git a/lib/libalpm/sha1.c b/lib/libalpm/sha1.c
deleted file mode 100644
index fd5f1e4a..00000000
--- a/lib/libalpm/sha1.c
+++ /dev/null
@@ -1,419 +0,0 @@
-/* sha.c - Functions to compute SHA1 message digest of files or
- memory blocks according to the NIST specification FIPS-180-1.
-
- Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Written by Scott G. Miller
- Credits:
- Robert Klep <robert@ilse.nl> -- Expansion function fix
-*/
-
-#include "config.h"
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libintl.h>
-
-/* libalpm */
-#include "sha1.h"
-#include "alpm.h"
-#include "log.h"
-#include "util.h"
-
-/*
- Not-swap is a macro that does an endian swap on architectures that are
- big-endian, as SHA needs some data in a little-endian format
-*/
-
-#ifdef WORDS_BIGENDIAN
-# define NOTSWAP(n) (n)
-# define SWAP(n) \
- (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
-#else
-# define NOTSWAP(n) \
- (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
-# define SWAP(n) (n)
-#endif
-
-#define BLOCKSIZE 4096
-/* Ensure that BLOCKSIZE is a multiple of 64. */
-#if BLOCKSIZE % 64 != 0
-/* FIXME-someday (soon?): use #error instead of this kludge. */
-"invalid BLOCKSIZE"
-#endif
-
-/* This array contains the bytes used to pad the buffer to the next
- 64-byte boundary. (RFC 1321, 3.1: Step 1) */
-static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
-
-
-/* Starting with the result of former calls of this function (or the
- initialization function update the context for the next LEN bytes
- starting at BUFFER.
- It is necessary that LEN is a multiple of 64!!! */
-static void sha_process_block (const void *buffer, size_t len,
- struct sha_ctx *ctx);
-
-/* Starting with the result of former calls of this function (or the
- initialization function update the context for the next LEN bytes
- starting at BUFFER.
- It is NOT required that LEN is a multiple of 64. */
-static void sha_process_bytes (const void *buffer, size_t len,
- struct sha_ctx *ctx);
-
-/* Put result from CTX in first 20 bytes following RESBUF. The result is
- always in little endian byte order, so that a byte-wise output yields
- to the wanted ASCII representation of the message digest.
-
- IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
-static void *sha_read_ctx (const struct sha_ctx *ctx, void *resbuf);
-
-/*
- Takes a pointer to a 160 bit block of data (five 32 bit ints) and
- intializes it to the start constants of the SHA1 algorithm. This
- must be called before using hash in the call to sha_hash
-*/
-static void
-sha_init_ctx (struct sha_ctx *ctx)
-{
- ctx->A = 0x67452301;
- ctx->B = 0xefcdab89;
- ctx->C = 0x98badcfe;
- ctx->D = 0x10325476;
- ctx->E = 0xc3d2e1f0;
-
- ctx->total[0] = ctx->total[1] = 0;
- ctx->buflen = 0;
-}
-
-/* Put result from CTX in first 20 bytes following RESBUF. The result
- must be in little endian byte order.
-
- IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
-static void *
-sha_read_ctx (const struct sha_ctx *ctx, void *resbuf)
-{
- ((sha_uint32 *) resbuf)[0] = NOTSWAP (ctx->A);
- ((sha_uint32 *) resbuf)[1] = NOTSWAP (ctx->B);
- ((sha_uint32 *) resbuf)[2] = NOTSWAP (ctx->C);
- ((sha_uint32 *) resbuf)[3] = NOTSWAP (ctx->D);
- ((sha_uint32 *) resbuf)[4] = NOTSWAP (ctx->E);
-
- return resbuf;
-}
-
-/* Process the remaining bytes in the internal buffer and the usual
- prolog according to the standard and write the result to RESBUF.
-
- IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
-static void *
-sha_finish_ctx (struct sha_ctx *ctx, void *resbuf)
-{
- /* Take yet unprocessed bytes into account. */
- sha_uint32 bytes = ctx->buflen;
- size_t pad;
-
- /* Now count remaining bytes. */
- ctx->total[0] += bytes;
- if (ctx->total[0] < bytes)
- ++ctx->total[1];
-
- pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
- memcpy (&ctx->buffer[bytes], fillbuf, pad);
-
- /* Put the 64-bit file length in *bits* at the end of the buffer. */
- *(sha_uint32 *) &ctx->buffer[bytes + pad + 4] = NOTSWAP (ctx->total[0] << 3);
- *(sha_uint32 *) &ctx->buffer[bytes + pad] = NOTSWAP ((ctx->total[1] << 3) |
- (ctx->total[0] >> 29));
-
- /* Process last bytes. */
- sha_process_block (ctx->buffer, bytes + pad + 8, ctx);
-
- return sha_read_ctx (ctx, resbuf);
-}
-
-static void
-sha_process_bytes (const void *buffer, size_t len, struct sha_ctx *ctx)
-{
- /* When we already have some bits in our internal buffer concatenate
- both inputs first. */
- if (ctx->buflen != 0)
- {
- size_t left_over = ctx->buflen;
- size_t add = 128 - left_over > len ? len : 128 - left_over;
-
- memcpy (&ctx->buffer[left_over], buffer, add);
- ctx->buflen += add;
-
- if (ctx->buflen > 64)
- {
- sha_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
-
- ctx->buflen &= 63;
- /* The regions in the following copy operation cannot overlap. */
- memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63],
- ctx->buflen);
- }
-
- buffer = (const char *) buffer + add;
- len -= add;
- }
-
- /* Process available complete blocks. */
- if (len >= 64)
- {
-#if !_STRING_ARCH_unaligned
-/* To check alignment gcc has an appropriate operator. Other
- compilers don't. */
-# if __GNUC__ >= 2
-# define UNALIGNED_P(p) (((sha_uintptr) p) % __alignof__ (sha_uint32) != 0)
-# else
-# define UNALIGNED_P(p) (((sha_uintptr) p) % sizeof (sha_uint32) != 0)
-# endif
- if (UNALIGNED_P (buffer))
- while (len > 64)
- {
- sha_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
- buffer = (const char *) buffer + 64;
- len -= 64;
- }
- else
-#endif
- {
- sha_process_block (buffer, len & ~63, ctx);
- buffer = (const char *) buffer + (len & ~63);
- len &= 63;
- }
- }
-
- /* Move remaining bytes in internal buffer. */
- if (len > 0)
- {
- size_t left_over = ctx->buflen;
-
- memcpy (&ctx->buffer[left_over], buffer, len);
- left_over += len;
- if (left_over >= 64)
- {
- sha_process_block (ctx->buffer, 64, ctx);
- left_over -= 64;
- memcpy (ctx->buffer, &ctx->buffer[64], left_over);
- }
- ctx->buflen = left_over;
- }
-}
-
-/* --- Code below is the primary difference between md5.c and sha.c --- */
-
-/* SHA1 round constants */
-#define K1 0x5a827999L
-#define K2 0x6ed9eba1L
-#define K3 0x8f1bbcdcL
-#define K4 0xca62c1d6L
-
-/* Round functions. Note that F2 is the same as F4. */
-#define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) )
-#define F2(B,C,D) (B ^ C ^ D)
-#define F3(B,C,D) ( ( B & C ) | ( D & ( B | C ) ) )
-#define F4(B,C,D) (B ^ C ^ D)
-
-/* Process LEN bytes of BUFFER, accumulating context into CTX.
- It is assumed that LEN % 64 == 0.
- Most of this code comes from GnuPG's cipher/sha1.c. */
-
-static void
-sha_process_block (const void *buffer, size_t len, struct sha_ctx *ctx)
-{
- const sha_uint32 *words = buffer;
- size_t nwords = len / sizeof (sha_uint32);
- const sha_uint32 *endp = words + nwords;
- sha_uint32 x[16];
- sha_uint32 a = ctx->A;
- sha_uint32 b = ctx->B;
- sha_uint32 c = ctx->C;
- sha_uint32 d = ctx->D;
- sha_uint32 e = ctx->E;
-
- /* First increment the byte count. RFC 1321 specifies the possible
- length of the file up to 2^64 bits. Here we only compute the
- number of bytes. Do a double word increment. */
- ctx->total[0] += len;
- if (ctx->total[0] < len)
- ++ctx->total[1];
-
-#define M(I) ( tm = x[I&0x0f] ^ x[(I-14)&0x0f] \
- ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \
- , (x[I&0x0f] = rol(tm, 1)) )
-
-#define R(A,B,C,D,E,F,K,M) do { E += rol( A, 5 ) \
- + F( B, C, D ) \
- + K \
- + M; \
- B = rol( B, 30 ); \
- } while(0)
-
- while (words < endp)
- {
- sha_uint32 tm;
- int t;
- /* FIXME: see sha1.c for a better implementation. */
- for (t = 0; t < 16; t++)
- {
- x[t] = NOTSWAP (*words);
- words++;
- }
-
- R( a, b, c, d, e, F1, K1, x[ 0] );
- R( e, a, b, c, d, F1, K1, x[ 1] );
- R( d, e, a, b, c, F1, K1, x[ 2] );
- R( c, d, e, a, b, F1, K1, x[ 3] );
- R( b, c, d, e, a, F1, K1, x[ 4] );
- R( a, b, c, d, e, F1, K1, x[ 5] );
- R( e, a, b, c, d, F1, K1, x[ 6] );
- R( d, e, a, b, c, F1, K1, x[ 7] );
- R( c, d, e, a, b, F1, K1, x[ 8] );
- R( b, c, d, e, a, F1, K1, x[ 9] );
- R( a, b, c, d, e, F1, K1, x[10] );
- R( e, a, b, c, d, F1, K1, x[11] );
- R( d, e, a, b, c, F1, K1, x[12] );
- R( c, d, e, a, b, F1, K1, x[13] );
- R( b, c, d, e, a, F1, K1, x[14] );
- R( a, b, c, d, e, F1, K1, x[15] );
- R( e, a, b, c, d, F1, K1, M(16) );
- R( d, e, a, b, c, F1, K1, M(17) );
- R( c, d, e, a, b, F1, K1, M(18) );
- R( b, c, d, e, a, F1, K1, M(19) );
- R( a, b, c, d, e, F2, K2, M(20) );
- R( e, a, b, c, d, F2, K2, M(21) );
- R( d, e, a, b, c, F2, K2, M(22) );
- R( c, d, e, a, b, F2, K2, M(23) );
- R( b, c, d, e, a, F2, K2, M(24) );
- R( a, b, c, d, e, F2, K2, M(25) );
- R( e, a, b, c, d, F2, K2, M(26) );
- R( d, e, a, b, c, F2, K2, M(27) );
- R( c, d, e, a, b, F2, K2, M(28) );
- R( b, c, d, e, a, F2, K2, M(29) );
- R( a, b, c, d, e, F2, K2, M(30) );
- R( e, a, b, c, d, F2, K2, M(31) );
- R( d, e, a, b, c, F2, K2, M(32) );
- R( c, d, e, a, b, F2, K2, M(33) );
- R( b, c, d, e, a, F2, K2, M(34) );
- R( a, b, c, d, e, F2, K2, M(35) );
- R( e, a, b, c, d, F2, K2, M(36) );
- R( d, e, a, b, c, F2, K2, M(37) );
- R( c, d, e, a, b, F2, K2, M(38) );
- R( b, c, d, e, a, F2, K2, M(39) );
- R( a, b, c, d, e, F3, K3, M(40) );
- R( e, a, b, c, d, F3, K3, M(41) );
- R( d, e, a, b, c, F3, K3, M(42) );
- R( c, d, e, a, b, F3, K3, M(43) );
- R( b, c, d, e, a, F3, K3, M(44) );
- R( a, b, c, d, e, F3, K3, M(45) );
- R( e, a, b, c, d, F3, K3, M(46) );
- R( d, e, a, b, c, F3, K3, M(47) );
- R( c, d, e, a, b, F3, K3, M(48) );
- R( b, c, d, e, a, F3, K3, M(49) );
- R( a, b, c, d, e, F3, K3, M(50) );
- R( e, a, b, c, d, F3, K3, M(51) );
- R( d, e, a, b, c, F3, K3, M(52) );
- R( c, d, e, a, b, F3, K3, M(53) );
- R( b, c, d, e, a, F3, K3, M(54) );
- R( a, b, c, d, e, F3, K3, M(55) );
- R( e, a, b, c, d, F3, K3, M(56) );
- R( d, e, a, b, c, F3, K3, M(57) );
- R( c, d, e, a, b, F3, K3, M(58) );
- R( b, c, d, e, a, F3, K3, M(59) );
- R( a, b, c, d, e, F4, K4, M(60) );
- R( e, a, b, c, d, F4, K4, M(61) );
- R( d, e, a, b, c, F4, K4, M(62) );
- R( c, d, e, a, b, F4, K4, M(63) );
- R( b, c, d, e, a, F4, K4, M(64) );
- R( a, b, c, d, e, F4, K4, M(65) );
- R( e, a, b, c, d, F4, K4, M(66) );
- R( d, e, a, b, c, F4, K4, M(67) );
- R( c, d, e, a, b, F4, K4, M(68) );
- R( b, c, d, e, a, F4, K4, M(69) );
- R( a, b, c, d, e, F4, K4, M(70) );
- R( e, a, b, c, d, F4, K4, M(71) );
- R( d, e, a, b, c, F4, K4, M(72) );
- R( c, d, e, a, b, F4, K4, M(73) );
- R( b, c, d, e, a, F4, K4, M(74) );
- R( a, b, c, d, e, F4, K4, M(75) );
- R( e, a, b, c, d, F4, K4, M(76) );
- R( d, e, a, b, c, F4, K4, M(77) );
- R( c, d, e, a, b, F4, K4, M(78) );
- R( b, c, d, e, a, F4, K4, M(79) );
-
- a = ctx->A += a;
- b = ctx->B += b;
- c = ctx->C += c;
- d = ctx->D += d;
- e = ctx->E += e;
- }
-}
-
-/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
-rights reserved.
-
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-
-These notices must be retained in any copies of any part of this
-documentation and/or software.
- */
-
-
-char* _alpm_SHAFile(char *filename) {
- FILE *file;
- struct sha_ctx context;
- int len, i;
- char hex[3];
- unsigned char buffer[1024], digest[20];
- char *ret;
-
- ALPM_LOG_FUNC;
-
- if((file = fopen(filename, "rb")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("sha1: %s can't be opened\n"), filename);
- } else {
- sha_init_ctx(&context);
- while((len = fread(buffer, 1, 1024, file))) {
- sha_process_bytes(buffer, len, &context);
- }
- sha_finish_ctx(&context, digest);
- fclose(file);
-
- ret = (char*)malloc(41);
- ret[0] = '\0';
- for(i = 0; i < 20; i++) {
- snprintf(hex, 3, "%02x", digest[i]);
- strncat(ret, hex, 2);
- }
- _alpm_log(PM_LOG_DEBUG, _("sha1(%s) = %s"), filename, ret);
- return(ret);
- }
-
- return(NULL);
-}
-
-/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/sha1.h b/lib/libalpm/sha1.h
deleted file mode 100644
index fc0aa230..00000000
--- a/lib/libalpm/sha1.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Declarations of functions and data types used for SHA1 sum
- library functions.
- Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifndef _ALPM_SHA1_H
-#define _ALPM_SHA1_H
-
-#include <stdio.h>
-#include <limits.h>
-
-#define rol(x,n) ( ((x) << (n)) | ((x) >> (32 -(n))) )
-/* TODO check this comment */
-/* The code below is from md5.h (from coreutils), little modifications */
-#define UINT_MAX_32_BITS 4294967295U
-
-/* This new ifdef allows splint to not fail on its static code check */
-#ifdef S_SPLINT_S
- typedef unsigned int sha_uint32;
-#else
-#if UINT_MAX == UINT_MAX_32_BITS
- typedef unsigned int sha_uint32;
-#else
-#if USHRT_MAX == UINT_MAX_32_BITS
- typedef unsigned short sha_uint32;
-#else
-#if ULONG_MAX == UINT_MAX_32_BITS
- typedef unsigned long sha_uint32;
-#else
- /* The following line is intended to evoke an error. Using #error is not portable enough. */
-#error "Cannot determine unsigned 32-bit data type"
-#endif /* ULONG_MAX */
-#endif /* USHRT_MAX */
-#endif /* UINT_MAX */
-#endif /* S_SPLINT_S */
-/* We have to make a guess about the integer type equivalent in size
- to pointers which should always be correct. */
-typedef unsigned long int sha_uintptr;
-
-/* Structure to save state of computation between the single steps. */
-struct sha_ctx
-{
- sha_uint32 A;
- sha_uint32 B;
- sha_uint32 C;
- sha_uint32 D;
- sha_uint32 E;
-
- sha_uint32 total[2];
- sha_uint32 buflen;
- char buffer[128];
-};
-
-
-/* Needed for pacman */
-char *_alpm_SHAFile (char *);
-
-#endif /* _ALPM_SHA1_H */
-
-/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 8405bbfb..065340c9 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1,11 +1,11 @@
/*
* sync.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -28,12 +28,9 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
+#include <unistd.h>
#include <time.h>
-#ifdef CYGWIN
-#include <limits.h> /* PATH_MAX */
-#endif
#include <dirent.h>
-#include <libintl.h>
/* libalpm */
#include "sync.h"
@@ -45,17 +42,12 @@
#include "cache.h"
#include "deps.h"
#include "conflict.h"
-#include "provide.h"
#include "trans.h"
#include "util.h"
-#include "versioncmp.h"
#include "handle.h"
-#include "util.h"
#include "alpm.h"
-#include "md5.h"
-#include "sha1.h"
-#include "handle.h"
#include "server.h"
+#include "delta.h"
pmsyncpkg_t *_alpm_sync_new(int type, pmpkg_t *spkg, void *data)
{
@@ -63,48 +55,64 @@ pmsyncpkg_t *_alpm_sync_new(int type, pmpkg_t *spkg, void *data)
ALPM_LOG_FUNC;
- if((sync = (pmsyncpkg_t *)malloc(sizeof(pmsyncpkg_t))) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmsyncpkg_t));
- return(NULL);
- }
+ CALLOC(sync, 1, sizeof(pmsyncpkg_t), RET_ERR(PM_ERR_MEMORY, NULL));
sync->type = type;
sync->pkg = spkg;
sync->data = data;
-
+
return(sync);
}
-void _alpm_sync_free(void *data)
+void _alpm_sync_free(pmsyncpkg_t *sync)
{
- pmsyncpkg_t *sync = data;
-
ALPM_LOG_FUNC;
if(sync == NULL) {
return;
}
+ /* TODO wow this is ugly */
if(sync->type == PM_SYNC_TYPE_REPLACE) {
- FREELISTPKGS(sync->data);
+ alpm_list_free_inner(sync->data, (alpm_list_fn_free)_alpm_pkg_free);
+ alpm_list_free(sync->data);
+ sync->data = NULL;
} else {
- FREEPKG(sync->data);
+ _alpm_pkg_free(sync->data);
+ sync->data = NULL;
}
FREE(sync);
}
+static void synclist_free(alpm_list_t *syncpkgs)
+{
+ if(syncpkgs) {
+ alpm_list_t *tmp;
+ for(tmp = syncpkgs; tmp; tmp = alpm_list_next(tmp)) {
+ if(tmp->data) {
+ _alpm_sync_free(tmp->data);
+ }
+ }
+ alpm_list_free(syncpkgs);
+ }
+
+}
+
/* Find recommended replacements for packages during a sync.
- * (refactored from _alpm_sync_prepare)
*/
static int find_replacements(pmtrans_t *trans, pmdb_t *db_local,
- alpm_list_t *dbs_sync)
+ alpm_list_t *dbs_sync, alpm_list_t **syncpkgs)
{
alpm_list_t *i, *j, *k; /* wow */
ALPM_LOG_FUNC;
+ if(syncpkgs == NULL) {
+ return(-1);
+ }
+
/* check for "recommended" package replacements */
- _alpm_log(PM_LOG_DEBUG, _("checking for package replacements"));
+ _alpm_log(PM_LOG_DEBUG, "checking for package replacements\n");
for(i = dbs_sync; i; i = i->next) {
pmdb_t *db = i->data;
@@ -114,136 +122,156 @@ static int find_replacements(pmtrans_t *trans, pmdb_t *db_local,
for(k = alpm_pkg_get_replaces(spkg); k; k = k->next) {
const char *replacement = k->data;
-
+
pmpkg_t *lpkg = _alpm_db_get_pkgfromcache(db_local, replacement);
if(!lpkg) {
continue;
}
- _alpm_log(PM_LOG_DEBUG, _("checking replacement '%s' for package '%s'"), replacement, spkg->name);
- if(alpm_list_find_str(handle->ignorepkg, lpkg->name)) {
- _alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (to be replaced by %s-%s)"),
+ _alpm_log(PM_LOG_DEBUG, "checking replacement '%s' for package '%s'\n",
+ replacement, spkg->name);
+ /* ignore if EITHER the local or replacement package are to be ignored */
+ if(_alpm_pkg_should_ignore(spkg) || _alpm_pkg_should_ignore(lpkg)) {
+ _alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"),
alpm_pkg_get_name(lpkg), alpm_pkg_get_version(lpkg),
alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg));
} else {
/* get confirmation for the replacement */
- int doreplace = 0;
- QUESTION(trans, PM_TRANS_CONV_REPLACE_PKG, lpkg, spkg, db->treename, &doreplace);
+ if(trans) {
+ int doreplace = 0;
+ QUESTION(trans, PM_TRANS_CONV_REPLACE_PKG, lpkg, spkg, db->treename, &doreplace);
+ if(!doreplace) {
+ continue;
+ }
+ }
- if(doreplace) {
- /* if confirmed, add this to the 'final' list, designating 'lpkg' as
- * the package to replace.
- */
- pmsyncpkg_t *sync;
- pmpkg_t *dummy = _alpm_pkg_new(alpm_pkg_get_name(lpkg), NULL);
- if(dummy == NULL) {
+ /* if confirmed, add this to the 'final' list, designating 'lpkg' as
+ * the package to replace.
+ */
+ pmsyncpkg_t *sync;
+ pmpkg_t *dummy = _alpm_pkg_new(alpm_pkg_get_name(lpkg), NULL);
+ if(dummy == NULL) {
+ pm_errno = PM_ERR_MEMORY;
+ synclist_free(*syncpkgs);
+ return(-1);
+ }
+ /* check if spkg->name is already in the packages list. */
+ sync = _alpm_sync_find(*syncpkgs, alpm_pkg_get_name(spkg));
+ if(sync) {
+ /* found it -- just append to the replaces list */
+ sync->data = alpm_list_add(sync->data, dummy);
+ } else {
+ /* none found -- enter pkg into the final sync list */
+ sync = _alpm_sync_new(PM_SYNC_TYPE_REPLACE, spkg, NULL);
+ if(sync == NULL) {
+ _alpm_pkg_free(dummy);
pm_errno = PM_ERR_MEMORY;
- goto error;
+ synclist_free(*syncpkgs);
+ return(-1);
}
- dummy->requiredby = alpm_list_strdup(alpm_pkg_get_requiredby(lpkg));
- /* check if spkg->name is already in the packages list. */
- sync = _alpm_sync_find(trans->packages, alpm_pkg_get_name(spkg));
- if(sync) {
- /* found it -- just append to the replaces list */
- sync->data = alpm_list_add(sync->data, dummy);
- } else {
- /* none found -- enter pkg into the final sync list */
- sync = _alpm_sync_new(PM_SYNC_TYPE_REPLACE, spkg, NULL);
- if(sync == NULL) {
- FREEPKG(dummy);
- pm_errno = PM_ERR_MEMORY;
- goto error;
- }
- sync->data = alpm_list_add(NULL, dummy);
- trans->packages = alpm_list_add(trans->packages, sync);
- }
- _alpm_log(PM_LOG_DEBUG, _("%s-%s elected for upgrade (to be replaced by %s-%s)"),
- alpm_pkg_get_name(lpkg), alpm_pkg_get_version(lpkg),
- alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg));
+ sync->data = alpm_list_add(NULL, dummy);
+ *syncpkgs = alpm_list_add(*syncpkgs, sync);
}
+ _alpm_log(PM_LOG_DEBUG, "%s-%s elected for upgrade (to be replaced by %s-%s)\n",
+ alpm_pkg_get_name(lpkg), alpm_pkg_get_version(lpkg),
+ alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg));
}
}
}
}
return(0);
-error:
- return(-1);
}
-/* TODO reimplement this in terms of alpm_get_upgrades */
-int _alpm_sync_sysupgrade(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync)
+/** Get a list of upgradable packages on the current system
+ * Adds out of date packages to *list.
+ * @arg list pointer to a list of pmsyncpkg_t.
+ */
+int SYMEXPORT alpm_sync_sysupgrade(pmdb_t *db_local,
+ alpm_list_t *dbs_sync, alpm_list_t **syncpkgs)
+{
+ return(_alpm_sync_sysupgrade(NULL, db_local, dbs_sync, syncpkgs));
+}
+
+int _alpm_sync_sysupgrade(pmtrans_t *trans,
+ pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t **syncpkgs)
{
alpm_list_t *i, *j;
ALPM_LOG_FUNC;
+ if(syncpkgs == NULL) {
+ return(-1);
+ }
/* check for "recommended" package replacements */
- if(find_replacements(trans, db_local, dbs_sync) == 0) {
- /* match installed packages with the sync dbs and compare versions */
- _alpm_log(PM_LOG_DEBUG, _("checking for package upgrades"));
- for(i = _alpm_db_get_pkgcache(db_local); i; i = i->next) {
- int replace=0;
- pmpkg_t *local = i->data;
- pmpkg_t *spkg = NULL;
- pmsyncpkg_t *sync;
-
- for(j = dbs_sync; !spkg && j; j = j->next) {
- spkg = _alpm_db_get_pkgfromcache(j->data, alpm_pkg_get_name(local));
- }
- if(spkg == NULL) {
- _alpm_log(PM_LOG_DEBUG, _("'%s' not found in sync db -- skipping"), alpm_pkg_get_name(local));
- continue;
- }
+ if(find_replacements(trans, db_local, dbs_sync, syncpkgs)) {
+ return(-1);
+ }
- /* we don't care about a to-be-replaced package's newer version */
- for(j = trans->packages; j && !replace; j=j->next) {
- sync = j->data;
- if(sync->type == PM_SYNC_TYPE_REPLACE) {
- if(_alpm_pkg_find(alpm_pkg_get_name(spkg), sync->data)) {
- replace=1;
- }
+ /* match installed packages with the sync dbs and compare versions */
+ _alpm_log(PM_LOG_DEBUG, "checking for package upgrades\n");
+ for(i = _alpm_db_get_pkgcache(db_local); i; i = i->next) {
+ int replace = 0;
+ pmpkg_t *local = i->data;
+ pmpkg_t *spkg = NULL;
+ pmsyncpkg_t *sync;
+
+ for(j = dbs_sync; !spkg && j; j = j->next) {
+ spkg = _alpm_db_get_pkgfromcache(j->data, alpm_pkg_get_name(local));
+ }
+ if(spkg == NULL) {
+ _alpm_log(PM_LOG_DEBUG, "'%s' not found in sync db -- skipping\n",
+ alpm_pkg_get_name(local));
+ continue;
+ }
+
+ /* we don't care about a to-be-replaced package's newer version */
+ for(j = *syncpkgs; j && !replace; j=j->next) {
+ sync = j->data;
+ if(sync->type == PM_SYNC_TYPE_REPLACE) {
+ if(_alpm_pkg_find(alpm_pkg_get_name(spkg), sync->data)) {
+ replace = 1;
}
}
- if(replace) {
- _alpm_log(PM_LOG_DEBUG, _("'%s' is already elected for removal -- skipping"),
- alpm_pkg_get_name(local));
- continue;
- }
+ }
+ if(replace) {
+ _alpm_log(PM_LOG_DEBUG, "'%s' is already elected for removal -- skipping\n",
+ alpm_pkg_get_name(local));
+ continue;
+ }
- /* compare versions and see if we need to upgrade */
- if(alpm_pkg_compare_versions(local, spkg)) {
- _alpm_log(PM_LOG_DEBUG, _("%s-%s elected for upgrade (%s => %s)"),
- alpm_pkg_get_name(local), alpm_pkg_get_version(local),
- alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg));
- if(!_alpm_sync_find(trans->packages, alpm_pkg_get_name(spkg))) {
- /* If package is in the ignorepkg list, ask before we add it to
- * the transaction */
- if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(local))) {
- int resp = 0;
- QUESTION(trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, local, NULL, NULL, &resp);
- if(!resp) {
- continue;
- }
- }
- pmpkg_t *tmp = _alpm_pkg_dup(local);
- if(tmp == NULL) {
- goto error;
- }
- sync = _alpm_sync_new(PM_SYNC_TYPE_UPGRADE, spkg, tmp);
- if(sync == NULL) {
- FREEPKG(tmp);
- goto error;
- }
- trans->packages = alpm_list_add(trans->packages, sync);
+ /* compare versions and see if we need to upgrade */
+ if(alpm_pkg_compare_versions(local, spkg)) {
+ _alpm_log(PM_LOG_DEBUG, "%s elected for upgrade (%s => %s)\n",
+ alpm_pkg_get_name(local), alpm_pkg_get_version(local),
+ alpm_pkg_get_version(spkg));
+ if(!_alpm_sync_find(*syncpkgs, alpm_pkg_get_name(spkg))) {
+ /* If package is in the ignorepkg list, skip it */
+ if(_alpm_pkg_should_ignore(spkg)) {
+ _alpm_log(PM_LOG_WARNING, _("%s: ignoring package upgrade (%s => %s)\n"),
+ alpm_pkg_get_name(local), alpm_pkg_get_version(local),
+ alpm_pkg_get_version(spkg));
+ continue;
+ }
+
+ pmpkg_t *tmp = _alpm_pkg_dup(local);
+ if(tmp == NULL) {
+ pm_errno = PM_ERR_MEMORY;
+ synclist_free(*syncpkgs);
+ return(-1);
+ }
+ sync = _alpm_sync_new(PM_SYNC_TYPE_UPGRADE, spkg, tmp);
+ if(sync == NULL) {
+ _alpm_pkg_free(tmp);
+ pm_errno = PM_ERR_MEMORY;
+ synclist_free(*syncpkgs);
+ return(-1);
}
+ *syncpkgs = alpm_list_add(*syncpkgs, sync);
}
}
-
- return(0);
}
-error:
- /* if we're here, it's an error */
- return(-1);
+
+ return(0);
}
int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync, char *name)
@@ -262,12 +290,13 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(name != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- STRNCPY(targline, name, PKG_FULLNAME_LEN);
+ strncpy(targline, name, PKG_FULLNAME_LEN);
targ = strchr(targline, '/');
if(targ) {
+ /* we are looking for a package in a specific database */
*targ = '\0';
targ++;
- _alpm_log(PM_LOG_DEBUG, _("searching for target in repo '%s'"), targ);
+ _alpm_log(PM_LOG_DEBUG, "searching for target '%s' in repo\n", targ);
for(j = dbs_sync; j && !spkg; j = j->next) {
pmdb_t *db = j->data;
if(strcmp(db->treename, targline) == 0) {
@@ -275,19 +304,20 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
spkg = _alpm_db_get_pkgfromcache(db, targ);
if(spkg == NULL) {
/* Search provides */
- _alpm_log(PM_LOG_DEBUG, _("target '%s' not found -- looking for provisions"), targ);
+ _alpm_log(PM_LOG_DEBUG, "target '%s' not found in db '%s' -- looking for provisions\n", targ, db->treename);
alpm_list_t *p = _alpm_db_whatprovides(db, targ);
if(!p) {
RET_ERR(PM_ERR_PKG_NOT_FOUND, -1);
}
- _alpm_log(PM_LOG_DEBUG, _("found '%s' as a provision for '%s'"), p->data, targ);
- spkg = _alpm_db_get_pkgfromcache(db, p->data);
- FREELISTPTR(p);
+ spkg = (pmpkg_t *) p->data;
+ _alpm_log(PM_LOG_DEBUG, "found '%s' as a provision for '%s'\n",
+ alpm_pkg_get_name(spkg), targ);
+ alpm_list_free(p);
}
}
}
if(!repo_found) {
- _alpm_log(PM_LOG_ERROR, _("repository '%s' not found"), targline);
+ _alpm_log(PM_LOG_ERROR, _("repository '%s' not found\n"), targline);
RET_ERR(PM_ERR_PKG_REPO_NOT_FOUND, -1);
}
} else {
@@ -298,14 +328,15 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
}
if(spkg == NULL) {
/* Search provides */
- _alpm_log(PM_LOG_DEBUG, _("target '%s' not found -- looking for provisions"), targ);
+ _alpm_log(PM_LOG_DEBUG, "target '%s' not found -- looking for provisions\n", targ);
for(j = dbs_sync; j && !spkg; j = j->next) {
pmdb_t *db = j->data;
alpm_list_t *p = _alpm_db_whatprovides(db, targ);
if(p) {
- _alpm_log(PM_LOG_DEBUG, _("found '%s' as a provision for '%s'"), p->data, targ);
- spkg = _alpm_db_get_pkgfromcache(db, p->data);
- FREELISTPTR(p);
+ spkg = (pmpkg_t *) p->data;
+ _alpm_log(PM_LOG_DEBUG, "found '%s' as a provision for '%s' in db '%s'\n",
+ alpm_pkg_get_name(spkg), targ, db->treename);
+ alpm_list_free(p);
}
}
}
@@ -318,20 +349,14 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
local = _alpm_db_get_pkgfromcache(db_local, alpm_pkg_get_name(spkg));
if(local) {
if(alpm_pkg_compare_versions(local, spkg) == 0) {
- /* spkg is NOT an upgrade, get confirmation before adding */
- int resp = 0;
- if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(local))) {
- QUESTION(trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, local, NULL, NULL, &resp);
- if(!resp) {
- return(0);
- }
- } else if(!(trans->flags & PM_TRANS_FLAG_PRINTURIS)) {
- QUESTION(trans, PM_TRANS_CONV_LOCAL_UPTODATE, local, NULL, NULL, &resp);
- if(!resp) {
- _alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- skipping"),
- alpm_pkg_get_name(local), alpm_pkg_get_version(local));
- return(0);
- }
+ /* spkg is NOT an upgrade */
+ if(trans->flags & PM_TRANS_FLAG_NEEDED) {
+ _alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- skipping\n"),
+ alpm_pkg_get_name(local), alpm_pkg_get_version(local));
+ return(0);
+ } else {
+ _alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- reinstalling\n"),
+ alpm_pkg_get_name(local), alpm_pkg_get_version(local));
}
}
}
@@ -348,10 +373,10 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
}
sync = _alpm_sync_new(PM_SYNC_TYPE_UPGRADE, spkg, dummy);
if(sync == NULL) {
- FREEPKG(dummy);
+ _alpm_pkg_free(dummy);
RET_ERR(PM_ERR_MEMORY, -1);
}
- _alpm_log(PM_LOG_DEBUG, _("adding target '%s' to the transaction set"),
+ _alpm_log(PM_LOG_DEBUG, "adding target '%s' to the transaction set\n",
alpm_pkg_get_name(spkg));
trans->packages = alpm_list_add(trans->packages, sync);
}
@@ -363,8 +388,8 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
*/
static int syncpkg_cmp(const void *s1, const void *s2)
{
- pmsyncpkg_t *sp1 = (pmsyncpkg_t *)s1;
- pmsyncpkg_t *sp2 = (pmsyncpkg_t *)s2;
+ const pmsyncpkg_t *sp1 = s1;
+ const pmsyncpkg_t *sp2 = s2;
pmpkg_t *p1, *p2;
p1 = alpm_sync_get_pkg(sp1);
@@ -376,10 +401,8 @@ static int syncpkg_cmp(const void *s1, const void *s2)
int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t **data)
{
alpm_list_t *deps = NULL;
- alpm_list_t *list = NULL; /* list allowing checkdeps usage with data from trans->packages */
- alpm_list_t *trail = NULL; /* breadcrumb list to avoid running into circles */
- alpm_list_t *asked = NULL;
- alpm_list_t *i, *j, *k, *l;
+ alpm_list_t *list = NULL, *remove = NULL; /* allow checkdeps usage with trans->packages */
+ alpm_list_t *i, *j;
int ret = 0;
ALPM_LOG_FUNC;
@@ -391,24 +414,42 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
*data = NULL;
}
- for(i = trans->packages; i; i = i->next) {
- pmsyncpkg_t *sync = i->data;
- list = alpm_list_add(list, sync->pkg);
+ if(!(trans->flags & PM_TRANS_FLAG_DEPENDSONLY)) {
+ for(i = trans->packages; i; i = i->next) {
+ pmsyncpkg_t *sync = i->data;
+ list = alpm_list_add(list, sync->pkg);
+ }
}
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
/* Resolve targets dependencies */
EVENT(trans, PM_TRANS_EVT_RESOLVEDEPS_START, NULL, NULL);
- _alpm_log(PM_LOG_DEBUG, _("resolving target's dependencies"));
+ _alpm_log(PM_LOG_DEBUG, "resolving target's dependencies\n");
+
+ /* build remove list for resolvedeps */
+ for(i = trans->packages; i; i = i->next) {
+ pmsyncpkg_t *sync = i->data;
+ if(sync->type == PM_SYNC_TYPE_REPLACE) {
+ for(j = sync->data; j; j = j->next) {
+ remove = alpm_list_add(remove, j->data);
+ }
+ }
+ }
+
for(i = trans->packages; i; i = i->next) {
pmpkg_t *spkg = ((pmsyncpkg_t *)i->data)->pkg;
- if(_alpm_resolvedeps(db_local, dbs_sync, spkg, list, trail, trans, data) == -1) {
+ if(_alpm_resolvedeps(db_local, dbs_sync, spkg, &list,
+ remove, trans, data) == -1) {
/* pm_errno is set by resolvedeps */
ret = -1;
goto cleanup;
}
}
+ if((trans->flags & PM_TRANS_FLAG_DEPENDSONLY)) {
+ FREELIST(trans->packages);
+ }
+
for(i = list; i; i = i->next) {
/* add the dependencies found by resolvedeps to the transaction set */
pmpkg_t *spkg = i->data;
@@ -419,60 +460,27 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
goto cleanup;
}
trans->packages = alpm_list_add(trans->packages, sync);
- _alpm_log(PM_LOG_DEBUG, _("adding package %s-%s to the transaction targets"),
+ _alpm_log(PM_LOG_DEBUG, "adding package %s-%s to the transaction targets\n",
alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg));
- } else {
- /* remove the original targets from the list if requested */
- if((trans->flags & PM_TRANS_FLAG_DEPENDSONLY)) {
- void *vpkg;
- pmsyncpkg_t *sync;
- const char *pkgname;
-
- pkgname = alpm_pkg_get_name(spkg);
- _alpm_log(PM_LOG_DEBUG, "removing package %s-%s from the transaction targets",
- pkgname, alpm_pkg_get_version(spkg));
-
- sync = _alpm_sync_find(trans->packages, pkgname);
- trans->packages = alpm_list_remove(trans->packages, sync, syncpkg_cmp, &vpkg);
- FREESYNC(vpkg);
- }
}
}
/* re-order w.r.t. dependencies */
- k = l = NULL;
- for(i=trans->packages; i; i=i->next) {
- pmsyncpkg_t *s = (pmsyncpkg_t*)i->data;
- k = alpm_list_add(k, s->pkg);
- }
- k = _alpm_sortbydeps(k, PM_TRANS_TYPE_ADD);
- for(i=k; i; i=i->next) {
- for(j=trans->packages; j; j=j->next) {
- pmsyncpkg_t *s = (pmsyncpkg_t*)j->data;
- if(s->pkg==i->data) {
- l = alpm_list_add(l, s);
+ alpm_list_t *sortlist = _alpm_sortbydeps(list, PM_TRANS_TYPE_ADD);
+ alpm_list_t *newpkgs = NULL;
+ for(i = sortlist; i; i = i->next) {
+ for(j = trans->packages; j; j = j->next) {
+ pmsyncpkg_t *s = j->data;
+ if(s->pkg == i->data) {
+ newpkgs = alpm_list_add(newpkgs, s);
}
}
}
- FREELISTPTR(k);
- FREELISTPTR(trans->packages);
- trans->packages = l;
+ alpm_list_free(sortlist);
+ alpm_list_free(trans->packages);
+ trans->packages = newpkgs;
EVENT(trans, PM_TRANS_EVT_RESOLVEDEPS_DONE, NULL, NULL);
-
- _alpm_log(PM_LOG_DEBUG, _("looking for unresolvable dependencies"));
- deps = _alpm_checkdeps(trans, db_local, PM_TRANS_TYPE_UPGRADE, list);
- if(deps) {
- if(data) {
- *data = deps;
- deps = NULL;
- }
- pm_errno = PM_ERR_UNSATISFIED_DEPS;
- ret = -1;
- goto cleanup;
- }
-
- FREELISTPTR(trail);
}
/* We don't care about conflicts if we're just printing uris */
@@ -480,58 +488,52 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
/* check for inter-conflicts and whatnot */
EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_START, NULL, NULL);
- _alpm_log(PM_LOG_DEBUG, _("looking for conflicts"));
+ _alpm_log(PM_LOG_DEBUG, "looking for conflicts\n");
deps = _alpm_checkconflicts(db_local, list);
if(deps) {
int errorout = 0;
+ alpm_list_t *asked = NULL;
+ pmconflict_t *conflict = NULL;
for(i = deps; i && !errorout; i = i->next) {
- pmdepmissing_t *miss = i->data;
- int found = 0;
pmsyncpkg_t *sync;
- pmpkg_t *local;
+ pmpkg_t *found = NULL;
- _alpm_log(PM_LOG_DEBUG, _("package '%s' conflicts with '%s'"),
- miss->target, miss->depend.name);
-
- /* check if the conflicting package is one that's about to be removed/replaced.
- * if so, then just ignore it
- */
+ conflict = i->data;
+ _alpm_log(PM_LOG_DEBUG, "package '%s' conflicts with '%s'\n",
+ conflict->package1, conflict->package2);
+ /* check if the conflicting package is about to be removed/replaced.
+ * if so, then just ignore it. */
for(j = trans->packages; j && !found; j = j->next) {
sync = j->data;
if(sync->type == PM_SYNC_TYPE_REPLACE) {
- if(_alpm_pkg_find(miss->depend.name, sync->data)) {
- found = 1;
- }
+ found = _alpm_pkg_find(conflict->package2, sync->data);
}
}
if(found) {
- _alpm_log(PM_LOG_DEBUG, _("'%s' is already elected for removal -- skipping"),
- miss->depend.name);
+ _alpm_log(PM_LOG_DEBUG, "'%s' is already elected for removal -- skipping\n",
+ alpm_pkg_get_name(found));
continue;
}
- sync = _alpm_sync_find(trans->packages, miss->target);
+ sync = _alpm_sync_find(trans->packages, conflict->package1);
if(sync == NULL) {
- _alpm_log(PM_LOG_DEBUG, _("'%s' not found in transaction set -- skipping"),
- miss->target);
+ _alpm_log(PM_LOG_DEBUG, "'%s' not found in transaction set -- skipping\n",
+ conflict->package1);
continue;
}
- local = _alpm_db_get_pkgfromcache(db_local, miss->depend.name);
- /* check if this package also "provides" the package it's conflicting with
- */
- if(alpm_list_find_str(alpm_pkg_get_provides(sync->pkg), miss->depend.name)) {
- /* so just treat it like a "replaces" item so the REQUIREDBY
- * fields are inherited properly.
- */
- _alpm_log(PM_LOG_DEBUG, _("package '%s' provides its own conflict"), miss->target);
- if(local) {
- /* nothing to do for now: it will be handled later
- * (not the same behavior as in pacman 2.x) */
- } else {
+ pmpkg_t *local = _alpm_db_get_pkgfromcache(db_local, conflict->package2);
+ /* check if this package provides the package it's conflicting with */
+ if(alpm_list_find(alpm_pkg_get_provides(sync->pkg),
+ conflict->package2, _alpm_prov_cmp)) {
+ /* treat like a replaces item so requiredby fields are
+ * inherited properly. */
+ _alpm_log(PM_LOG_DEBUG, "package '%s' provides its own conflict\n",
+ conflict->package1);
+ if(!local) {
char *rmpkg = NULL;
- int target, depend;
- /* hmmm, depend.name isn't installed, so it must be conflicting
+ void *target, *depend;
+ /* hmmm, package2 isn't installed, so it must be conflicting
* with another package in our final list. For example:
*
* pacman -S blackbox xfree86
@@ -542,226 +544,422 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
* opting for xfree86 instead.
*/
- /* figure out which one was requested in targets. If they both were,
- * then it's still an unresolvable conflict. */
- target = alpm_list_find_str(trans->targets, miss->target);
- depend = alpm_list_find_str(trans->targets, miss->depend.name);
+ /* figure out which one was requested in targets. If they both
+ * were, then it's still an unresolvable conflict. */
+ target = alpm_list_find_str(trans->targets, conflict->package1);
+ depend = alpm_list_find_str(trans->targets, conflict->package2);
if(depend && !target) {
- _alpm_log(PM_LOG_DEBUG, _("'%s' is in the target list -- keeping it"),
- miss->depend.name);
- /* remove miss->target */
- rmpkg = miss->target;
+ _alpm_log(PM_LOG_DEBUG, "'%s' is in the target list -- keeping it\n",
+ conflict->package2);
+ /* remove conflict->package1 */
+ rmpkg = conflict->package1;
} else if(target && !depend) {
- _alpm_log(PM_LOG_DEBUG, _("'%s' is in the target list -- keeping it"),
- miss->target);
- /* remove miss->depend.name */
- rmpkg = miss->depend.name;
+ _alpm_log(PM_LOG_DEBUG, "'%s' is in the target list -- keeping it\n",
+ conflict->package1);
+ /* remove conflict->package2 */
+ rmpkg = conflict->package2;
} else {
- /* miss->depend.name is not needed, miss->target already provides
+ /* miss->target2 is not needed, miss->target already provides
* it, let's resolve the conflict */
- rmpkg = miss->depend.name;
+ rmpkg = conflict->package2;
}
if(rmpkg) {
pmsyncpkg_t *rsync = _alpm_sync_find(trans->packages, rmpkg);
void *vpkg;
- _alpm_log(PM_LOG_DEBUG, _("removing '%s' from target list"), rsync->pkg->name);
- trans->packages = alpm_list_remove(trans->packages, rsync, syncpkg_cmp, &vpkg);
- FREESYNC(vpkg);
+ _alpm_log(PM_LOG_DEBUG, "removing '%s' from target list\n",
+ rsync->pkg->name);
+ trans->packages = alpm_list_remove(trans->packages, rsync,
+ syncpkg_cmp, &vpkg);
+ _alpm_sync_free(vpkg);
continue;
}
}
}
- /* It's a conflict -- see if they want to remove it
- */
- _alpm_log(PM_LOG_DEBUG, _("resolving package '%s' conflict"), miss->target);
+ /* It's a conflict -- see if they want to remove it */
+ _alpm_log(PM_LOG_DEBUG, "resolving package '%s' conflict\n",
+ conflict->package1);
if(local) {
int doremove = 0;
- if(!alpm_list_find_str(asked, miss->depend.name)) {
- QUESTION(trans, PM_TRANS_CONV_CONFLICT_PKG, miss->target, miss->depend.name, NULL, &doremove);
- asked = alpm_list_add(asked, strdup(miss->depend.name));
+ if(!alpm_list_find_str(asked, conflict->package2)) {
+ QUESTION(trans, PM_TRANS_CONV_CONFLICT_PKG, conflict->package1,
+ conflict->package2, NULL, &doremove);
+ asked = alpm_list_add(asked, strdup(conflict->package2));
if(doremove) {
- pmsyncpkg_t *rsync = _alpm_sync_find(trans->packages, miss->depend.name);
- pmpkg_t *q = _alpm_pkg_new(miss->depend.name, NULL);
- if(q == NULL) {
- if(data) {
- FREELIST(*data);
- }
- ret = -1;
- goto cleanup;
- }
- q->requiredby = alpm_list_strdup(alpm_pkg_get_requiredby(local));
+ pmpkg_t *q = _alpm_pkg_dup(local);
if(sync->type != PM_SYNC_TYPE_REPLACE) {
/* switch this sync type to REPLACE */
sync->type = PM_SYNC_TYPE_REPLACE;
- FREEPKG(sync->data);
+ _alpm_pkg_free(sync->data);
+ sync->data = NULL;
}
/* append to the replaces list */
- _alpm_log(PM_LOG_DEBUG, _("electing '%s' for removal"), miss->depend.name);
+ _alpm_log(PM_LOG_DEBUG, "electing '%s' for removal\n",
+ conflict->package2);
sync->data = alpm_list_add(sync->data, q);
+ /* see if the package is in the current target list */
+ pmsyncpkg_t *rsync = _alpm_sync_find(trans->packages,
+ conflict->package2);
if(rsync) {
/* remove it from the target list */
void *vpkg;
- _alpm_log(PM_LOG_DEBUG, _("removing '%s' from target list"), miss->depend.name);
- trans->packages = alpm_list_remove(trans->packages, rsync, syncpkg_cmp, &vpkg);
- FREESYNC(vpkg);
+ _alpm_log(PM_LOG_DEBUG, "removing '%s' from target list\n",
+ conflict->package2);
+ trans->packages = alpm_list_remove(trans->packages, rsync,
+ syncpkg_cmp, &vpkg);
+ _alpm_sync_free(vpkg);
}
} else {
/* abort */
- _alpm_log(PM_LOG_ERROR, _("unresolvable package conflicts detected"));
+ _alpm_log(PM_LOG_ERROR, _("unresolvable package conflicts detected\n"));
errorout = 1;
- if(data) {
- if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmdepmissing_t));
- FREELIST(*data);
- pm_errno = PM_ERR_MEMORY;
- ret = -1;
- goto cleanup;
- }
- *miss = *(pmdepmissing_t *)i->data;
- *data = alpm_list_add(*data, miss);
- }
}
}
} else {
- _alpm_log(PM_LOG_ERROR, _("unresolvable package conflicts detected"));
+ _alpm_log(PM_LOG_ERROR, _("unresolvable package conflicts detected\n"));
errorout = 1;
- if(data) {
- if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmdepmissing_t));
- FREELIST(*data);
- pm_errno = PM_ERR_MEMORY;
- ret = -1;
- goto cleanup;
- }
- *miss = *(pmdepmissing_t *)i->data;
- *data = alpm_list_add(*data, miss);
- }
}
}
if(errorout) {
+ /* The last conflict was unresolvable, so we duplicate it and add it to *data */
pm_errno = PM_ERR_CONFLICTING_DEPS;
+ if(data) {
+ pmconflict_t *lastconflict = conflict;
+ if((conflict = malloc(sizeof(pmconflict_t))) == NULL) {
+ _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %zd bytes\n"),
+ sizeof(pmconflict_t));
+ FREELIST(*data);
+ pm_errno = PM_ERR_MEMORY;
+ } else {
+ *conflict = *lastconflict;
+ *data = alpm_list_add(*data, conflict);
+ }
+ }
+ FREELIST(asked);
+ FREELIST(deps);
ret = -1;
goto cleanup;
}
- FREELIST(deps);
FREELIST(asked);
+ FREELIST(deps);
}
EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_DONE, NULL, NULL);
}
- FREELISTPTR(list);
-
- /* XXX: this fails for cases where a requested package wants
- * a dependency that conflicts with an older version of
- * the package. It will be removed from final, and the user
- * has to re-request it to get it installed properly.
- *
- * Not gonna happen very often, but should be dealt with...
- */
-
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
- /* Check dependencies of packages in rmtargs and make sure
- * we won't be breaking anything by removing them.
- * If a broken dep is detected, make sure it's not from a
- * package that's in our final (upgrade) list.
- */
- /*EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);*/
+ /* rebuild remove and list */
+ alpm_list_free(list);
+ list = NULL;
+ for(i = trans->packages; i; i = i->next) {
+ pmsyncpkg_t *sync = i->data;
+ list = alpm_list_add(list, sync->pkg);
+ }
+ alpm_list_free(remove);
+ remove = NULL;
for(i = trans->packages; i; i = i->next) {
pmsyncpkg_t *sync = i->data;
if(sync->type == PM_SYNC_TYPE_REPLACE) {
for(j = sync->data; j; j = j->next) {
- list = alpm_list_add(list, j->data);
+ remove = alpm_list_add(remove, j->data);
}
}
}
- if(list) {
- _alpm_log(PM_LOG_DEBUG, _("checking dependencies of packages designated for removal"));
- deps = _alpm_checkdeps(trans, db_local, PM_TRANS_TYPE_REMOVE, list);
- if(deps) {
- int errorout = 0;
- for(i = deps; i; i = i->next) {
- pmdepmissing_t *miss = i->data;
- if(!_alpm_sync_find(trans->packages, miss->depend.name)) {
- int pfound = 0;
- alpm_list_t *k;
- /* If miss->depend.name depends on something that miss->target and a
- * package in final both provide, then it's okay... */
- pmpkg_t *leavingp = _alpm_db_get_pkgfromcache(db_local, miss->target);
- pmpkg_t *conflictp = _alpm_db_get_pkgfromcache(db_local, miss->depend.name);
- if(!leavingp || !conflictp) {
- _alpm_log(PM_LOG_ERROR, _("something has gone horribly wrong"));
- ret = -1;
- goto cleanup;
- }
- /* Look through the upset package's dependencies and try to match one up
- * to a provisio from the package we want to remove */
- for(k = alpm_pkg_get_depends(conflictp); k && !pfound; k = k->next) {
- alpm_list_t *m;
- for(m = alpm_pkg_get_provides(leavingp); m && !pfound; m = m->next) {
- if(!strcmp(k->data, m->data)) {
- /* Found a match -- now look through final for a package that
- * provides the same thing. If none are found, then it truly
- * is an unresolvable conflict. */
- alpm_list_t *n, *o;
- for(n = trans->packages; n && !pfound; n = n->next) {
- pmsyncpkg_t *sp = n->data;
- pmpkg_t *sppkg = sp->pkg;
- for(o = alpm_pkg_get_provides(sppkg); o && !pfound; o = o->next) {
- if(!strcmp(m->data, o->data)) {
- /* found matching provisio -- we're good to go */
- _alpm_log(PM_LOG_DEBUG, _("found '%s' as a provision for '%s' -- conflict aborted"),
- alpm_pkg_get_name(sppkg), (char *)o->data);
- pfound = 1;
- }
- }
- }
- }
- }
- }
- if(!pfound) {
- if(!errorout) {
- errorout = 1;
- }
- if(data) {
- if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmdepmissing_t));
- FREELIST(*data);
- pm_errno = PM_ERR_MEMORY;
- ret = -1;
- goto cleanup;
- }
- *miss = *(pmdepmissing_t *)i->data;
- *data = alpm_list_add(*data, miss);
- }
- }
- }
- }
- if(errorout) {
- pm_errno = PM_ERR_UNSATISFIED_DEPS;
- ret = -1;
- goto cleanup;
+
+ _alpm_log(PM_LOG_DEBUG, "checking dependencies\n");
+ deps = alpm_checkdeps(db_local, 1, remove, list);
+ if(deps) {
+ pm_errno = PM_ERR_UNSATISFIED_DEPS;
+ ret = -1;
+ *data = deps;
+ goto cleanup;
+ }
+ }
+
+cleanup:
+ alpm_list_free(list);
+ alpm_list_free(remove);
+
+ return(ret);
+}
+
+/** Returns a list of deltas that should be downloaded instead of the
+ * package.
+ *
+ * It first tests if a delta path exists between the currently installed
+ * version (if any) and the version to upgrade to. If so, the delta path
+ * is used if its size is below a set percentage (MAX_DELTA_RATIO) of
+ * the package size, Otherwise, an empty list is returned.
+ *
+ * @param newpkg the new package to upgrade to
+ * @param db_local the local database
+ *
+ * @return the list of pmdelta_t * objects. NULL (the empty list) is
+ * returned if the package should be downloaded instead of deltas.
+ */
+static alpm_list_t *pkg_upgrade_delta_path(pmpkg_t *newpkg, pmdb_t *db_local)
+{
+ pmpkg_t *oldpkg = alpm_db_get_pkg(db_local, newpkg->name);
+ alpm_list_t *ret = NULL;
+
+ if(oldpkg) {
+ const char *oldname = alpm_pkg_get_filename(oldpkg);
+ char *oldpath = _alpm_filecache_find(oldname);
+
+ if(oldpath) {
+ alpm_list_t *deltas = _alpm_shortest_delta_path(
+ alpm_pkg_get_deltas(newpkg),
+ alpm_pkg_get_version(oldpkg),
+ alpm_pkg_get_version(newpkg));
+
+ if(deltas) {
+ unsigned long dltsize = _alpm_delta_path_size(deltas);
+ unsigned long pkgsize = alpm_pkg_get_size(newpkg);
+
+ if(dltsize < pkgsize * MAX_DELTA_RATIO) {
+ ret = deltas;
+ } else {
+ ret = NULL;
+ alpm_list_free(deltas);
}
- FREELIST(deps);
}
+
+ FREE(oldpath);
}
- /*EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);*/
}
-#ifndef __sun__
- /* check for free space only in case the packages will be extracted */
- if(!(trans->flags & PM_TRANS_FLAG_NOCONFLICTS)) {
- if(_alpm_check_freespace(trans, data) == -1) {
- /* pm_errno is set by check_freespace */
- ret = -1;
- goto cleanup;
+ return(ret);
+}
+
+/** Returns the size of the files that will be downloaded to install a
+ * package.
+ *
+ * @param newpkg the new package to upgrade to
+ * @param db_local the local database
+ *
+ * @return the size of the download
+ */
+unsigned long SYMEXPORT alpm_pkg_download_size(pmpkg_t *newpkg, pmdb_t *db_local)
+{
+ char *fpath = _alpm_filecache_find(alpm_pkg_get_filename(newpkg));
+ unsigned long size = 0;
+
+ if(fpath) {
+ size = 0;
+ } else if(handle->usedelta) {
+ alpm_list_t *deltas = pkg_upgrade_delta_path(newpkg, db_local);
+
+ if(deltas) {
+ size = _alpm_delta_path_size_uncached(deltas);
+ } else {
+ size = alpm_pkg_get_size(newpkg);
}
+
+ alpm_list_free(deltas);
+ } else {
+ size = alpm_pkg_get_size(newpkg);
}
-#endif
-cleanup:
- FREELISTPTR(list);
- FREELISTPTR(trail);
- FREELIST(asked);
+ FREE(fpath);
+
+ return(size);
+}
+
+/** Applies delta files to create an upgraded package file.
+ *
+ * All intermediate files are deleted, leaving only the starting and
+ * ending package files.
+ *
+ * @param trans the transaction
+ * @param patches A list of alternating pmpkg_t * and pmdelta_t *
+ * objects. The patch command will be built using the pmpkg_t, pmdelta_t
+ * pair.
+ *
+ * @return 0 if all delta files were able to be applied, 1 otherwise.
+ */
+static int apply_deltas(pmtrans_t *trans, alpm_list_t *patches)
+{
+ /* keep track of the previous package in the loop to decide if a
+ * package file should be deleted */
+ pmpkg_t *lastpkg = NULL;
+ int lastpkg_failed = 0;
+ int ret = 0;
+ const char *cachedir = _alpm_filecache_setup();
+
+ alpm_list_t *p = patches;
+ while(p) {
+ pmpkg_t *pkg;
+ pmdelta_t *d;
+ char command[PATH_MAX], fname[PATH_MAX];
+ char pkgfilename[PKG_FILENAME_LEN];
+
+ pkg = alpm_list_getdata(p);
+ p = alpm_list_next(p);
+
+ d = alpm_list_getdata(p);
+ p = alpm_list_next(p);
+
+ /* if patching fails, ignore the rest of that package's deltas */
+ if(lastpkg_failed) {
+ if(pkg == lastpkg) {
+ continue;
+ } else {
+ lastpkg_failed = 0;
+ }
+ }
+
+ /* an example of the patch command: (using /cache for cachedir)
+ * xdelta patch /cache/pacman_3.0.0-1_to_3.0.1-1-i686.delta \
+ * /cache/pacman-3.0.0-1-i686.pkg.tar.gz \
+ * /cache/pacman-3.0.1-1-i686.pkg.tar.gz
+ */
+
+ /* build the patch command */
+ snprintf(command, PATH_MAX,
+ "xdelta patch" /* the command */
+ " %s/%s" /* the delta */
+ " %s/%s-%s-%s" PKGEXT /* the 'from' package */
+ " %s/%s-%s-%s" PKGEXT, /* the 'to' package */
+ cachedir, d->filename,
+ cachedir, pkg->name, d->from, pkg->arch,
+ cachedir, pkg->name, d->to, pkg->arch);
+
+ _alpm_log(PM_LOG_DEBUG, _("command: %s\n"), command);
+
+ snprintf(pkgfilename, PKG_FILENAME_LEN, "%s-%s-%s" PKGEXT,
+ pkg->name, d->to, pkg->arch);
+
+ EVENT(trans, PM_TRANS_EVT_DELTA_PATCH_START, pkgfilename, d->filename);
+
+ if(system(command) == 0) {
+ EVENT(trans, PM_TRANS_EVT_DELTA_PATCH_DONE, NULL, NULL);
+
+ /* delete the delta file */
+ snprintf(fname, PATH_MAX, "%s/%s", cachedir, d->filename);
+ unlink(fname);
+
+ /* Delete the 'from' package but only if it is an intermediate
+ * package. The starting 'from' package should be kept, just
+ * as if deltas were not used. Delete the package file if the
+ * previous iteration of the loop used the same package. */
+ if(pkg == lastpkg) {
+ snprintf(fname, PATH_MAX, "%s/%s-%s-%s" PKGEXT,
+ cachedir, pkg->name, d->from, pkg->arch);
+ unlink(fname);
+ } else {
+ lastpkg = pkg;
+ }
+ } else {
+ EVENT(trans, PM_TRANS_EVT_DELTA_PATCH_FAILED, NULL, NULL);
+ lastpkg_failed = 1;
+ ret = 1;
+ }
+ }
+
+ return(ret);
+}
+
+/** Compares the md5sum of a file to the expected value.
+ *
+ * If the md5sum does not match, the user is asked whether the file
+ * should be deleted.
+ *
+ * @param trans the transaction
+ * @param filename the filename of the file to test
+ * @param md5sum the expected md5sum of the file
+ * @param data data to write the error messages to
+ *
+ * @return 0 if the md5sum matched, 1 otherwise
+ */
+static int test_md5sum(pmtrans_t *trans, const char *filename,
+ const char *md5sum, alpm_list_t **data)
+{
+ char *filepath;
+ char *md5sum2;
+ char *errormsg = NULL;
+ int ret = 0;
+
+ filepath = _alpm_filecache_find(filename);
+ md5sum2 = alpm_get_md5sum(filepath);
+
+ if(md5sum == NULL) {
+ /* TODO wtf is this? malloc'd strings for error messages? */
+ if((errormsg = calloc(512, sizeof(char))) == NULL) {
+ RET_ERR(PM_ERR_MEMORY, -1);
+ }
+ snprintf(errormsg, 512, _("can't get md5 checksum for file %s\n"),
+ filename);
+ *data = alpm_list_add(*data, errormsg);
+ ret = 1;
+ } else if(md5sum2 == NULL) {
+ if((errormsg = calloc(512, sizeof(char))) == NULL) {
+ RET_ERR(PM_ERR_MEMORY, -1);
+ }
+ snprintf(errormsg, 512, _("can't get md5 checksum for file %s\n"),
+ filename);
+ *data = alpm_list_add(*data, errormsg);
+ ret = 1;
+ } else if(strcmp(md5sum, md5sum2) != 0) {
+ int doremove = 0;
+ if((errormsg = calloc(512, sizeof(char))) == NULL) {
+ RET_ERR(PM_ERR_MEMORY, -1);
+ }
+ QUESTION(trans, PM_TRANS_CONV_CORRUPTED_PKG, (char *)filename,
+ NULL, NULL, &doremove);
+ if(doremove) {
+ unlink(filepath);
+ }
+ snprintf(errormsg, 512, _("file %s was corrupted (bad MD5 checksum)\n"),
+ filename);
+ *data = alpm_list_add(*data, errormsg);
+ ret = 1;
+ }
+
+ FREE(filepath);
+ FREE(md5sum2);
+
+ return(ret);
+}
+
+/** Compares the md5sum of a delta to the expected value.
+ *
+ * @param trans the transaction
+ * @param delta the delta to test
+ * @param data data to write the error messages to
+ *
+ * @return 0 if the md5sum matched, 1 otherwise
+ */
+static int test_delta_md5sum(pmtrans_t *trans, pmdelta_t *delta,
+ alpm_list_t **data)
+{
+ const char *filename;
+ const char *md5sum;
+ int ret = 0;
+
+ filename = alpm_delta_get_filename(delta);
+ md5sum = alpm_delta_get_md5sum(delta);
+
+ ret = test_md5sum(trans, filename, md5sum, data);
+
+ return(ret);
+}
+
+/** Compares the md5sum of a package to the expected value.
+ *
+ * @param trans the transaction
+ * @param pkg the package to test
+ * @param data data to write the error messages to
+ *
+ * @return 0 if the md5sum matched, 1 otherwise
+ */
+static int test_pkg_md5sum(pmtrans_t *trans, pmpkg_t *pkg, alpm_list_t **data)
+{
+ const char *filename;
+ const char *md5sum;
+ int ret = 0;
+
+ filename = alpm_pkg_get_filename(pkg);
+ md5sum = alpm_pkg_get_md5sum(pkg);
+
+ ret = test_md5sum(trans, filename, md5sum, data);
return(ret);
}
@@ -769,68 +967,94 @@ cleanup:
int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
{
alpm_list_t *i, *j, *files = NULL;
+ alpm_list_t *patches = NULL, *deltas = NULL;
pmtrans_t *tr = NULL;
int replaces = 0, retval = 0;
- char ldir[PATH_MAX];
- int varcache = 1;
+ const char *cachedir = NULL;
+ int dltotal = 0, dl = 0;
ALPM_LOG_FUNC;
ASSERT(db_local != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
+ cachedir = _alpm_filecache_setup();
trans->state = STATE_DOWNLOADING;
- /* group sync records by repository and download */
- snprintf(ldir, PATH_MAX, "%s%s", handle->root, handle->cachedir);
+ /* Sum up the download sizes. This has to be in its own loop because
+ * the download loop is grouped by db. */
+ for(j = trans->packages; j; j = j->next) {
+ pmsyncpkg_t *sync = j->data;
+ pmpkg_t *spkg = sync->pkg;
+ dltotal += alpm_pkg_download_size(spkg, db_local);
+ }
+
+ /* group sync records by repository and download */
for(i = handle->dbs_sync; i; i = i->next) {
pmdb_t *current = i->data;
for(j = trans->packages; j; j = j->next) {
pmsyncpkg_t *sync = j->data;
pmpkg_t *spkg = sync->pkg;
- pmdb_t *dbs = spkg->data;
+ pmdb_t *dbs = spkg->origin_data.db;
if(current == dbs) {
const char *fname = NULL;
- char path[PATH_MAX];
fname = alpm_pkg_get_filename(spkg);
if(trans->flags & PM_TRANS_FLAG_PRINTURIS) {
- EVENT(trans, PM_TRANS_EVT_PRINTURI, (char *)alpm_db_get_url(current), (char *)fname);
+ EVENT(trans, PM_TRANS_EVT_PRINTURI, (char *)alpm_db_get_url(current),
+ (char *)fname);
} else {
- struct stat buf;
- snprintf(path, PATH_MAX, "%s/%s", ldir, fname);
- if(stat(path, &buf)) {
- /* file is not in the cache dir, so add it to the list */
- files = alpm_list_add(files, strdup(fname));
- } else {
- _alpm_log(PM_LOG_DEBUG, _("%s is already in the cache\n"), fname);
+ char *fpath = _alpm_filecache_find(fname);
+ if(!fpath) {
+ if(handle->usedelta) {
+ alpm_list_t *delta_path = pkg_upgrade_delta_path(spkg, db_local);
+
+ if(delta_path) {
+ alpm_list_t *dlts = NULL;
+
+ for(dlts = delta_path; dlts; dlts = alpm_list_next(dlts)) {
+ pmdelta_t *d = (pmdelta_t *)alpm_list_getdata(dlts);
+ char *fpath2 = _alpm_filecache_find(d->filename);
+
+ if(!fpath2) {
+ /* add the delta filename to the download list if
+ * it's not in the cache*/
+ files = alpm_list_add(files, strdup(d->filename));
+ }
+
+ /* save the package and delta so that the xdelta patch
+ * command can be run after the downloads finish */
+ patches = alpm_list_add(patches, spkg);
+ patches = alpm_list_add(patches, d);
+
+ /* keep a list of the delta files for md5sums */
+ deltas = alpm_list_add(deltas, d);
+ }
+
+ alpm_list_free(delta_path);
+ delta_path = NULL;
+ } else {
+ /* no deltas to download, so add the file to the
+ * download list */
+ files = alpm_list_add(files, strdup(fname));
+ }
+ } else {
+ /* not using deltas, so add the file to the download list */
+ files = alpm_list_add(files, strdup(fname));
+ }
}
+ FREE(fpath);
}
}
}
if(files) {
- struct stat buf;
EVENT(trans, PM_TRANS_EVT_RETRIEVE_START, current->treename, NULL);
- if(stat(ldir, &buf)) {
- /* no cache directory.... try creating it */
- _alpm_log(PM_LOG_WARNING, _("no %s cache exists, creating...\n"), ldir);
- alpm_logaction(_("warning: no %s cache exists, creating..."), ldir);
- if(_alpm_makepath(ldir)) {
- /* couldn't mkdir the cache directory, so fall back to /tmp and unlink
- * the package afterwards.
- */
- _alpm_log(PM_LOG_WARNING, _("couldn't create package cache, using /tmp instead\n"));
- alpm_logaction(_("warning: couldn't create package cache, using /tmp instead"));
- snprintf(ldir, PATH_MAX, "%stmp", alpm_option_get_root());
- alpm_option_set_cachedir(ldir);
- varcache = 0;
- }
- }
- if(_alpm_downloadfiles(current->servers, ldir, files)) {
- _alpm_log(PM_LOG_WARNING, _("failed to retrieve some files from %s\n"), current->treename);
+ if(_alpm_downloadfiles(current->servers, cachedir, files, &dl, dltotal)) {
+ _alpm_log(PM_LOG_WARNING, _("failed to retrieve some files from %s\n"),
+ current->treename);
RET_ERR(PM_ERR_RETRIEVE, -1);
}
FREELIST(files);
@@ -840,66 +1064,62 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
return(0);
}
- /* Check integrity of files */
+ if(handle->usedelta) {
+ int ret = 0;
+
+ /* only output if there are deltas to work with */
+ if(deltas) {
+ /* Check integrity of deltas */
+ EVENT(trans, PM_TRANS_EVT_DELTA_INTEGRITY_START, NULL, NULL);
+
+ for(i = deltas; i; i = i->next) {
+ pmdelta_t *d = alpm_list_getdata(i);
+
+ ret = test_delta_md5sum(trans, d, data);
+
+ if(ret == 1) {
+ retval = 1;
+ } else if(ret == -1) { /* -1 is for serious errors */
+ RET_ERR(pm_errno, -1);
+ }
+ }
+ if(retval) {
+ pm_errno = PM_ERR_DLT_CORRUPTED;
+ goto error;
+ }
+ EVENT(trans, PM_TRANS_EVT_DELTA_INTEGRITY_DONE, NULL, NULL);
+
+ /* Use the deltas to generate the packages */
+ EVENT(trans, PM_TRANS_EVT_DELTA_PATCHES_START, NULL, NULL);
+ ret = apply_deltas(trans, patches);
+ EVENT(trans, PM_TRANS_EVT_DELTA_PATCHES_DONE, NULL, NULL);
+
+ alpm_list_free(patches);
+ patches = NULL;
+ alpm_list_free(deltas);
+ deltas = NULL;
+ }
+ if(ret) {
+ pm_errno = PM_ERR_DLT_PATCHFAILED;
+ goto error;
+ }
+ }
+
+ /* Check integrity of packages */
EVENT(trans, PM_TRANS_EVT_INTEGRITY_START, NULL, NULL);
for(i = trans->packages; i; i = i->next) {
pmsyncpkg_t *sync = i->data;
pmpkg_t *spkg = sync->pkg;
- char str[PATH_MAX];
- const char *pkgname;
- char *md5sum1, *md5sum2, *sha1sum1, *sha1sum2;
- char *ptr=NULL;
-
- pkgname = alpm_pkg_get_filename(spkg);
- md5sum1 = spkg->md5sum;
- sha1sum1 = spkg->sha1sum;
-
- if((md5sum1 == NULL) && (sha1sum1 == NULL)) {
- /* TODO wtf is this? malloc'd strings for error messages? */
- if((ptr = (char *)malloc(512)) == NULL) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
- snprintf(ptr, 512, _("can't get md5 or sha1 checksum for package %s\n"), pkgname);
- *data = alpm_list_add(*data, ptr);
- retval = 1;
- continue;
- }
- snprintf(str, PATH_MAX, "%s%s%s", handle->root, handle->cachedir, pkgname);
- md5sum2 = _alpm_MDFile(str);
- sha1sum2 = _alpm_SHAFile(str);
- if(md5sum2 == NULL && sha1sum2 == NULL) {
- if((ptr = (char *)malloc(512)) == NULL) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
- snprintf(ptr, 512, _("can't get md5 or sha1 checksum for package %s\n"), pkgname);
- *data = alpm_list_add(*data, ptr);
- retval = 1;
- continue;
- }
- if((strcmp(md5sum1, md5sum2) != 0) && (strcmp(sha1sum1, sha1sum2) != 0)) {
- int doremove=0;
- if((ptr = (char *)malloc(512)) == NULL) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
- if(trans->flags & PM_TRANS_FLAG_ALLDEPS) {
- doremove=1;
- } else {
- QUESTION(trans, PM_TRANS_CONV_CORRUPTED_PKG, (char *)pkgname, NULL, NULL, &doremove);
- }
- if(doremove) {
- char str[PATH_MAX];
- snprintf(str, PATH_MAX, "%s%s%s", handle->root, handle->cachedir, pkgname);
- unlink(str);
- snprintf(ptr, 512, _("archive %s was corrupted (bad MD5 or SHA1 checksum)\n"), pkgname);
- } else {
- snprintf(ptr, 512, _("archive %s is corrupted (bad MD5 or SHA1 checksum)\n"), pkgname);
- }
- *data = alpm_list_add(*data, ptr);
+ int ret = 0;
+
+ ret = test_pkg_md5sum(trans, spkg, data);
+
+ if(ret == 1) {
retval = 1;
+ } else if(ret == -1) { /* -1 is for serious errors */
+ RET_ERR(pm_errno, -1);
}
- FREE(md5sum2);
- FREE(sha1sum2);
}
if(retval) {
pm_errno = PM_ERR_PKG_CORRUPTED;
@@ -914,13 +1134,13 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
trans->state = STATE_COMMITING;
tr = _alpm_trans_new();
if(tr == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not create removal transaction"));
+ _alpm_log(PM_LOG_ERROR, _("could not create removal transaction\n"));
pm_errno = PM_ERR_MEMORY;
goto error;
}
if(_alpm_trans_init(tr, PM_TRANS_TYPE_REMOVE, PM_TRANS_FLAG_NODEPS, NULL, NULL, NULL) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not initialize the removal transaction"));
+ _alpm_log(PM_LOG_ERROR, _("could not initialize the removal transaction\n"));
goto error;
}
@@ -940,44 +1160,49 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
}
}
if(replaces) {
- _alpm_log(PM_LOG_DEBUG, _("removing conflicting and to-be-replaced packages"));
+ _alpm_log(PM_LOG_DEBUG, "removing conflicting and to-be-replaced packages\n");
if(_alpm_trans_prepare(tr, data) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not prepare removal transaction"));
+ _alpm_log(PM_LOG_ERROR, _("could not prepare removal transaction\n"));
goto error;
}
/* we want the frontend to be aware of commit details */
tr->cb_event = trans->cb_event;
if(_alpm_trans_commit(tr, NULL) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not commit removal transaction"));
+ _alpm_log(PM_LOG_ERROR, _("could not commit removal transaction\n"));
goto error;
}
}
- FREETRANS(tr);
+ _alpm_trans_free(tr);
+ tr = NULL;
/* install targets */
- _alpm_log(PM_LOG_DEBUG, _("installing packages"));
+ _alpm_log(PM_LOG_DEBUG, "installing packages\n");
tr = _alpm_trans_new();
if(tr == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not create transaction"));
+ _alpm_log(PM_LOG_ERROR, _("could not create transaction\n"));
pm_errno = PM_ERR_MEMORY;
goto error;
}
if(_alpm_trans_init(tr, PM_TRANS_TYPE_UPGRADE, trans->flags | PM_TRANS_FLAG_NODEPS, trans->cb_event, trans->cb_conv, trans->cb_progress) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not initialize transaction"));
+ _alpm_log(PM_LOG_ERROR, _("could not initialize transaction\n"));
goto error;
}
for(i = trans->packages; i; i = i->next) {
pmsyncpkg_t *sync = i->data;
pmpkg_t *spkg = sync->pkg;
-
- const char *fname = NULL;
- char str[PATH_MAX];
+ const char *fname;
+ char *fpath;
fname = alpm_pkg_get_filename(spkg);
- snprintf(str, PATH_MAX, "%s%s%s", handle->root, handle->cachedir, fname);
- if(_alpm_trans_addtarget(tr, str) == -1) {
+ /* Loop through the cache dirs until we find a matching file */
+ fpath = _alpm_filecache_find(fname);
+
+ if(_alpm_trans_addtarget(tr, fpath) == -1) {
+ FREE(fpath);
goto error;
}
+ FREE(fpath);
+
/* using alpm_list_last() is ok because addtarget() adds the new target at the
* end of the tr->packages list */
spkg = alpm_list_last(tr->packages)->data;
@@ -986,82 +1211,22 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
}
}
if(_alpm_trans_prepare(tr, data) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not prepare transaction"));
+ _alpm_log(PM_LOG_ERROR, _("could not prepare transaction\n"));
/* pm_errno is set by trans_prepare */
goto error;
}
if(_alpm_trans_commit(tr, NULL) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not commit transaction"));
+ _alpm_log(PM_LOG_ERROR, _("could not commit transaction\n"));
goto error;
}
- FREETRANS(tr);
-
- /* propagate replaced packages' requiredby fields to their new owners */
- if(replaces) {
- _alpm_log(PM_LOG_DEBUG, _("updating database for replaced packages' dependencies"));
- for(i = trans->packages; i; i = i->next) {
- pmsyncpkg_t *sync = i->data;
- if(sync->type == PM_SYNC_TYPE_REPLACE) {
- alpm_list_t *j;
- pmpkg_t *new = _alpm_db_get_pkgfromcache(db_local, alpm_pkg_get_name(sync->pkg));
- for(j = sync->data; j; j = j->next) {
- alpm_list_t *k;
- pmpkg_t *old = j->data;
- /* merge lists */
- for(k = alpm_pkg_get_requiredby(old); k; k = k->next) {
- if(!alpm_list_find_str(alpm_pkg_get_requiredby(new), k->data)) {
- /* replace old's name with new's name in the requiredby's dependency list */
- alpm_list_t *m;
- pmpkg_t *depender = _alpm_db_get_pkgfromcache(db_local, k->data);
- if(depender == NULL) {
- /* If the depending package no longer exists in the local db,
- * then it must have ALSO conflicted with sync->pkg. If
- * that's the case, then we don't have anything to propagate
- * here. */
- continue;
- }
- for(m = alpm_pkg_get_depends(depender); m; m = m->next) {
- if(!strcmp(m->data, alpm_pkg_get_name(old))) {
- FREE(m->data);
- m->data = strdup(alpm_pkg_get_name(new));
- }
- }
- if(_alpm_db_write(db_local, depender, INFRQ_DEPENDS) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not update requiredby for database entry %s-%s"),
- alpm_pkg_get_name(new), alpm_pkg_get_version(new));
- }
- /* add the new requiredby */
- new->requiredby = alpm_list_add(alpm_pkg_get_requiredby(new), strdup(k->data));
- }
- }
- }
- if(_alpm_db_write(db_local, new, INFRQ_DEPENDS) == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not update new database entry %s-%s"),
- alpm_pkg_get_name(new), alpm_pkg_get_version(new));
- }
- }
- }
- }
-
- if(!varcache && !(trans->flags & PM_TRANS_FLAG_DOWNLOADONLY)) {
- /* delete packages */
- for(i = files; i; i = i->next) {
- unlink(i->data);
- }
- }
-
- /* run ldconfig if it exists */
- if(handle->trans->state != STATE_INTERRUPTED) {
- _alpm_log(PM_LOG_DEBUG, _("running \"ldconfig -r %s\""), handle->root);
- _alpm_ldconfig(handle->root);
- }
+ _alpm_trans_free(tr);
+ tr = NULL;
return(0);
error:
- FREETRANS(tr);
- /* commiting failed, so this is still just a prepared transaction */
- trans->state = STATE_PREPARED;
+ _alpm_trans_free(tr);
+ tr = NULL;
return(-1);
}
@@ -1076,17 +1241,17 @@ pmsyncpkg_t *_alpm_sync_find(alpm_list_t *syncpkgs, const char* pkgname)
pmpkg_t *pkg = alpm_sync_get_pkg(syncpkg);
if(strcmp(alpm_pkg_get_name(pkg), pkgname) == 0) {
- _alpm_log(PM_LOG_DEBUG, _("found package '%s-%s' in sync"),
+ _alpm_log(PM_LOG_DEBUG, "found package '%s-%s' in sync\n",
alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
return(syncpkg);
}
}
- _alpm_log(PM_LOG_DEBUG, _("package '%s' not found in sync"), pkgname);
+ _alpm_log(PM_LOG_DEBUG, "package '%s' not found in sync\n", pkgname);
return(NULL); /* not found */
}
-pmsynctype_t SYMEXPORT alpm_sync_get_type(pmsyncpkg_t *sync)
+pmsynctype_t SYMEXPORT alpm_sync_get_type(const pmsyncpkg_t *sync)
{
/* Sanity checks */
ASSERT(sync != NULL, return(-1));
@@ -1094,7 +1259,7 @@ pmsynctype_t SYMEXPORT alpm_sync_get_type(pmsyncpkg_t *sync)
return sync->type;
}
-pmpkg_t SYMEXPORT *alpm_sync_get_pkg(pmsyncpkg_t *sync)
+pmpkg_t SYMEXPORT *alpm_sync_get_pkg(const pmsyncpkg_t *sync)
{
/* Sanity checks */
ASSERT(sync != NULL, return(NULL));
@@ -1102,7 +1267,7 @@ pmpkg_t SYMEXPORT *alpm_sync_get_pkg(pmsyncpkg_t *sync)
return sync->pkg;
}
-void SYMEXPORT *alpm_sync_get_data(pmsyncpkg_t *sync)
+void SYMEXPORT *alpm_sync_get_data(const pmsyncpkg_t *sync)
{
/* Sanity checks */
ASSERT(sync != NULL, return(NULL));
diff --git a/lib/libalpm/sync.h b/lib/libalpm/sync.h
index 3ba7e009..0ef42627 100644
--- a/lib/libalpm/sync.h
+++ b/lib/libalpm/sync.h
@@ -1,10 +1,10 @@
/*
* sync.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_SYNC_H
@@ -32,12 +32,12 @@ struct __pmsyncpkg_t {
void *data;
};
-#define FREESYNC(p) do { if(p) { _alpm_sync_free(p); p = NULL; } } while(0)
-
pmsyncpkg_t *_alpm_sync_new(int type, pmpkg_t *spkg, void *data);
-void _alpm_sync_free(void *data);
+void _alpm_sync_free(pmsyncpkg_t *data);
+
+int _alpm_sync_sysupgrade(pmtrans_t *trans,
+ pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t **syncpkgs);
-int _alpm_sync_sysupgrade(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync);
int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync, char *name);
int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t **data);
int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data);
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 009ec7f1..d9988265 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -5,7 +5,7 @@
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -27,7 +27,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <libintl.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/statvfs.h>
+#include <unistd.h>
+#include <errno.h>
/* libalpm */
#include "trans.h"
@@ -43,19 +48,188 @@
#include "alpm.h"
#include "deps.h"
#include "cache.h"
-#include "provide.h"
-pmtrans_t *_alpm_trans_new()
+/** \addtogroup alpm_trans Transaction Functions
+ * @brief Functions to manipulate libalpm transactions
+ * @{
+ */
+
+/** Initialize the transaction.
+ * @param type type of the transaction
+ * @param flags flags of the transaction (like nodeps, etc)
+ * @param event event callback function pointer
+ * @param conv question callback function pointer
+ * @param progress progress callback function pointer
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_trans_init(pmtranstype_t type, pmtransflag_t flags,
+ alpm_trans_cb_event event, alpm_trans_cb_conv conv,
+ alpm_trans_cb_progress progress)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+
+ ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
+
+ /* lock db */
+ handle->lckfd = _alpm_lckmk();
+ if(handle->lckfd == -1) {
+ RET_ERR(PM_ERR_HANDLE_LOCK, -1);
+ }
+
+ handle->trans = _alpm_trans_new();
+ if(handle->trans == NULL) {
+ RET_ERR(PM_ERR_MEMORY, -1);
+ }
+
+ return(_alpm_trans_init(handle->trans, type, flags, event, conv, progress));
+}
+
+/** Search for packages to upgrade and add them to the transaction.
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_trans_sysupgrade()
+{
+ pmtrans_t *trans;
+
+ ALPM_LOG_FUNC;
+
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+
+ 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(trans->type == PM_TRANS_TYPE_SYNC, RET_ERR(PM_ERR_TRANS_TYPE, -1));
+
+ return(_alpm_trans_sysupgrade(trans));
+}
+
+/** Add a target to the transaction.
+ * @param target the name of the target to add
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_trans_addtarget(char *target)
+{
+ pmtrans_t *trans;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ ASSERT(target != NULL && strlen(target) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
+
+ 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));
+
+ return(_alpm_trans_addtarget(trans, target));
+}
+
+/** Prepare a transaction.
+ * @param data the address of an alpm_list where detailed description
+ * of an error can be dumped (ie. list of conflicting files)
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_trans_prepare(alpm_list_t **data)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ ASSERT(data != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -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));
+
+ return(_alpm_trans_prepare(handle->trans, data));
+}
+
+/** Commit a transaction.
+ * @param data the address of an alpm_list where detailed description
+ * of an error can be dumped (ie. list of conflicting files)
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_trans_commit(alpm_list_t **data)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -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));
+
+ return(_alpm_trans_commit(handle->trans, data));
+}
+
+/** Interrupt a transaction.
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_trans_interrupt()
+{
+ pmtrans_t *trans;
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+
+ trans = handle->trans;
+ ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
+ ASSERT(trans->state == STATE_COMMITING || trans->state == STATE_INTERRUPTED,
+ RET_ERR(PM_ERR_TRANS_TYPE, -1));
+
+ trans->state = STATE_INTERRUPTED;
+
+ return(0);
+}
+
+/** Release a transaction.
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
+int SYMEXPORT alpm_trans_release()
{
pmtrans_t *trans;
ALPM_LOG_FUNC;
- if((trans = (pmtrans_t *)malloc(sizeof(pmtrans_t))) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmtrans_t));
- return(NULL);
+ /* Sanity checks */
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+
+ trans = handle->trans;
+ ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
+ ASSERT(trans->state != STATE_IDLE, RET_ERR(PM_ERR_TRANS_NULL, -1));
+
+ _alpm_trans_free(trans);
+ handle->trans = NULL;
+
+ /* unlock db */
+ if(handle->lckfd != -1) {
+ close(handle->lckfd);
+ handle->lckfd = -1;
+ }
+ if(_alpm_lckrm()) {
+ _alpm_log(PM_LOG_WARNING, _("could not remove lock file %s\n"),
+ alpm_option_get_lockfile());
+ alpm_logaction("warning: could not remove lock file %s\n",
+ alpm_option_get_lockfile());
}
+ return(0);
+}
+
+/** @} */
+
+pmtrans_t *_alpm_trans_new()
+{
+ pmtrans_t *trans;
+
+ ALPM_LOG_FUNC;
+
+ CALLOC(trans, 1, sizeof(pmtrans_t), RET_ERR(PM_ERR_MEMORY, NULL));
+
trans->targets = NULL;
trans->packages = NULL;
trans->skip_add = NULL;
@@ -70,10 +244,8 @@ pmtrans_t *_alpm_trans_new()
return(trans);
}
-void _alpm_trans_free(void *data)
+void _alpm_trans_free(pmtrans_t *trans)
{
- pmtrans_t *trans = data;
-
ALPM_LOG_FUNC;
if(trans == NULL) {
@@ -82,14 +254,11 @@ void _alpm_trans_free(void *data)
FREELIST(trans->targets);
if(trans->type == PM_TRANS_TYPE_SYNC) {
- alpm_list_t *i;
- for(i = trans->packages; i; i = i->next) {
- FREESYNC(i->data);
- }
- FREELIST(trans->packages);
+ alpm_list_free_inner(trans->packages, (alpm_list_fn_free)_alpm_sync_free);
} else {
- FREELISTPKGS(trans->packages);
+ alpm_list_free_inner(trans->packages, (alpm_list_fn_free)_alpm_pkg_free);
}
+ alpm_list_free(trans->packages);
FREELIST(trans->skip_add);
FREELIST(trans->skip_remove);
@@ -123,9 +292,15 @@ int _alpm_trans_sysupgrade(pmtrans_t *trans)
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
- return(_alpm_sync_sysupgrade(trans, handle->db_local, handle->dbs_sync));
+ return(_alpm_sync_sysupgrade(trans, handle->db_local, handle->dbs_sync,
+ &(trans->packages)));
}
+/** Add a target to the transaction.
+ * @param trans the current transaction
+ * @param target the name of the target to add
+ * @return 0 on success, -1 on error (pm_errno is set accordingly)
+ */
int _alpm_trans_addtarget(pmtrans_t *trans, char *target)
{
ALPM_LOG_FUNC;
@@ -148,14 +323,15 @@ int _alpm_trans_addtarget(pmtrans_t *trans, char *target)
}
break;
case PM_TRANS_TYPE_REMOVE:
+ case PM_TRANS_TYPE_REMOVEUPGRADE:
if(_alpm_remove_loadtarget(trans, handle->db_local, target) == -1) {
- /* pm_errno is set by remove_loadtarget() */
+ /* pm_errno is set by _alpm_remove_loadtarget() */
return(-1);
}
break;
case PM_TRANS_TYPE_SYNC:
if(_alpm_sync_addtarget(trans, handle->db_local, handle->dbs_sync, target) == -1) {
- /* pm_errno is set by sync_loadtarget() */
+ /* pm_errno is set by _alpm_sync_loadtarget() */
return(-1);
}
break;
@@ -189,6 +365,7 @@ int _alpm_trans_prepare(pmtrans_t *trans, alpm_list_t **data)
}
break;
case PM_TRANS_TYPE_REMOVE:
+ case PM_TRANS_TYPE_REMOVEUPGRADE:
if(_alpm_remove_prepare(trans, handle->db_local, data) == -1) {
/* pm_errno is set by _alpm_remove_prepare() */
return(-1);
@@ -228,13 +405,14 @@ int _alpm_trans_commit(pmtrans_t *trans, alpm_list_t **data)
case PM_TRANS_TYPE_ADD:
case PM_TRANS_TYPE_UPGRADE:
if(_alpm_add_commit(trans, handle->db_local) == -1) {
- /* pm_errno is set by _alpm_add_prepare() */
+ /* pm_errno is set by _alpm_add_commit() */
return(-1);
}
break;
case PM_TRANS_TYPE_REMOVE:
+ case PM_TRANS_TYPE_REMOVEUPGRADE:
if(_alpm_remove_commit(trans, handle->db_local) == -1) {
- /* pm_errno is set by _alpm_remove_prepare() */
+ /* pm_errno is set by _alpm_remove_commit() */
return(-1);
}
break;
@@ -251,118 +429,199 @@ int _alpm_trans_commit(pmtrans_t *trans, alpm_list_t **data)
return(0);
}
-int _alpm_trans_update_depends(pmtrans_t *trans, pmpkg_t *pkg)
+/* A cheap grep for text files, returns 1 if a substring
+ * was found in the text file fn, 0 if it wasn't
+ */
+static int grep(const char *fn, const char *needle)
+{
+ FILE *fp;
+
+ if((fp = fopen(fn, "r")) == NULL) {
+ return(0);
+ }
+ while(!feof(fp)) {
+ char line[1024];
+ fgets(line, 1024, fp);
+ if(feof(fp)) {
+ continue;
+ }
+ if(strstr(line, needle)) {
+ fclose(fp);
+ return(1);
+ }
+ }
+ fclose(fp);
+ return(0);
+}
+
+int _alpm_runscriptlet(const char *root, const char *installfn,
+ const char *script, const char *ver,
+ const char *oldver, pmtrans_t *trans)
{
- alpm_list_t *i, *j;
- alpm_list_t *depends = NULL;
- const char *pkgname;
- pmdb_t *localdb;
+ char scriptfn[PATH_MAX];
+ char cmdline[PATH_MAX];
+ char tmpdir[PATH_MAX];
+ char cwd[PATH_MAX];
+ char *scriptpath;
+ struct stat buf;
+ pid_t pid;
+ int clean_tmpdir = 0;
+ int restore_cwd = 0;
+ int retval = 0;
ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
- ASSERT(pkg != NULL, RET_ERR(PM_ERR_PKG_INVALID, -1));
- pkgname = alpm_pkg_get_name(pkg);
- depends = alpm_pkg_get_depends(pkg);
+ if(stat(installfn, &buf)) {
+ /* not found */
+ _alpm_log(PM_LOG_DEBUG, "scriptlet '%s' not found\n", installfn);
+ return(0);
+ }
- if(depends) {
- _alpm_log(PM_LOG_DEBUG, _("updating dependency packages 'requiredby' fields for %s-%s"),
- pkgname, pkg->version);
+ snprintf(tmpdir, PATH_MAX, "%sbin/sh", root);
+ if(stat(tmpdir, &buf)) {
+ /* not found */
+ _alpm_log(PM_LOG_ERROR, _("No /bin/sh in root dir (%s), aborting scriptlet\n"), root);
+ return(0);
+ }
+
+ /* creates a directory in $root/tmp/ for copying/extracting the scriptlet */
+ snprintf(tmpdir, PATH_MAX, "%stmp/", root);
+ if(stat(tmpdir, &buf)) {
+ _alpm_makepath(tmpdir);
+ }
+ snprintf(tmpdir, PATH_MAX, "%stmp/alpm_XXXXXX", root);
+ if(mkdtemp(tmpdir) == NULL) {
+ _alpm_log(PM_LOG_ERROR, _("could not create temp directory\n"));
+ return(1);
} else {
- _alpm_log(PM_LOG_DEBUG, _("package has no dependencies, no other packages to update"));
+ clean_tmpdir = 1;
}
- localdb = alpm_option_get_localdb();
- for(i = depends; i; i = i->next) {
- pmdepend_t* dep = alpm_splitdep(i->data);
- if(dep == NULL) {
- continue;
+ /* either extract or copy the scriptlet */
+ snprintf(scriptfn, PATH_MAX, "%s/.INSTALL", tmpdir);
+ if(!strcmp(script, "pre_upgrade") || !strcmp(script, "pre_install")) {
+ if(_alpm_unpack(installfn, tmpdir, ".INSTALL")) {
+ retval = 1;
}
-
- if(trans->packages && trans->type == PM_TRANS_TYPE_REMOVE) {
- if(_alpm_pkg_find(dep->name, handle->trans->packages)) {
- continue;
- }
+ } else {
+ if(_alpm_copyfile(installfn, scriptfn)) {
+ _alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), scriptfn, strerror(errno));
+ retval = 1;
}
+ }
+ if(retval == 1) {
+ goto cleanup;
+ }
- pmpkg_t *deppkg = _alpm_db_get_pkgfromcache(localdb, dep->name);
- if(!deppkg) {
- int found_provides = 0;
- /* look for a provides package */
- alpm_list_t *provides = _alpm_db_whatprovides(localdb, dep->name);
- for(j = provides; j; j = j->next) {
- if(!j->data) {
- continue;
- }
- pmpkg_t *provpkg = j->data;
- deppkg = _alpm_db_get_pkgfromcache(localdb, alpm_pkg_get_name(provpkg));
+ /* mark the scriptlet as executable */
+ chmod(scriptfn, 0755);
- if(!deppkg) {
- continue;
- }
+ /* chop off the root so we can find the tmpdir in the chroot */
+ scriptpath = scriptfn + strlen(root) - 1;
- found_provides = 1;
-
- /* this is cheating... we call this function to populate the package */
- alpm_list_t *rqdby = alpm_pkg_get_requiredby(deppkg);
-
- _alpm_log(PM_LOG_DEBUG, _("updating 'requiredby' field for package '%s'"),
- alpm_pkg_get_name(deppkg));
- if(trans->type == PM_TRANS_TYPE_REMOVE) {
- void *data = NULL;
- rqdby = alpm_list_remove(rqdby, pkgname, _alpm_str_cmp, &data);
- FREE(data);
- deppkg->requiredby = rqdby;
- } else {
- if(!alpm_list_find_str(rqdby, pkgname)) {
- rqdby = alpm_list_add(rqdby, strdup(pkgname));
- deppkg->requiredby = rqdby;
- }
- }
+ if(!grep(scriptfn, script)) {
+ /* script not found in scriptlet file */
+ goto cleanup;
+ }
- if(_alpm_db_write(localdb, deppkg, INFRQ_DEPENDS)) {
- _alpm_log(PM_LOG_ERROR, _("could not update 'requiredby' database entry %s-%s"),
- alpm_pkg_get_name(deppkg), alpm_pkg_get_version(deppkg));
- }
- }
- FREELISTPTR(provides);
+ /* save the cwd so we can restore it later */
+ if(getcwd(cwd, PATH_MAX) == NULL) {
+ _alpm_log(PM_LOG_ERROR, _("could not get current working directory\n"));
+ } else {
+ restore_cwd = 1;
+ }
- if(!found_provides) {
- _alpm_log(PM_LOG_DEBUG, _("could not find dependency '%s'"), dep->name);
- continue;
- }
- }
+ /* just in case our cwd was removed in the upgrade operation */
+ if(chdir(root) != 0) {
+ _alpm_log(PM_LOG_ERROR, _("could not change directory to %s (%s)\n"), root, strerror(errno));
+ goto cleanup;
+ }
- /* this is cheating... we call this function to populate the package */
- alpm_list_t *rqdby = alpm_pkg_get_requiredby(deppkg);
+ _alpm_log(PM_LOG_DEBUG, "executing %s script...\n", script);
- _alpm_log(PM_LOG_DEBUG, _("updating 'requiredby' field for package '%s'"),
- alpm_pkg_get_name(deppkg));
- if(trans->type == PM_TRANS_TYPE_REMOVE) {
- void *data = NULL;
- rqdby = alpm_list_remove(rqdby, pkgname, _alpm_str_cmp, &data);
- FREE(data);
- deppkg->requiredby = rqdby;
+ if(oldver) {
+ snprintf(cmdline, PATH_MAX, "%s %s %s %s",
+ scriptpath, script, ver, oldver);
+ } else {
+ snprintf(cmdline, PATH_MAX, "%s %s %s",
+ scriptpath, script, ver);
+ }
+ _alpm_log(PM_LOG_DEBUG, "%s\n", cmdline);
+
+ /* fork- parent and child each have seperate code blocks below */
+ pid = fork();
+ if(pid == -1) {
+ _alpm_log(PM_LOG_ERROR, _("could not fork a new process (%s)\n"), strerror(errno));
+ retval = 1;
+ goto cleanup;
+ }
+
+ if(pid == 0) {
+ FILE *pipe;
+ /* this code runs for the child only (the actual chroot/exec) */
+ _alpm_log(PM_LOG_DEBUG, "chrooting in %s\n", root);
+ if(chroot(root) != 0) {
+ _alpm_log(PM_LOG_ERROR, _("could not change the root directory (%s)\n"),
+ strerror(errno));
+ exit(1);
+ }
+ if(chdir("/") != 0) {
+ _alpm_log(PM_LOG_ERROR, _("could not change directory to / (%s)\n"),
+ strerror(errno));
+ exit(1);
+ }
+ umask(0022);
+ _alpm_log(PM_LOG_DEBUG, "executing \"%s\"\n", cmdline);
+ /* execl("/bin/sh", "sh", "-c", cmdline, (char *)NULL); */
+ pipe = popen(cmdline, "r");
+ if(!pipe) {
+ _alpm_log(PM_LOG_ERROR, _("call to popen failed (%s)"),
+ strerror(errno));
+ retval = 1;
+ goto cleanup;
+ }
+ while(!feof(pipe)) {
+ char line[PATH_MAX];
+ if(fgets(line, PATH_MAX, pipe) == NULL)
+ break;
+ alpm_logaction("%s", line);
+ EVENT(trans, PM_TRANS_EVT_SCRIPTLET_INFO, line, NULL);
+ }
+ exit(0);
+ } else {
+ /* this code runs for the parent only (wait on the child) */
+ pid_t retpid;
+ int status;
+ retpid = waitpid(pid, &status, 0);
+ if(retpid == -1) {
+ _alpm_log(PM_LOG_ERROR, _("call to waitpid failed (%s)\n"),
+ strerror(errno));
+ retval = 1;
+ goto cleanup;
} else {
- if(!alpm_list_find_str(rqdby, pkgname)) {
- rqdby = alpm_list_add(rqdby, strdup(pkgname));
- deppkg->requiredby = rqdby;
+ /* check the return status, make sure it is 0 (success) */
+ if(WIFEXITED(status)) {
+ _alpm_log(PM_LOG_DEBUG, "call to waitpid succeeded\n");
+ if(WEXITSTATUS(status) != 0) {
+ _alpm_log(PM_LOG_ERROR, _("scriptlet failed to execute correctly\n"));
+ retval = 1;
+ }
}
}
+ }
- if(_alpm_db_write(localdb, deppkg, INFRQ_DEPENDS)) {
- _alpm_log(PM_LOG_ERROR, _("could not update 'requiredby' database entry %s-%s"),
- alpm_pkg_get_name(deppkg), alpm_pkg_get_version(deppkg));
- }
- free(dep);
+cleanup:
+ if(clean_tmpdir && _alpm_rmrf(tmpdir)) {
+ _alpm_log(PM_LOG_WARNING, _("could not remove tmpdir %s\n"), tmpdir);
+ }
+ if(restore_cwd) {
+ chdir(cwd);
}
- return(0);
-}
+ return(retval);
+}
-pmtranstype_t alpm_trans_get_type()
+pmtranstype_t SYMEXPORT alpm_trans_get_type()
{
/* Sanity checks */
ASSERT(handle != NULL, return(-1));
@@ -380,7 +639,7 @@ unsigned int SYMEXPORT alpm_trans_get_flags()
return handle->trans->flags;
}
-alpm_list_t * alpm_trans_get_targets()
+alpm_list_t SYMEXPORT * alpm_trans_get_targets()
{
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h
index 34a060ad..e96a7c1f 100644
--- a/lib/libalpm/trans.h
+++ b/lib/libalpm/trans.h
@@ -1,11 +1,11 @@
/*
* trans.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_TRANS_H
@@ -50,13 +50,6 @@ struct __pmtrans_t {
alpm_trans_cb_progress cb_progress;
};
-#define FREETRANS(p) \
-do { \
- if(p) { \
- _alpm_trans_free(p); \
- p = NULL; \
- } \
-} while (0)
#define EVENT(t, e, d1, d2) \
do { \
if((t) && (t)->cb_event) { \
@@ -77,7 +70,7 @@ do { \
} while(0)
pmtrans_t *_alpm_trans_new(void);
-void _alpm_trans_free(void *data);
+void _alpm_trans_free(pmtrans_t *trans);
int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t type, pmtransflag_t flags,
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress progress);
@@ -85,7 +78,9 @@ int _alpm_trans_sysupgrade(pmtrans_t *trans);
int _alpm_trans_addtarget(pmtrans_t *trans, char *target);
int _alpm_trans_prepare(pmtrans_t *trans, alpm_list_t **data);
int _alpm_trans_commit(pmtrans_t *trans, alpm_list_t **data);
-int _alpm_trans_update_depends(pmtrans_t *trans, pmpkg_t *pkg);
+int _alpm_runscriptlet(const char *root, const char *installfn,
+ const char *script, const char *ver,
+ const char *oldver, pmtrans_t *trans);
#endif /* _ALPM_TRANS_H */
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index decb5959..2a429488 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -6,7 +6,7 @@
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -19,7 +19,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
@@ -27,44 +27,133 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef __sun__
-#include <alloca.h>
-#endif
#include <string.h>
-#include <unistd.h>
-#include <errno.h>
#include <fcntl.h>
+#include <unistd.h>
#include <ctype.h>
#include <dirent.h>
#include <time.h>
#include <syslog.h>
-#include <sys/wait.h>
-#if defined(__APPLE__) || defined(__OpenBSD__)
-#include <sys/syslimits.h>
-#endif
-#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__)
+#include <errno.h>
+#include <sys/types.h>
#include <sys/stat.h>
-#endif
-#include <libintl.h>
-#ifdef CYGWIN
-#include <limits.h> /* PATH_MAX */
-#endif
-#include <sys/statvfs.h>
-#ifndef __sun__
-#include <mntent.h>
-#endif
+
+/* libarchive */
+#include <archive.h>
+#include <archive_entry.h>
/* libalpm */
#include "util.h"
-#include "alpm_list.h"
#include "log.h"
-#include "trans.h"
-#include "sync.h"
#include "error.h"
#include "package.h"
#include "alpm.h"
+#include "alpm_list.h"
+#include "md5.h"
+
+#ifndef HAVE_STRVERSCMP
+/* GNU's strverscmp() function, taken from glibc 2.3.2 sources
+ */
+
+/* Compare strings while treating digits characters numerically.
+ Copyright (C) 1997, 2002 Free Software Foundation, Inc.
+ Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+*/
+
+/* states: S_N: normal, S_I: comparing integral part, S_F: comparing
+ fractionnal parts, S_Z: idem but with leading Zeroes only */
+#define S_N 0x0
+#define S_I 0x4
+#define S_F 0x8
+#define S_Z 0xC
+
+/* result_type: CMP: return diff; LEN: compare using len_diff/diff */
+#define CMP 2
+#define LEN 3
+
+/* Compare S1 and S2 as strings holding indices/version numbers,
+ returning less than, equal to or greater than zero if S1 is less than,
+ equal to or greater than S2 (for more info, see the texinfo doc).
+*/
+
+int strverscmp (s1, s2)
+ const char *s1;
+ const char *s2;
+{
+ const unsigned char *p1 = (const unsigned char *) s1;
+ const unsigned char *p2 = (const unsigned char *) s2;
+ unsigned char c1, c2;
+ int state;
+ int diff;
+
+ /* Symbol(s) 0 [1-9] others (padding)
+ Transition (10) 0 (01) d (00) x (11) - */
+ static const unsigned int next_state[] =
+ {
+ /* state x d 0 - */
+ /* S_N */ S_N, S_I, S_Z, S_N,
+ /* S_I */ S_N, S_I, S_I, S_I,
+ /* S_F */ S_N, S_F, S_F, S_F,
+ /* S_Z */ S_N, S_F, S_Z, S_Z
+ };
+
+ static const int result_type[] =
+ {
+ /* state x/x x/d x/0 x/- d/x d/d d/0 d/-
+ 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */
+
+ /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
+ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
+ /* S_I */ CMP, -1, -1, CMP, +1, LEN, LEN, CMP,
+ +1, LEN, LEN, CMP, CMP, CMP, CMP, CMP,
+ /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
+ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
+ /* S_Z */ CMP, +1, +1, CMP, -1, CMP, CMP, CMP,
+ -1, CMP, CMP, CMP
+ };
+
+ if (p1 == p2)
+ return 0;
+
+ c1 = *p1++;
+ c2 = *p2++;
+ /* Hint: '0' is a digit too. */
+ state = S_N | ((c1 == '0') + (isdigit (c1) != 0));
+
+ while ((diff = c1 - c2) == 0 && c1 != '\0')
+ {
+ state = next_state[state];
+ c1 = *p1++;
+ c2 = *p2++;
+ state |= (c1 == '0') + (isdigit (c1) != 0);
+ }
+
+ state = result_type[state << 2 | (((c2 == '0') + (isdigit (c2) != 0)))];
+
+ switch (state)
+ {
+ case CMP:
+ return diff;
+
+ case LEN:
+ while (isdigit (*p1++))
+ if (!isdigit (*p2++))
+ return 1;
+
+ return isdigit (*p2) ? -1 : diff;
+
+ default:
+ return state;
+ }
+}
+#endif
-#ifdef __sun__
+#ifndef HAVE_STRSEP
/* This is a replacement for strsep which is not portable (missing on Solaris).
* Copyright (c) 2001 by François Gouget <fgouget_at_codeweavers.com> */
char* strsep(char** str, const char* delims)
@@ -89,33 +178,6 @@ char* strsep(char** str, const char* delims)
*str=NULL;
return token;
}
-
-/* Backported from Solaris Express 4/06
- * Copyright (c) 2006 Sun Microsystems, Inc. */
-char *mkdtemp(char *template)
-{
- char *t = alloca(strlen(template) + 1);
- char *r;
-
- /* Save template */
- (void) strcpy(t, template);
- for (; ; ) {
- r = mktemp(template);
-
- if (*r == '\0')
- return (NULL);
-
- if (mkdir(template, 0700) == 0)
- return (r);
-
- /* Other errors indicate persistent conditions. */
- if (errno != EEXIST)
- return (NULL);
-
- /* Reset template */
- (void) strcpy(template, t);
- }
-}
#endif
/* does the same thing as 'mkdir -p' */
@@ -139,7 +201,7 @@ int _alpm_makepath(const char *path)
if(mkdir(full, 0755)) {
FREE(orig);
umask(oldmask);
- _alpm_log(PM_LOG_ERROR, _("failed to make path '%s' : %s"),
+ _alpm_log(PM_LOG_ERROR, _("failed to make path '%s' : %s\n"),
path, strerror(errno));
return(1);
}
@@ -167,30 +229,30 @@ int _alpm_copyfile(const char *src, const char *dest)
return(1);
}
+ /* do the actual file copy */
while((len = fread(buf, 1, 4096, in))) {
fwrite(buf, 1, len, out);
}
-
fclose(in);
- fclose(out);
- return(0);
-}
-/* Convert a string to uppercase
- */
-char *_alpm_strtoupper(char *str)
-{
- char *ptr = str;
-
- while(*ptr) {
- (*ptr) = toupper(*ptr);
- ptr++;
+ /* chmod dest to permissions of src, as long as it is not a symlink */
+ struct stat statbuf;
+ if(!stat(src, &statbuf)) {
+ if(! S_ISLNK(statbuf.st_mode)) {
+ fchmod(fileno(out), statbuf.st_mode);
+ }
+ } else {
+ /* stat was unsuccessful */
+ fclose(out);
+ return(1);
}
- return(str);
+
+ fclose(out);
+ return(0);
}
/* Trim whitespace and newlines from a string
- */
+*/
char *_alpm_strtrim(char *str)
{
char *pch = str;
@@ -212,7 +274,7 @@ char *_alpm_strtrim(char *str)
return(str);
}
- pch = (char *)(str + (strlen(str) - 1));
+ pch = (str + (strlen(str) - 1));
while(isspace((int)*pch)) {
pch--;
}
@@ -221,12 +283,57 @@ char *_alpm_strtrim(char *str)
return(str);
}
-/* Create a lock file
- */
-int _alpm_lckmk(const char *file)
+/* Helper function for _alpm_strreplace */
+static void _strnadd(char **str, const char *append, unsigned int count)
+{
+ if(*str) {
+ *str = realloc(*str, strlen(*str) + count + 1);
+ } else {
+ *str = calloc(count + 1, sizeof(char));
+ }
+
+ strncat(*str, append, count);
+}
+
+/* Replace all occurances of 'needle' with 'replace' in 'str', returning
+ * a new string (must be free'd) */
+char *_alpm_strreplace(const char *str, const char *needle, const char *replace)
+{
+ const char *p, *q;
+ p = q = str;
+
+ char *newstr = NULL;
+ unsigned int needlesz = strlen(needle),
+ replacesz = strlen(replace);
+
+ while (1) {
+ q = strstr(p, needle);
+ if(!q) { /* not found */
+ if(*p) {
+ /* add the rest of 'p' */
+ _strnadd(&newstr, p, strlen(p));
+ }
+ break;
+ } else { /* found match */
+ if(q > p){
+ /* add chars between this occurance and last occurance, if any */
+ _strnadd(&newstr, p, q - p);
+ }
+ _strnadd(&newstr, replace, replacesz);
+ p = q + needlesz;
+ }
+ }
+
+ return newstr;
+}
+
+
+/* Create a lock file */
+int _alpm_lckmk()
{
int fd, count = 0;
char *dir, *ptr;
+ const char *file = alpm_option_get_lockfile();
/* create the dir of the lockfile first */
dir = strdup(file);
@@ -236,7 +343,7 @@ int _alpm_lckmk(const char *file)
}
_alpm_makepath(dir);
- while((fd = open(file, O_WRONLY | O_CREAT | O_EXCL, 0000)) == -1 && errno == EACCES) {
+ while((fd = open(file, O_WRONLY | O_CREAT | O_EXCL, 0000)) == -1 && errno == EACCES) {
if(++count < 1) {
sleep(1);
} else {
@@ -244,27 +351,28 @@ int _alpm_lckmk(const char *file)
}
}
- free(dir);
+ FREE(dir);
return(fd > 0 ? fd : -1);
}
-/* Remove a lock file
- */
-int _alpm_lckrm(const char *file)
+/* Remove a lock file */
+int _alpm_lckrm()
{
+ const char *file = alpm_option_get_lockfile();
if(unlink(file) == -1 && errno != ENOENT) {
return(-1);
}
return(0);
}
-/* Compression functions
- */
+/* Compression functions */
int _alpm_unpack(const char *archive, const char *prefix, const char *fn)
{
- register struct archive *_archive;
+ int ret = 0;
+ mode_t oldmask;
+ struct archive *_archive;
struct archive_entry *entry;
char expath[PATH_MAX];
@@ -276,31 +384,56 @@ int _alpm_unpack(const char *archive, const char *prefix, const char *fn)
archive_read_support_compression_all(_archive);
archive_read_support_format_all(_archive);
- if(archive_read_open_file(_archive, archive, ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
- _alpm_log(PM_LOG_ERROR, _("could not open %s: %s\n"), archive, archive_error_string(_archive));
+ if(archive_read_open_filename(_archive, archive,
+ ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
+ _alpm_log(PM_LOG_ERROR, _("could not open %s: %s\n"), archive,
+ archive_error_string(_archive));
RET_ERR(PM_ERR_PKG_OPEN, -1);
}
+ oldmask = umask(0022);
while(archive_read_next_header(_archive, &entry) == ARCHIVE_OK) {
- if (fn && strcmp(fn, archive_entry_pathname(entry))) {
- if (archive_read_data_skip(_archive) != ARCHIVE_OK)
- return(1);
+ const struct stat *st;
+ const char *entryname; /* the name of the file in the archive */
+
+ st = archive_entry_stat(entry);
+ entryname = archive_entry_pathname(entry);
+
+ if(S_ISREG(st->st_mode)) {
+ archive_entry_set_mode(entry, 0644);
+ }
+
+ if (fn && strcmp(fn, entryname)) {
+ if (archive_read_data_skip(_archive) != ARCHIVE_OK) {
+ ret = 1;
+ goto cleanup;
+ }
continue;
}
- snprintf(expath, PATH_MAX, "%s/%s", prefix, archive_entry_pathname(entry));
+ snprintf(expath, PATH_MAX, "%s/%s", prefix, entryname);
archive_entry_set_pathname(entry, expath);
- if(archive_read_extract(_archive, entry, ARCHIVE_EXTRACT_FLAGS) != ARCHIVE_OK) {
- _alpm_log(PM_LOG_ERROR, _("could not extract %s: %s\n"), archive_entry_pathname(entry), archive_error_string(_archive));
- return(1);
+
+ int readret = archive_read_extract(_archive, entry, 0);
+ if(readret == ARCHIVE_WARN) {
+ /* operation succeeded but a non-critical error was encountered */
+ _alpm_log(PM_LOG_DEBUG, "warning extracting %s (%s)\n",
+ entryname, archive_error_string(_archive));
+ } else if(readret != ARCHIVE_OK) {
+ _alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)\n"),
+ entryname, archive_error_string(_archive));
+ ret = 1;
+ goto cleanup;
}
if(fn) {
break;
}
}
-
+
+cleanup:
+ umask(oldmask);
archive_read_finish(_archive);
- return(0);
+ return(ret);
}
/* does the same thing as 'rm -rf' */
@@ -312,7 +445,7 @@ int _alpm_rmrf(const char *path)
char name[PATH_MAX];
struct stat st;
- if(lstat(path, &st) == 0) {
+ if(_alpm_lstat(path, &st) == 0) {
if(!S_ISDIR(st.st_mode)) {
if(!unlink(path)) {
return(0);
@@ -345,12 +478,12 @@ int _alpm_rmrf(const char *path)
return(0);
}
-int _alpm_logaction(unsigned short usesyslog, FILE *f, const char *str)
+int _alpm_logaction(unsigned short usesyslog, FILE *f, const char *fmt, va_list args)
{
- _alpm_log(PM_LOG_DEBUG, _("logaction called: %s"), str);
+ int ret = 0;
if(usesyslog) {
- syslog(LOG_WARNING, "%s", str);
+ vsyslog(LOG_WARNING, fmt, args);
}
if(f) {
@@ -361,14 +494,14 @@ int _alpm_logaction(unsigned short usesyslog, FILE *f, const char *str)
tm = localtime(&t);
/* Use ISO-8601 date format */
- fprintf(f, "[%04d-%02d-%02d %02d:%02d] %s\n",
- tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
- tm->tm_hour, tm->tm_min, str);
-
+ fprintf(f, "[%04d-%02d-%02d %02d:%02d] ",
+ tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min);
+ ret = vfprintf(f, fmt, args);
fflush(f);
}
- return(0);
+ return(ret);
}
int _alpm_ldconfig(const char *root)
@@ -389,272 +522,141 @@ int _alpm_ldconfig(const char *root)
return(0);
}
-/* A cheap grep for text files, returns 1 if a substring
- * was found in the text file fn, 0 if it wasn't
- */
-static int grep(const char *fn, const char *needle)
+/* Helper function for comparing strings using the
+ * alpm "compare func" signature */
+int _alpm_str_cmp(const void *s1, const void *s2)
{
- FILE *fp;
-
- if((fp = fopen(fn, "r")) == NULL) {
- return(0);
- }
- while(!feof(fp)) {
- char line[1024];
- fgets(line, 1024, fp);
- if(feof(fp)) {
- continue;
- }
- if(strstr(line, needle)) {
- fclose(fp);
- return(1);
- }
- }
- fclose(fp);
- return(0);
+ return(strcmp(s1, s2));
}
-int _alpm_runscriptlet(const char *root, const char *installfn,
- const char *script, const char *ver,
- const char *oldver, pmtrans_t *trans)
+/** Find a package file in an alpm cachedir.
+ * @param filename name of package file to find
+ * @return malloced path of file, NULL if not found
+ */
+char *_alpm_filecache_find(const char* filename)
{
- char scriptfn[PATH_MAX];
- char cmdline[PATH_MAX];
- char tmpdir[PATH_MAX] = "";
- char *scriptpath;
struct stat buf;
- char cwd[PATH_MAX] = "";
- pid_t pid;
- int retval = 0;
-
- ALPM_LOG_FUNC;
-
- if(stat(installfn, &buf)) {
- /* not found */
- _alpm_log(PM_LOG_DEBUG, "scriptlet '%s' not found", installfn);
- return(0);
- }
+ char path[PATH_MAX];
+ char *retpath;
+ alpm_list_t *i;
- if(!strcmp(script, "pre_upgrade") || !strcmp(script, "pre_install")) {
- snprintf(tmpdir, PATH_MAX, "%stmp/", root);
- if(stat(tmpdir, &buf)) {
- _alpm_makepath(tmpdir);
+ /* Loop through the cache dirs until we find a matching file */
+ for(i = alpm_option_get_cachedirs(); i; i = alpm_list_next(i)) {
+ snprintf(path, PATH_MAX, "%s%s", (char*)alpm_list_getdata(i),
+ filename);
+ if(stat(path, &buf) == 0) {
+ /* TODO maybe check to make sure it is readable? */
+ retpath = strdup(path);
+ _alpm_log(PM_LOG_DEBUG, "found cached pkg: %s\n", retpath);
+ return(retpath);
}
- snprintf(tmpdir, PATH_MAX, "%stmp/alpm_XXXXXX", root);
- if(mkdtemp(tmpdir) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not create temp directory"));
- return(1);
- }
- _alpm_unpack(installfn, tmpdir, ".INSTALL");
- snprintf(scriptfn, PATH_MAX, "%s/.INSTALL", tmpdir);
- /* chop off the root so we can find the tmpdir in the chroot */
- scriptpath = scriptfn + strlen(root) - 1;
- } else {
- STRNCPY(scriptfn, installfn, PATH_MAX);
- /* chop off the root so we can find the tmpdir in the chroot */
- scriptpath = scriptfn + strlen(root) - 1;
- }
-
- if(!grep(scriptfn, script)) {
- /* script not found in scriptlet file */
- goto cleanup;
- }
-
- /* save the cwd so we can restore it later */
- if(getcwd(cwd, PATH_MAX) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("could not get current working directory"));
- /* in case of error, cwd content is undefined: so we set it to something */
- cwd[0] = 0;
- }
-
- /* just in case our cwd was removed in the upgrade operation */
- if(chdir(root) != 0) {
- _alpm_log(PM_LOG_ERROR, _("could not change directory to %s (%s)"), root, strerror(errno));
- goto cleanup;
- }
-
- _alpm_log(PM_LOG_DEBUG, _("executing %s script..."), script);
-
- if(oldver) {
- snprintf(cmdline, PATH_MAX, "source %s %s %s %s",
- scriptpath, script, ver, oldver);
- } else {
- snprintf(cmdline, PATH_MAX, "source %s %s %s",
- scriptpath, script, ver);
- }
- _alpm_log(PM_LOG_DEBUG, "%s", cmdline);
-
- pid = fork();
- if(pid == -1) {
- _alpm_log(PM_LOG_ERROR, _("could not fork a new process (%s)"), strerror(errno));
- retval = 1;
- goto cleanup;
}
+ /* package wasn't found in any cachedir */
+ return(NULL);
+}
- if(pid == 0) {
- FILE *pp;
- _alpm_log(PM_LOG_DEBUG, _("chrooting in %s"), root);
- if(chroot(root) != 0) {
- _alpm_log(PM_LOG_ERROR, _("could not change the root directory (%s)"), strerror(errno));
- return(1);
- }
- if(chdir("/") != 0) {
- _alpm_log(PM_LOG_ERROR, _("could not change directory to / (%s)"), strerror(errno));
- return(1);
- }
- umask(0022);
- _alpm_log(PM_LOG_DEBUG, _("executing \"%s\""), cmdline);
- pp = popen(cmdline, "r");
- if(!pp) {
- _alpm_log(PM_LOG_ERROR, _("call to popen failed (%s)"), strerror(errno));
- retval = 1;
- goto cleanup;
- }
- while(!feof(pp)) {
- char line[1024];
- if(fgets(line, 1024, pp) == NULL)
- break;
- /*TODO clean this code up, remove weird SCRIPTLET_START/DONE,
- * (void*)atol call, etc. */
- /* "START <event desc>" */
- if((strlen(line) > strlen(SCRIPTLET_START))
- && !strncmp(line, SCRIPTLET_START, strlen(SCRIPTLET_START))) {
- EVENT(trans, PM_TRANS_EVT_SCRIPTLET_START,
- _alpm_strtrim(line + strlen(SCRIPTLET_START)), NULL);
- /* "DONE <ret code>" */
- } else if((strlen(line) > strlen(SCRIPTLET_DONE))
- && !strncmp(line, SCRIPTLET_DONE, strlen(SCRIPTLET_DONE))) {
- EVENT(trans, PM_TRANS_EVT_SCRIPTLET_DONE,
- (void*)atol(_alpm_strtrim(line + strlen(SCRIPTLET_DONE))),
- NULL);
- } else {
- _alpm_strtrim(line);
- /* log our script output */
- alpm_logaction(line);
- EVENT(trans, PM_TRANS_EVT_SCRIPTLET_INFO, line, NULL);
+/** Check the alpm cachedirs for existance and find a writable one.
+ * If no valid cache directory can be found, use /tmp.
+ * @return pointer to a writable cache directory.
+ */
+const char *_alpm_filecache_setup(void)
+{
+ struct stat buf;
+ alpm_list_t *i, *tmp;
+ char *cachedir;
+
+ /* Loop through the cache dirs until we find a writeable dir */
+ for(i = alpm_option_get_cachedirs(); i; i = alpm_list_next(i)) {
+ cachedir = alpm_list_getdata(i);
+ if(stat(cachedir, &buf) != 0) {
+ /* cache directory does not exist.... try creating it */
+ _alpm_log(PM_LOG_WARNING, _("no %s cache exists, creating...\n"),
+ cachedir);
+ alpm_logaction("warning: no %s cache exists, creating...\n",
+ cachedir);
+ if(_alpm_makepath(cachedir) == 0) {
+ _alpm_log(PM_LOG_DEBUG, "using cachedir: %s\n", cachedir);
+ return(cachedir);
}
- }
- pclose(pp);
- exit(0);
- } else {
- if(waitpid(pid, 0, 0) == -1) {
- _alpm_log(PM_LOG_ERROR, _("call to waitpid failed (%s)"),
- strerror(errno));
- retval = 1;
- goto cleanup;
+ } else if(S_ISDIR(buf.st_mode) && (buf.st_mode & S_IWUSR)) {
+ _alpm_log(PM_LOG_DEBUG, "using cachedir: %s\n", cachedir);
+ return(cachedir);
}
}
-cleanup:
- if(strlen(tmpdir) && _alpm_rmrf(tmpdir)) {
- _alpm_log(PM_LOG_WARNING, _("could not remove tmpdir %s"), tmpdir);
- }
- if(strlen(cwd)) {
- chdir(cwd);
- }
-
- return(retval);
+ /* we didn't find a valid cache directory. use /tmp. */
+ i = alpm_option_get_cachedirs();
+ tmp = alpm_list_add(NULL, strdup("/tmp/"));
+ FREELIST(i);
+ alpm_option_set_cachedirs(tmp);
+ _alpm_log(PM_LOG_DEBUG, "using cachedir: %s", "/tmp/\n");
+ _alpm_log(PM_LOG_WARNING, _("couldn't create package cache, using /tmp instead\n"));
+ alpm_logaction("warning: couldn't create package cache, using /tmp instead\n");
+ return(alpm_list_getdata(tmp));
}
-#ifndef __sun__
-static long long get_freespace()
+/** lstat wrapper that treats /path/dirsymlink/ the same as /path/dirsymlink.
+ * Linux lstat follows POSIX semantics and still performs a dereference on
+ * the first, and for uses of lstat in libalpm this is not what we want.
+ * @param path path to file to lstat
+ * @param buf structure to fill with stat information
+ * @return the return code from lstat
+ */
+int _alpm_lstat(const char *path, struct stat *buf)
{
- struct mntent *mnt;
- const char *table = MOUNTED;
- FILE *fp;
- long long ret=0;
-
- if((fp = setmntent(table, "r")) == NULL) {
- _alpm_log(PM_LOG_ERROR, _("cannot read disk space information from %s: %s"),
- table, strerror(errno));
- return(-1);
- }
-
- while ((mnt = getmntent(fp)))
- {
- struct statvfs64 buf;
+ int ret;
+ char *newpath = strdup(path);
+ int len = strlen(newpath);
- statvfs64(mnt->mnt_dir, &buf);
- ret += buf.f_bavail * buf.f_bsize;
+ /* strip the trailing slash if one exists */
+ if(len != 0 && newpath[len - 1] == '/') {
+ newpath[len - 1] = '\0';
}
- endmntent(fp);
+ ret = lstat(newpath, buf);
+ FREE(newpath);
return(ret);
}
-int _alpm_check_freespace(pmtrans_t *trans, alpm_list_t **data)
+/** Get the md5 sum of file.
+ * @param filename name of the file
+ * @return the checksum on success, NULL on error
+ * @addtogroup alpm_misc
+ */
+char SYMEXPORT *alpm_get_md5sum(const char *filename)
{
- alpm_list_t *i;
- long long pkgsize=0, freespace;
+ unsigned char output[16];
+ char *md5sum;
+ int ret, i;
ALPM_LOG_FUNC;
- for(i = trans->packages; i; i = i->next) {
- if(trans->type == PM_TRANS_TYPE_SYNC)
- {
- pmsyncpkg_t *sync = i->data;
- if(sync->type != PM_SYNC_TYPE_REPLACE) {
- pmpkg_t *pkg = sync->pkg;
- pkgsize += alpm_pkg_get_isize(pkg);
- }
- }
- else
- {
- pmpkg_t *pkg = i->data;
- pkgsize += alpm_pkg_get_size(pkg);
- }
- }
- freespace = get_freespace();
- _alpm_log(PM_LOG_DEBUG, _("check_freespace: total pkg size: %lld, disk space: %lld"), pkgsize, freespace);
- if(pkgsize > freespace) {
- if(data) {
- long long *ptr;
- if((ptr = (long long*)malloc(sizeof(long long)))==NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(long long));
- pm_errno = PM_ERR_MEMORY;
- return(-1);
- }
- *ptr = pkgsize;
- *data = alpm_list_add(*data, ptr);
- if((ptr = (long long*)malloc(sizeof(long long)))==NULL) {
- _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(long long));
- FREELIST(*data);
- pm_errno = PM_ERR_MEMORY;
- return(-1);
- }
- *ptr = freespace;
- *data = alpm_list_add(*data, ptr);
+ ASSERT(filename != NULL, return(NULL));
+
+ /* allocate 32 chars plus 1 for null */
+ md5sum = calloc(33, sizeof(char));
+ ret = md5_file(filename, output);
+
+ if (ret > 0) {
+ if (ret == 1) {
+ _alpm_log(PM_LOG_ERROR, _("md5: %s can't be opened\n"), filename);
+ } else if (ret == 2) {
+ _alpm_log(PM_LOG_ERROR, _("md5: %s can't be read\n"), filename);
}
- pm_errno = PM_ERR_DISK_FULL;
- return(-1);
- }
- else {
- return(0);
+
+ return(NULL);
}
-}
-#endif
-/* convert a time_t to a string - buffer MUST be large enough for
- * YYYYMMDDHHMMSS - 15 chars */
-void _alpm_time2string(time_t t, char *buffer)
-{
- if(buffer) {
- struct tm *lt;
- lt = localtime(&t);
- sprintf(buffer, "%4d%02d%02d%02d%02d%02d",
- lt->tm_year+1900, lt->tm_mon+1, lt->tm_mday,
- lt->tm_hour, lt->tm_min, lt->tm_sec);
- buffer[14] = '\0';
+ /* Convert the result to something readable */
+ for (i = 0; i < 16; i++) {
+ /* sprintf is acceptable here because we know our output */
+ sprintf(md5sum +(i * 2), "%02x", output[i]);
}
-}
+ md5sum[32] = '\0';
-/* Helper function for comparing strings using the
- * alpm "compare func" signature */
-int _alpm_str_cmp(const void *s1, const void *s2)
-{
- return(strcmp(s1, s2));
+ _alpm_log(PM_LOG_DEBUG, "md5(%s) = %s\n", filename, md5sum);
+ return(md5sum);
}
-
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index 9f028e8a..89ac3204 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -1,12 +1,12 @@
/*
* util.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -19,71 +19,66 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_UTIL_H
#define _ALPM_UTIL_H
-#include <stdio.h>
-#if defined(__OpenBSD__)
-#include "/usr/local/include/archive.h"
-#include "/usr/local/include/archive_entry.h"
-#else
-#include <archive.h>
-#include <archive_entry.h>
-#endif
-
-#define FREE(p) do { if (p) { free(p); p = NULL; } } while(0)
-
-#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)
-
-#define STRNCPY(s1, s2, len) do { \
- strncpy(s1, s2, (len)-1); \
- s1[(len)-1] = 0; \
-} while(0)
+#include "config.h"
-#define ARCHIVE_EXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_TIME
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <time.h>
+#include <sys/stat.h> /* struct stat */
#ifdef ENABLE_NLS
+#include <libintl.h> /* here so it doesn't need to be included elsewhere */
+/* define _() as shortcut for gettext() */
#define _(str) dgettext ("libalpm", str)
#else
#define _(s) s
#endif
-/*TODO wtf? why is this done like this? */
-#define SCRIPTLET_START "START "
-#define SCRIPTLET_DONE "DONE "
+#define ALLOC_FAIL(s) do { _alpm_log(PM_LOG_ERROR, _("alloc failure: could not allocate %zd bytes\n"), s); } while(0)
+
+#define MALLOC(p, s, action) do { p = calloc(1, s); if(p == NULL) { ALLOC_FAIL(s); action; } } while(0)
+#define CALLOC(p, l, s, action) do { p = calloc(l, s); if(p == NULL) { ALLOC_FAIL(s); action; } } while(0)
+#define STRDUP(r, s, action) do { r = strdup(s); if(r == NULL) { ALLOC_FAIL(strlen(s)); action; } } while(0)
+
+#define FREE(p) do { if(p) { free(p); p = NULL; } } while(0)
+
+#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)
int _alpm_makepath(const char *path);
int _alpm_copyfile(const char *src, const char *dest);
-char *_alpm_strtoupper(char *str);
char *_alpm_strtrim(char *str);
-int _alpm_lckmk(const char *file);
-int _alpm_lckrm(const char *file);
+char *_alpm_strreplace(const char *str, const char *needle, const char *replace);
+int _alpm_lckmk();
+int _alpm_lckrm();
int _alpm_unpack(const char *archive, const char *prefix, const char *fn);
int _alpm_rmrf(const char *path);
-int _alpm_logaction(unsigned short usesyslog, FILE *f, const char *str);
+int _alpm_logaction(unsigned short usesyslog, FILE *f, const char *fmt, va_list args);
int _alpm_ldconfig(const char *root);
-#ifdef _ALPM_TRANS_H
-int _alpm_runscriptlet(const char *root, const char *installfn,
- const char *script, const char *ver,
- const char *oldver, pmtrans_t *trans);
-#ifndef __sun__
-int _alpm_check_freespace(pmtrans_t *trans, alpm_list_t **data);
-#endif
-#endif
-void _alpm_time2string(time_t t, char *buffer);
int _alpm_str_cmp(const void *s1, const void *s2);
+char *_alpm_filecache_find(const char *filename);
+const char *_alpm_filecache_setup(void);
+int _alpm_lstat(const char *path, struct stat *buf);
-#ifdef __sun__
-char* strsep(char** str, const char* delims);
-char* mkdtemp(char *template);
+#ifndef HAVE_STRVERSCMP
+int strverscmp(const char *, const char *);
+#endif
+#ifndef HAVE_STRSEP
+char *strsep(char **, const char *);
#endif
/* check exported library symbols with: nm -C -D <lib> */
#define SYMEXPORT __attribute__((visibility("default")))
-#define SYMHIDDEN __attribute__((visibility("hidden")))
+#define SYMHIDDEN __attribute__((visibility("internal")))
+
+/* max percent of package size to download deltas */
+#define MAX_DELTA_RATIO 0.7
#endif /* _ALPM_UTIL_H */
diff --git a/lib/libalpm/versioncmp.c b/lib/libalpm/versioncmp.c
deleted file mode 100644
index 7e22ec9c..00000000
--- a/lib/libalpm/versioncmp.c
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * versioncmp.c
- *
- * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
- * Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
- * Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <libintl.h>
-
-/* libalpm */
-#include "versioncmp.h"
-#include "alpm_list.h"
-#include "alpm.h"
-#include "log.h"
-#include "util.h"
-
-#ifndef HAVE_STRVERSCMP
-/* GNU's strverscmp() function, taken from glibc 2.3.2 sources
- */
-
-/* Compare strings while treating digits characters numerically.
- Copyright (C) 1997, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* states: S_N: normal, S_I: comparing integral part, S_F: comparing
- fractionnal parts, S_Z: idem but with leading Zeroes only */
-#define S_N 0x0
-#define S_I 0x4
-#define S_F 0x8
-#define S_Z 0xC
-
-/* result_type: CMP: return diff; LEN: compare using len_diff/diff */
-#define CMP 2
-#define LEN 3
-
-/* Compare S1 and S2 as strings holding indices/version numbers,
- returning less than, equal to or greater than zero if S1 is less than,
- equal to or greater than S2 (for more info, see the texinfo doc).
-*/
-
-static int strverscmp (s1, s2)
- const char *s1;
- const char *s2;
-{
- const unsigned char *p1 = (const unsigned char *) s1;
- const unsigned char *p2 = (const unsigned char *) s2;
- unsigned char c1, c2;
- int state;
- int diff;
-
- /* Symbol(s) 0 [1-9] others (padding)
- Transition (10) 0 (01) d (00) x (11) - */
- static const unsigned int next_state[] =
- {
- /* state x d 0 - */
- /* S_N */ S_N, S_I, S_Z, S_N,
- /* S_I */ S_N, S_I, S_I, S_I,
- /* S_F */ S_N, S_F, S_F, S_F,
- /* S_Z */ S_N, S_F, S_Z, S_Z
- };
-
- static const int result_type[] =
- {
- /* state x/x x/d x/0 x/- d/x d/d d/0 d/-
- 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */
-
- /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
- CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
- /* S_I */ CMP, -1, -1, CMP, +1, LEN, LEN, CMP,
- +1, LEN, LEN, CMP, CMP, CMP, CMP, CMP,
- /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
- CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
- /* S_Z */ CMP, +1, +1, CMP, -1, CMP, CMP, CMP,
- -1, CMP, CMP, CMP
- };
-
- if (p1 == p2)
- return 0;
-
- c1 = *p1++;
- c2 = *p2++;
- /* Hint: '0' is a digit too. */
- state = S_N | ((c1 == '0') + (isdigit (c1) != 0));
-
- while ((diff = c1 - c2) == 0 && c1 != '\0')
- {
- state = next_state[state];
- c1 = *p1++;
- c2 = *p2++;
- state |= (c1 == '0') + (isdigit (c1) != 0);
- }
-
- state = result_type[state << 2 | (((c2 == '0') + (isdigit (c2) != 0)))];
-
- switch (state)
- {
- case CMP:
- return diff;
-
- case LEN:
- while (isdigit (*p1++))
- if (!isdigit (*p2++))
- return 1;
-
- return isdigit (*p2) ? -1 : diff;
-
- default:
- return state;
- }
-}
-
-#endif
-
-/* this function was taken from rpm 4.0.4 and rewritten */
-int _alpm_versioncmp(const char *a, const char *b)
-{
- char str1[64], str2[64];
- char *ptr1, *ptr2;
- char *one, *two;
- char *rel1 = NULL, *rel2 = NULL;
- char oldch1, oldch2;
- int is1num, is2num;
- int rc;
-
- ALPM_LOG_FUNC;
-
- if(!strcmp(a,b)) {
- return(0);
- }
-
- strncpy(str1, a, 64);
- str1[63] = 0;
- strncpy(str2, b, 64);
- str2[63] = 0;
-
- /* lose the release number */
- for(one = str1; *one && *one != '-'; one++);
- if(one) {
- *one = '\0';
- rel1 = ++one;
- }
- for(two = str2; *two && *two != '-'; two++);
- if(two) {
- *two = '\0';
- rel2 = ++two;
- }
-
- one = str1;
- two = str2;
-
- while(*one || *two) {
- while(*one && !isalnum((int)*one)) one++;
- while(*two && !isalnum((int)*two)) two++;
-
- ptr1 = one;
- ptr2 = two;
-
- /* find the next segment for each string */
- if(isdigit((int)*ptr1)) {
- is1num = 1;
- while(*ptr1 && isdigit((int)*ptr1)) ptr1++;
- } else {
- is1num = 0;
- while(*ptr1 && isalpha((int)*ptr1)) ptr1++;
- }
- if(isdigit((int)*ptr2)) {
- is2num = 1;
- while(*ptr2 && isdigit((int)*ptr2)) ptr2++;
- } else {
- is2num = 0;
- while(*ptr2 && isalpha((int)*ptr2)) ptr2++;
- }
-
- oldch1 = *ptr1;
- *ptr1 = '\0';
- oldch2 = *ptr2;
- *ptr2 = '\0';
-
- /* see if we ran out of segments on one string */
- if(one == ptr1 && two != ptr2) {
- return(is2num ? -1 : 1);
- }
- if(one != ptr1 && two == ptr2) {
- return(is1num ? 1 : -1);
- }
-
- /* see if we have a type mismatch (ie, one is alpha and one is digits) */
- if(is1num && !is2num) return(1);
- if(!is1num && is2num) return(-1);
-
- if(is1num) while(*one == '0') one++;
- if(is2num) while(*two == '0') two++;
-
- rc = strverscmp(one, two);
- if(rc) return(rc);
-
- *ptr1 = oldch1;
- *ptr2 = oldch2;
- one = ptr1;
- two = ptr2;
- }
-
- if((!*one) && (!*two)) {
- /* compare release numbers */
- if(rel1 && rel2 && strlen(rel1) && strlen(rel2)) return(_alpm_versioncmp(rel1, rel2));
- return(0);
- }
-
- return(*one ? 1 : -1);
-}
-
-int SYMEXPORT alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
-{
- int equal = 0;
-
- ALPM_LOG_FUNC;
-
- if(strcmp(pkg->name, dep->name) == 0
- || alpm_list_find_str(alpm_pkg_get_provides(pkg), dep->name)) {
- if(dep->mod == PM_DEP_MOD_ANY) {
- equal = 1;
- } else {
- int cmp = _alpm_versioncmp(alpm_pkg_get_version(pkg), dep->version);
- switch(dep->mod) {
- case PM_DEP_MOD_EQ: equal = (cmp == 0); break;
- case PM_DEP_MOD_GE: equal = (cmp >= 0); break;
- case PM_DEP_MOD_LE: equal = (cmp <= 0); break;
- default: equal = 1; break;
- }
- }
-
- char *mod = "~=";
- switch(dep->mod) {
- case PM_DEP_MOD_EQ: mod = "=="; break;
- case PM_DEP_MOD_GE: mod = ">="; break;
- case PM_DEP_MOD_LE: mod = "<="; break;
- default: break;
- }
-
- if(strlen(dep->version) > 0) {
- _alpm_log(PM_LOG_DEBUG, _("depcmp: %s-%s %s %s-%s => %s"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg),
- mod, dep->name, dep->version,
- (equal ? "match" : "no match"));
- } else {
- _alpm_log(PM_LOG_DEBUG, _("depcmp: %s-%s %s %s => %s"),
- alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg),
- mod, dep->name,
- (equal ? "match" : "no match"));
- }
- }
-
- return equal;
-}
-
-
-/* vim: set ts=2 sw=2 noet: */