summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-24 01:35:38 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-24 01:35:38 (EST)
commit195ca08fef4a70f499cf6d5dc331820f45c54990 (patch)
tree9c84224ecfb1ade0b73a0b5b1b1b3a83f6da87b1
parent6e6742af3d1dbc27a84afb7c78e296afa976a39d (diff)
Do the right thing if we have a version but no constraint.
The package maintainer shouldn't do this, but it happens ocassionally. git-svn-id: http://opkg.googlecode.com/svn/trunk@362 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r--libopkg/pkg_depends.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
index 813ec6a..998d085 100644
--- a/libopkg/pkg_depends.c
+++ b/libopkg/pkg_depends.c
@@ -726,7 +726,7 @@ pkg_depend_str(pkg_t *pkg, int index)
len += strlen(dep->pkg->name);
- if (dep->constraint != NONE) {
+ if (dep->version) {
len += 2; /* space, left parenthesis */
len += 3; /* constraint string (<=, >=, etc), space */
len += strlen(dep->version);
@@ -745,7 +745,7 @@ pkg_depend_str(pkg_t *pkg, int index)
strncat(str, dep->pkg->name, len);
- if (dep->constraint != NONE) {
+ if (dep->version) {
strncat(str, " (", len);
strncat(str, constraint_to_str(dep->constraint), len);
strncat(str, dep->version, len);