Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-16 13:15:11 -0500
committerDan McGee <dan@archlinux.org>2011-06-22 12:31:12 -0500
commit54ef162a1a9e27e362732d873f0739bc0a2cf1bf (patch)
treee4ec6ba0ab94965c754a40d52a680f9fd69c4e37 /lib/libalpm/be_package.c
parent886a31ef205923fd5b29012ee75932a2e2dec4bd (diff)
Convert backup list to new pmbackup_t type
This allows us to separate the name and hash elements in one place and not scatter different parsing code all over the place, including both the frontend and backend. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 94df0718..1807051d 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -200,7 +200,10 @@ static int parse_descfile(pmhandle_t *handle, struct archive *a, pmpkg_t *newpkg
} else if(strcmp(key, "provides") == 0) {
newpkg->provides = alpm_list_add(newpkg->provides, strdup(ptr));
} else if(strcmp(key, "backup") == 0) {
- newpkg->backup = alpm_list_add(newpkg->backup, strdup(ptr));
+ pmbackup_t *backup;
+ CALLOC(backup, 1, sizeof(pmbackup_t), return -1);
+ STRDUP(backup->name, ptr, return -1);
+ newpkg->backup = alpm_list_add(newpkg->backup, backup);
} else if(strcmp(key, "force") == 0) {
/* deprecated, skip it */
} else if(strcmp(key, "makepkgopt") == 0) {