summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-03 19:13:22 +0200
committerDan McGee <dan@archlinux.org>2011-06-03 19:13:22 +0200
commit7f98460e37bc032b58ca7c82e70c357aa39370f8 (patch)
tree386cf7e9cd2045205458d38eeac31a43b98a987b /lib/libalpm/package.c
parentc47d25d74be9ce1fbbfb8577687d9f37ba38d98b (diff)
downloadpacman-7f98460e37bc032b58ca7c82e70c357aa39370f8.tar.gz
pacman-7f98460e37bc032b58ca7c82e70c357aa39370f8.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c5
1 files changed, 3 insertions, 2 deletions
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;
}