mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-02 10:21:49 -05:00
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>
This commit is contained in:
parent
7f93f0620c
commit
9b876fff09
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user