libalpm: print errors when unknown keys in database
This commit is contained in:
parent
18b65ec909
commit
4baeb8e40b
3 changed files with 14 additions and 1 deletions
|
@ -837,6 +837,12 @@ static int local_db_read(alpm_pkg_t *info, int inforeq)
|
|||
}
|
||||
}
|
||||
FREELIST(lines);
|
||||
} else {
|
||||
_alpm_log(db->handle, ALPM_LOG_ERROR, _("%s: unknown key '%s' in sync database\n"), info->name, line);
|
||||
alpm_list_t *lines = NULL;
|
||||
READ_AND_STORE_ALL(lines);
|
||||
FREELIST(lines);
|
||||
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
|
|
@ -251,8 +251,10 @@ static int parse_descfile(alpm_handle_t *handle, struct archive *a, alpm_pkg_t *
|
|||
return -1;
|
||||
}
|
||||
} else {
|
||||
const char *pkgname = newpkg->name ? newpkg->name : "error";
|
||||
_alpm_log(handle, ALPM_LOG_ERROR, _("%s: unknown key '%s' in package description\n"), pkgname, key);
|
||||
_alpm_log(handle, ALPM_LOG_DEBUG, "%s: unknown key '%s' in description file line %d\n",
|
||||
newpkg->name ? newpkg->name : "error", key, linenum);
|
||||
pkgname, key, linenum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -691,6 +691,11 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
|
|||
}
|
||||
}
|
||||
FREELIST(lines);
|
||||
} else {
|
||||
_alpm_log(db->handle, ALPM_LOG_ERROR, _("%s: unknown key '%s' in local database\n"), pkg->name, line);
|
||||
alpm_list_t *lines = NULL;
|
||||
READ_AND_STORE_ALL(lines);
|
||||
FREELIST(lines);
|
||||
}
|
||||
}
|
||||
if(ret != ARCHIVE_EOF) {
|
||||
|
|
Loading…
Add table
Reference in a new issue