diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-20 17:08:54 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-20 17:08:54 +0100 |
commit | 8d4984cc648f72aad78833216400a23e9a25d708 (patch) | |
tree | 4b92dc60e22333eb3ce0621248382371f43d88a7 /lib/libalpm/be_sync.c | |
parent | 565c931e2c684d4460ff65cbec9b097ee1d8f94d (diff) | |
download | pacman-8d4984cc648f72aad78833216400a23e9a25d708.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>
Diffstat (limited to 'lib/libalpm/be_sync.c')
-rw-r--r-- | lib/libalpm/be_sync.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |