summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-25 20:51:31 +0100
committerDan McGee <dan@archlinux.org>2011-03-25 21:40:12 +0100
commit7f480ccc0de9438ef499685088a49b3c5964606b (patch)
tree3e22bd022b26b4d9c9946d082867c34ab0daa224 /lib
parente214b260efcba299611688bdbbc02b7391632d43 (diff)
downloadpacman-7f480ccc0de9438ef499685088a49b3c5964606b.tar.gz
pacman-7f480ccc0de9438ef499685088a49b3c5964606b.tar.xz
Don't include version in dep string if mod == ANY
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/deps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index ea579cda..4e6d98d0 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -825,7 +825,8 @@ const char SYMEXPORT *alpm_dep_get_version(const pmdepend_t *dep)
*/
char SYMEXPORT *alpm_dep_compute_string(const pmdepend_t *dep)
{
- char *name, *opr, *ver, *str = NULL;
+ const char *name, *opr, *ver;
+ char *str;
size_t len;
ALPM_LOG_FUNC;
@@ -863,7 +864,7 @@ char SYMEXPORT *alpm_dep_compute_string(const pmdepend_t *dep)
break;
}
- if(dep->version) {
+ if(dep->mod != PM_DEP_MOD_ANY && dep->version) {
ver = dep->version;
} else {
ver = "";