Don't include version in dep string if mod == ANY

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-03-25 14:51:31 -05:00
parent e214b260ef
commit 7f480ccc0d
1 changed files with 3 additions and 2 deletions

View File

@ -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 = "";