summaryrefslogtreecommitdiff
path: root/package/opkg/patches/060-add-find-command.patch
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-15 20:53:51 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-15 20:53:51 +0000
commit4474c34f386da98a74b68795025985f5de5cc999 (patch)
treeb27c0d101af52a7c55a8457a2434f2995c8dbea6 /package/opkg/patches/060-add-find-command.patch
parentd6a1959e5168377d5358d257ebc2afe6abdf7eb8 (diff)
opkg: fix find logic introduced by previous commit
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34203 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/opkg/patches/060-add-find-command.patch')
-rw-r--r--package/opkg/patches/060-add-find-command.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/package/opkg/patches/060-add-find-command.patch b/package/opkg/patches/060-add-find-command.patch
index 219df10187..17625349f8 100644
--- a/package/opkg/patches/060-add-find-command.patch
+++ b/package/opkg/patches/060-add-find-command.patch
@@ -9,17 +9,17 @@
{
int i;
pkg_vec_t *available;
-@@ -612,6 +612,9 @@ opkg_list_cmd(int argc, char **argv)
+@@ -610,7 +610,8 @@ opkg_list_cmd(int argc, char **argv)
+ for (i=0; i < available->len; i++) {
+ pkg = available->pkgs[i];
/* if we have package name or pattern and pkg does not match, then skip it */
- if (pkg_name && fnmatch(pkg_name, pkg->name, conf->nocase))
+- if (pkg_name && fnmatch(pkg_name, pkg->name, conf->nocase))
++ if (pkg_name && fnmatch(pkg_name, pkg->name, conf->nocase) &&
++ (!use_desc || !pkg->description || fnmatch(pkg_name, pkg->description, conf->nocase)))
continue;
-+ if (pkg_name && use_desc && pkg->description &&
-+ fnmatch(pkg_name, pkg->description, conf->nocase))
-+ continue;
print_pkg(pkg);
}
- pkg_vec_free(available);
-@@ -619,6 +622,18 @@ opkg_list_cmd(int argc, char **argv)
+@@ -619,6 +620,18 @@ opkg_list_cmd(int argc, char **argv)
return 0;
}
@@ -38,7 +38,7 @@
static int
opkg_list_installed_cmd(int argc, char **argv)
-@@ -1262,6 +1277,7 @@ static opkg_cmd_t cmds[] = {
+@@ -1262,6 +1275,7 @@ static opkg_cmd_t cmds[] = {
{"configure", 0, (opkg_cmd_fun_t)opkg_configure_cmd, PFM_DESCRIPTION|PFM_SOURCE},
{"files", 1, (opkg_cmd_fun_t)opkg_files_cmd, PFM_DESCRIPTION|PFM_SOURCE},
{"search", 1, (opkg_cmd_fun_t)opkg_search_cmd, PFM_DESCRIPTION|PFM_SOURCE},