Archived
1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
archive/package/system/opkg/patches/090-suppress-blank-provides-field.patch
Felix Fietkau 76faf501a6 opkg: do not add blank "Provides:" fields to package metadata
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39039
2013-12-13 10:40:26 +00:00

12 lines
501 B
Diff

--- a/libopkg/pkg.c
+++ b/libopkg/pkg.c
@@ -731,7 +731,7 @@ pkg_formatted_field(FILE *fp, pkg_t *pkg
} else if (strcasecmp(field, "Priority") == 0) {
fprintf(fp, "Priority: %s\n", pkg->priority);
} else if (strcasecmp(field, "Provides") == 0) {
- if (pkg->provides_count) {
+ if (pkg->provides_count > 1) {
fprintf(fp, "Provides:");
for(i = 1; i < pkg->provides_count; i++) {
fprintf(fp, "%s %s", i == 1 ? "" : ",",