summaryrefslogtreecommitdiff
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-05-11 12:00:18 -0500
committerAllan McRae <allan@archlinux.org>2010-10-13 23:53:18 +1000
commitd1126db1281596ba8ea960bfa963e86731d28b5e (patch)
tree4201eb0da47075c27b65e38eea4f4046a25861f4 /lib/libalpm/cache.c
parent49176461a6b476e673e232075c95f07963750f74 (diff)
downloadpacman-d1126db1281596ba8ea960bfa963e86731d28b5e.tar.xz
Allow local and sync db to be treated separately
Implement this seemingly simple change in package.h: typedef enum _pmpkgfrom_t { - PKG_FROM_CACHE = 1, - PKG_FROM_FILE + PKG_FROM_FILE = 1, + PKG_FROM_LOCALDB, + PKG_FROM_SYNCDB } pmpkgfrom_t; which requires flushing out several assumptions from around the codebase with regards to usage of the PKG_FROM_CACHE value. Make some changes where required to allow the switch, and now the correct value should be set (via a crude hack) depending on whether a package was loaded as an entry in a local db or a sync db. This patch underwent some big rebasing from Allan and Dan. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r--lib/libalpm/cache.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
index a9a7edd9..5126f3b1 100644
--- a/lib/libalpm/cache.c
+++ b/lib/libalpm/cache.c
@@ -120,9 +120,6 @@ int _alpm_db_add_pkgincache(pmdb_t *db, pmpkg_t *pkg)
_alpm_pkg_free(newpkg);
return(-1);
}
- newpkg->origin = PKG_FROM_CACHE;
- newpkg->origin_data.db = db;
- newpkg->infolevel = INFRQ_BASE;
_alpm_log(PM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n",
alpm_pkg_get_name(newpkg), db->treename);