summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-29 00:34:06 +0100
committerDan McGee <dan@archlinux.org>2011-01-29 00:34:06 +0100
commit9b876fff09f2af10cba6824bec03d8fe3e167b5b (patch)
treed7d62c980d3c9a31274714c9b15976dd15c1330c /lib
parent7f93f0620c44a811aa7989f6d2ed1bf4ba275d62 (diff)
downloadpacman-9b876fff09f2af10cba6824bec03d8fe3e167b5b.tar.gz
pacman-9b876fff09f2af10cba6824bec03d8fe3e167b5b.tar.xz
Ignore known but unused package descfile fields
We explicitly place 'pkgbase' (and used to place 'force') fields inside PKGINFO files, so ignore them silently instead of printing an error for them. Also make the error message for unknown keys actually contain the key. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/be_package.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index c272bd47..fa757214 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -180,6 +180,8 @@ static int parse_descfile(struct archive *a, pmpkg_t *newpkg)
if(strcmp(key, "pkgname") == 0) {
STRDUP(newpkg->name, ptr, RET_ERR(PM_ERR_MEMORY, -1));
newpkg->name_hash = _alpm_hash_sdbm(newpkg->name);
+ } else if(strcmp(key, "pkgbase") == 0) {
+ /* not used atm */
} else if(strcmp(key, "pkgver") == 0) {
STRDUP(newpkg->version, ptr, RET_ERR(PM_ERR_MEMORY, -1));
} else if(strcmp(key, "pkgdesc") == 0) {
@@ -212,11 +214,13 @@ static int parse_descfile(struct archive *a, pmpkg_t *newpkg)
newpkg->provides = alpm_list_add(newpkg->provides, strdup(ptr));
} else if(strcmp(key, "backup") == 0) {
newpkg->backup = alpm_list_add(newpkg->backup, strdup(ptr));
+ } else if(strcmp(key, "force") == 0) {
+ /* deprecated, skip it */
} else if(strcmp(key, "makepkgopt") == 0) {
/* not used atm */
} else {
- _alpm_log(PM_LOG_DEBUG, "%s: syntax error in description file line %d\n",
- newpkg->name ? newpkg->name : "error", linenum);
+ _alpm_log(PM_LOG_DEBUG, "%s: unknown key '%s' in description file line %d\n",
+ newpkg->name ? newpkg->name : "error", key, linenum);
}
}
line[0] = '\0';