summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_files.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-01 07:30:47 +0100
committerAaron Griffin <aaron@archlinux.org>2006-11-01 07:30:47 +0100
commit3bf918dc4ea14f1adb93c32aaa54118164b33dd1 (patch)
tree4054a42c20084109378e4512ea46e616096ab030 /lib/libalpm/be_files.c
parent48ee3c4434efad0796521384661dc405cdd3db66 (diff)
downloadpacman-3bf918dc4ea14f1adb93c32aaa54118164b33dd1.tar.gz
pacman-3bf918dc4ea14f1adb93c32aaa54118164b33dd1.tar.xz
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
Diffstat (limited to 'lib/libalpm/be_files.c')
-rw-r--r--lib/libalpm/be_files.c7
1 files changed, 7 insertions, 0 deletions
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 */