From 9f527d2de453b542293e24d85ee894fa6452259a Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Mon, 22 Dec 2014 15:11:38 +0100 Subject: libalpm: Parse and write PKGBASEs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Allan McRae --- lib/libalpm/be_sync.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libalpm/be_sync.c') diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 52459483..6e89ad93 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -614,6 +614,8 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive, if(_alpm_validate_filename(db, pkg->name, pkg->filename) < 0) { return -1; } + } else if(strcmp(line, "%BASE%") == 0) { + READ_AND_STORE(pkg->base); } else if(strcmp(line, "%DESC%") == 0) { READ_AND_STORE(pkg->desc); } else if(strcmp(line, "%GROUPS%") == 0) { -- cgit v1.2.3-24-g4f1b