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:
authorBenedikt Morbach <benedikt.morbach@googlemail.com>2011-07-18 01:54:06 +0200
committerDan McGee <dan@archlinux.org>2012-03-08 17:26:46 -0600
commite85e77e6f9f0979a16d69cd93ee6ea35583e9bfb (patch)
tree9620ed6fb2efcd866dd1cff1b7e7cdfc1846e3ea /lib/libalpm/be_package.c
parent00f29cbc14ec24f1e432eadaf35742857285a01a (diff)
Hook new optdepend structures up
No new behaviour introduced, everything should work exactly as before. Dan: refactored to use the single alpm_depend_t structure. Signed-off-by: Benedikt Morbach <benedikt.morbach@googlemail.com> 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, 3 insertions, 2 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 40081954..c076f610 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -36,7 +36,7 @@
#include "log.h"
#include "handle.h"
#include "package.h"
-#include "deps.h" /* _alpm_splitdep */
+#include "deps.h"
struct package_changelog {
struct archive *archive;
@@ -214,7 +214,8 @@ static int parse_descfile(alpm_handle_t *handle, struct archive *a, alpm_pkg_t *
alpm_depend_t *dep = _alpm_splitdep(ptr);
newpkg->depends = alpm_list_add(newpkg->depends, dep);
} else if(strcmp(key, "optdepend") == 0) {
- newpkg->optdepends = alpm_list_add(newpkg->optdepends, strdup(ptr));
+ alpm_depend_t *optdep = _alpm_splitdep(ptr);
+ newpkg->optdepends = alpm_list_add(newpkg->optdepends, optdep);
} else if(strcmp(key, "conflict") == 0) {
alpm_depend_t *conflict = _alpm_splitdep(ptr);
newpkg->conflicts = alpm_list_add(newpkg->conflicts, conflict);