summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Barker <paul@paulbarker.me.uk>2013-12-20 17:09:28 (EST)
committer Paul Barker <paul@paulbarker.me.uk>2014-03-18 08:35:07 (EDT)
commit0b6bd18b4547e09dbbc26a94b2e4ec13350e7762 (patch)
treef6fe29ce252f821a6f2c0904a8b7f52493317daa
parent7e54927e01a160c44670f44200ad6782b30dc2c4 (diff)
opkg-cl: Arguments are globs not regexps
This patch fixes issue 107. The arguments taken by opkg are treated as shell-style globbing patterns, not as regular expressions. Both the manual page and the output of 'opkg --help' are changed to describe things correctly. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-rw-r--r--man/opkg-cl.1.in21
-rw-r--r--src/opkg-cl.c26
2 files changed, 24 insertions, 23 deletions
diff --git a/man/opkg-cl.1.in b/man/opkg-cl.1.in
index 2bfb792..523a38d 100644
--- a/man/opkg-cl.1.in
+++ b/man/opkg-cl.1.in
@@ -26,8 +26,9 @@ Install \fIpackage(s)\fP
\fBconfigure <\fIpackage(s)\fP>\fR
Configure unpacked \fIpackage(s)\fP
.TP
-\fBremove <\fIpackages\fP|\fIregexp\fP>\fR
-Remove \fIpackage(s)\fP. \fIregexp\fP could be something like 'pkgname*' '*file*' or similar
+\fBremove <\fIpackages\fP|\fIglob\fP>\fR
+Remove \fIpackage(s)\fP. \fIglob\fP works like a shell globbing pattern and
+could be something like 'pkgname*' '*file*' or similar
.TP
\fBflag <\fIflag\fP> <\fIpackages\fP>\fR
Flag \fIpackage(s)\fP. Available flags (one per invocation):
@@ -58,13 +59,13 @@ List package configuration files which have been modified after installation
\fBfiles <\fIpackage\fP>\fR
List files belonging to \fIpackage\fP
.TP
-\fBsearch <\fIfile\fP|\fIregexp\fP>\fR
+\fBsearch <\fIfile\fP|\fIglob\fP>\fR
List package providing \fIfile\fP
.TP
-\fBinfo [\fIpackage\fP|\fIregexp\fP]\fR
+\fBinfo [\fIpackage\fP|\fIglob\fP]\fR
Display all info for selected packages
.TP
-\fBstatus [\fIpackage\fP|\fIregexp\fP]\fR
+\fBstatus [\fIpackage\fP|\fIglob\fP]\fR
Display all statuses for selected packages
.TP
\fBdownload <\fIpackage\fP>\fR
@@ -87,15 +88,15 @@ c l.
\fBprint-architecture\fR
List installable package architectures
.TP
-\fBwhatdepends [\fI\-A\fP] <\fIpackage(s)\fP|\fIregexp\fP>\fR
+\fBwhatdepends [\fI\-A\fP] <\fIpackage(s)\fP|\fIglob\fP>\fR
.TP
-\fBwhatdependsrec [\fI\-A\fP] <\fIpackage(s)\fP|\fIregexp\fP>\fR
+\fBwhatdependsrec [\fI\-A\fP] <\fIpackage(s)\fP|\fIglob\fP>\fR
.TP
-\fBwhatprovides [\fI\-A\fP] <\fIpackage(s)\fP|\fIregexp\fP>\fR
+\fBwhatprovides [\fI\-A\fP] <\fIpackage(s)\fP|\fIglob\fP>\fR
.TP
-\fBwhatconflicts [\fI\-A\fP] <\fIpackage(s)\fP|\fIregexp\fP>\fR
+\fBwhatconflicts [\fI\-A\fP] <\fIpackage(s)\fP|\fIglob\fP>\fR
.TP
-\fBwhatreplaces [\fI\-A\fP] <\fIpackage(s)\fP|\fIregexp\fP>\fR
+\fBwhatreplaces [\fI\-A\fP] <\fIpackage(s)\fP|\fIglob\fP>\fR
.SS OPTIONS
.TP
diff --git a/src/opkg-cl.c b/src/opkg-cl.c
index 0073847..621e376 100644
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
@@ -230,7 +230,7 @@ usage()
printf("\tupgrade Upgrade installed packages\n");
printf("\tinstall <pkgs> Install package(s)\n");
printf("\tconfigure <pkgs> Configure unpacked package(s)\n");
- printf("\tremove <pkgs|regexp> Remove package(s)\n");
+ printf("\tremove <pkgs|glob> Remove package(s)\n");
printf("\tflag <flag> <pkgs> Flag package(s)\n");
printf("\t <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation)\n");
@@ -240,21 +240,21 @@ usage()
printf("\tlist-upgradable List installed and upgradable packages\n");
printf("\tlist-changed-conffiles List user modified configuration files\n");
printf("\tfiles <pkg> List files belonging to <pkg>\n");
- printf("\tsearch <file|regexp> List package providing <file>\n");
- printf("\tinfo [pkg|regexp] Display all info for <pkg>\n");
- printf("\tstatus [pkg|regexp] Display all status for <pkg>\n");
+ printf("\tsearch <file|glob> List package providing <file>\n");
+ printf("\tinfo [pkg|glob] Display all info for <pkg>\n");
+ printf("\tstatus [pkg|glob] Display all status for <pkg>\n");
printf("\tdownload <pkg> Download <pkg> to current directory\n");
printf("\tcompare-versions <v1> <op> <v2>\n");
printf("\t compare versions using <= < > >= = << >>\n");
printf("\tprint-architecture List installable package architectures\n");
- printf("\tdepends [-A] [pkgname|pat]+\n");
- printf("\twhatdepends [-A] [pkgname|pat]+\n");
- printf("\twhatdependsrec [-A] [pkgname|pat]+\n");
- printf("\twhatrecommends[-A] [pkgname|pat]+\n");
- printf("\twhatsuggests[-A] [pkgname|pat]+\n");
- printf("\twhatprovides [-A] [pkgname|pat]+\n");
- printf("\twhatconflicts [-A] [pkgname|pat]+\n");
- printf("\twhatreplaces [-A] [pkgname|pat]+\n");
+ printf("\tdepends [-A] [pkgname|glob]+\n");
+ printf("\twhatdepends [-A] [pkgname|glob]+\n");
+ printf("\twhatdependsrec [-A] [pkgname|glob]+\n");
+ printf("\twhatrecommends[-A] [pkgname|glob]+\n");
+ printf("\twhatsuggests[-A] [pkgname|glob]+\n");
+ printf("\twhatprovides [-A] [pkgname|glob]+\n");
+ printf("\twhatconflicts [-A] [pkgname|glob]+\n");
+ printf("\twhatreplaces [-A] [pkgname|glob]+\n");
printf("\nOptions:\n");
printf("\t-A Query all packages not just those installed\n");
@@ -302,7 +302,7 @@ usage()
printf("\n");
- printf(" regexp could be something like 'pkgname*' '*file*' or similar\n");
+ printf(" glob could be something like 'pkgname*' '*file*' or similar\n");
printf(" e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'\n");
/* --force-removal-of-essential-packages Let opkg remove essential packages.