summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-12-22 15:11:38 +0100
committerAllan McRae <allan@archlinux.org>2014-12-24 02:19:30 +0100
commit9f527d2de453b542293e24d85ee894fa6452259a (patch)
tree0718d9cfc13cf3b81d02b6b5e8e94df49aae3f8c /lib/libalpm/package.c
parentfda599df3773955aa2f95a842649902e41f4e0bc (diff)
downloadpacman-9f527d2de453b542293e24d85ee894fa6452259a.tar.gz
pacman-9f527d2de453b542293e24d85ee894fa6452259a.tar.xz
libalpm: Parse and write PKGBASEs
This commit adds support to libalpm to parse the pkgbase present in packages .PKGINFO files, writing the PKGBASE to the %BASE% section of the local DBs desc files and for parsing it again when loading the local DB Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index e2997f69..3be5e74e 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -566,6 +566,7 @@ int _alpm_pkg_dup(alpm_pkg_t *pkg, alpm_pkg_t **new_ptr)
newpkg->name_hash = pkg->name_hash;
STRDUP(newpkg->filename, pkg->filename, goto cleanup);
+ STRDUP(newpkg->base, pkg->base, goto cleanup);
STRDUP(newpkg->name, pkg->name, goto cleanup);
STRDUP(newpkg->version, pkg->version, goto cleanup);
STRDUP(newpkg->desc, pkg->desc, goto cleanup);
@@ -641,6 +642,7 @@ void _alpm_pkg_free(alpm_pkg_t *pkg)
}
FREE(pkg->filename);
+ FREE(pkg->base);
FREE(pkg->name);
FREE(pkg->version);
FREE(pkg->desc);