From 0b6bd18b4547e09dbbc26a94b2e4ec13350e7762 Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Fri, 20 Dec 2013 17:09:28 -0500 Subject: 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 --- 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 Install package(s)\n"); printf("\tconfigure Configure unpacked package(s)\n"); - printf("\tremove Remove package(s)\n"); + printf("\tremove Remove package(s)\n"); printf("\tflag Flag package(s)\n"); printf("\t =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 List files belonging to \n"); - printf("\tsearch List package providing \n"); - printf("\tinfo [pkg|regexp] Display all info for \n"); - printf("\tstatus [pkg|regexp] Display all status for \n"); + printf("\tsearch List package providing \n"); + printf("\tinfo [pkg|glob] Display all info for \n"); + printf("\tstatus [pkg|glob] Display all status for \n"); printf("\tdownload Download to current directory\n"); printf("\tcompare-versions \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. -- cgit v0.9.1