mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
set package origin when adding to db cache
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
43413894d4
commit
0c9f4329f8
@ -574,6 +574,13 @@ int _alpm_db_add_pkgincache(alpm_db_t *db, alpm_pkg_t *pkg)
|
||||
|
||||
_alpm_log(db->handle, ALPM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n",
|
||||
newpkg->name, db->treename);
|
||||
if(newpkg->origin == ALPM_PKG_FROM_FILE) {
|
||||
free(newpkg->origin_data.file);
|
||||
}
|
||||
newpkg->origin = (db->status & DB_STATUS_LOCAL)
|
||||
? ALPM_PKG_FROM_LOCALDB
|
||||
: ALPM_PKG_FROM_SYNCDB;
|
||||
newpkg->origin_data.db = db;
|
||||
db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg);
|
||||
|
||||
free_groupcache(db);
|
||||
|
Loading…
Reference in New Issue
Block a user