From 7f98460e37bc032b58ca7c82e70c357aa39370f8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 3 Jun 2011 12:13:22 -0500 Subject: Add handle attribute to pmpkg_t struct Similar to what we just did for the database; this will make it easy to always know what handle a given package originated from. Signed-off-by: Dan McGee --- lib/libalpm/package.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/package.c') diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 205bc103..d19549d1 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -408,14 +408,15 @@ pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg) newpkg->deltas = alpm_list_copy_data(pkg->deltas, sizeof(pmdelta_t)); /* internal */ + newpkg->infolevel = pkg->infolevel; newpkg->origin = pkg->origin; - newpkg->ops = pkg->ops; if(newpkg->origin == PKG_FROM_FILE) { newpkg->origin_data.file = strdup(pkg->origin_data.file); } else { newpkg->origin_data.db = pkg->origin_data.db; } - newpkg->infolevel = pkg->infolevel; + newpkg->ops = pkg->ops; + newpkg->handle = handle; return newpkg; } -- cgit v1.2.3-24-g4f1b