[pacman-dev] [PATCH] Read 'force' entry from packages

Dan McGee dan at archlinux.org
Mon Oct 11 18:51:26 EDT 2010


We weren't reading this in from our packages, thus causing us not to write
it out to our local database. Adding this now will help ease the upgrade
path for epoch later and not require reinstallation of all force packages.

Signed-off-by: Dan McGee <dan at archlinux.org>
---

For maint, helps to address the problem Allan pointed out regarding upgrading
existing packages that used the force flag.

-Dan

 lib/libalpm/be_package.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 38cf357..ff266ae 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -75,6 +75,8 @@ static int parse_descfile(struct archive *a, pmpkg_t *newpkg)
 				STRDUP(newpkg->version, ptr, RET_ERR(PM_ERR_MEMORY, -1));
 			} else if(!strcmp(key, "pkgdesc")) {
 				STRDUP(newpkg->desc, ptr, RET_ERR(PM_ERR_MEMORY, -1));
+			} else if(!strcmp(key, "force")) {
+				newpkg->force = 1;
 			} else if(!strcmp(key, "group")) {
 				newpkg->groups = alpm_list_add(newpkg->groups, strdup(ptr));
 			} else if(!strcmp(key, "url")) {
-- 
1.7.3.1



More information about the pacman-dev mailing list