From 3bf918dc4ea14f1adb93c32aaa54118164b33dd1 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 1 Nov 2006 06:30:47 +0000 Subject: Fixed pacman -U: * Accidental database read of a file-based package (whoops) * Proper fetching of url-based -U or -A Removed some newlines from _alpm_log calls, to make debug output more concise --- lib/libalpm/be_files.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/libalpm/be_files.c') diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index 6f9b1088..35a1e981 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -193,6 +193,13 @@ int _alpm_db_read(pmdb_t *db, unsigned int inforeq, pmpkg_t *info) 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); + return(-1); + } + + _alpm_log(PM_LOG_FUNCTION, _("loading package data for %s : level=%d"), info->name, 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 */ -- cgit v1.2.3-54-g00ecf