Changeset 34203


Ignore:
Timestamp:
2012-11-15T21:53:51+01:00 (5 years ago)
Author:
jow
Message:

opkg: fix find logic introduced by previous commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/opkg/patches/060-add-find-command.patch

    r34202 r34203  
    1010      int i; 
    1111      pkg_vec_t *available; 
    12 @@ -612,6 +612,9 @@ opkg_list_cmd(int argc, char **argv) 
     12@@ -610,7 +610,8 @@ opkg_list_cmd(int argc, char **argv) 
     13      for (i=0; i < available->len; i++) { 
     14          pkg = available->pkgs[i]; 
    1315          /* if we have package name or pattern and pkg does not match, then skip it */ 
    14           if (pkg_name && fnmatch(pkg_name, pkg->name, conf->nocase)) 
     16-         if (pkg_name && fnmatch(pkg_name, pkg->name, conf->nocase)) 
     17+         if (pkg_name && fnmatch(pkg_name, pkg->name, conf->nocase) && 
     18+             (!use_desc || !pkg->description || fnmatch(pkg_name, pkg->description, conf->nocase))) 
    1519               continue; 
    16 +         if (pkg_name && use_desc && pkg->description && 
    17 +             fnmatch(pkg_name, pkg->description, conf->nocase)) 
    18 +              continue; 
    1920           print_pkg(pkg); 
    2021      } 
    21       pkg_vec_free(available); 
    22 @@ -619,6 +622,18 @@ opkg_list_cmd(int argc, char **argv) 
     22@@ -619,6 +620,18 @@ opkg_list_cmd(int argc, char **argv) 
    2323      return 0; 
    2424 } 
     
    3939 static int 
    4040 opkg_list_installed_cmd(int argc, char **argv) 
    41 @@ -1262,6 +1277,7 @@ static opkg_cmd_t cmds[] = { 
     41@@ -1262,6 +1275,7 @@ static opkg_cmd_t cmds[] = { 
    4242      {"configure", 0, (opkg_cmd_fun_t)opkg_configure_cmd, PFM_DESCRIPTION|PFM_SOURCE}, 
    4343      {"files", 1, (opkg_cmd_fun_t)opkg_files_cmd, PFM_DESCRIPTION|PFM_SOURCE}, 
Note: See TracChangeset for help on using the changeset viewer.