From 195ca08fef4a70f499cf6d5dc331820f45c54990 Mon Sep 17 00:00:00 2001 From: "graham.gower" Date: Tue, 24 Nov 2009 06:35:38 +0000 Subject: [PATCH] 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 --- libopkg/pkg_depends.c | 4 ++-- 1 file 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); -- 2.25.1