Do the right thing if we have a version but no constraint.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 24 Nov 2009 06:35:38 +0000 (06:35 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 24 Nov 2009 06:35:38 +0000 (06:35 +0000)
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

libopkg/pkg_depends.c

index 813ec6ad151f5bc0e2a8ec4296d11fd3d7a51c80..998d08544300fcc69117d389587c6e8a77368762 100644 (file)
@@ -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);