mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
be_package: read force entry and convert to epoch
We still need to read force entry in epoch-aware pacman, so that when we install an old force package, EPOCH gets written to the local db. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
f5059038f2
commit
7237903c66
@ -184,6 +184,11 @@ static int parse_descfile(struct archive *a, pmpkg_t *newpkg)
|
|||||||
STRDUP(newpkg->version, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
STRDUP(newpkg->version, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
} else if(strcmp(key, "pkgdesc") == 0) {
|
} else if(strcmp(key, "pkgdesc") == 0) {
|
||||||
STRDUP(newpkg->desc, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
STRDUP(newpkg->desc, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
|
} else if(strcmp(key, "force") == 0) {
|
||||||
|
/* For backward compatibility, like in sync_db_read */
|
||||||
|
if(!newpkg->epoch) {
|
||||||
|
newpkg->epoch = 1;
|
||||||
|
}
|
||||||
} else if(strcmp(key, "epoch") == 0) {
|
} else if(strcmp(key, "epoch") == 0) {
|
||||||
newpkg->epoch = atoi(ptr);
|
newpkg->epoch = atoi(ptr);
|
||||||
} else if(strcmp(key, "group") == 0) {
|
} else if(strcmp(key, "group") == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user