prtwash.pl: allow user to toggle the parsing of pkgmk.conf
This commit is contained in:
@@ -36,34 +36,28 @@ All items not included in the previous list WILL be deleted
|
||||
You can choose to delete some of the above by passing the proper
|
||||
option:
|
||||
.TP
|
||||
.B
|
||||
-p
|
||||
also remove the built package (current version)
|
||||
.B \-p
|
||||
remove the built package (current version)
|
||||
.TP
|
||||
.B
|
||||
-b
|
||||
also remove other built packages (older versions)
|
||||
.B \-b
|
||||
remove older builds (any package tarball that does NOT match
|
||||
the current version)
|
||||
.TP
|
||||
.B
|
||||
-d
|
||||
also remove the add-on files provided by CRUX maintainers
|
||||
.B \-d
|
||||
remove add-on files provided by CRUX maintainers
|
||||
(patches and initscripts downloaded with \fBports -u\fP)
|
||||
.TP
|
||||
.B
|
||||
-s
|
||||
also remove the upstream sources (those NOT obtained via \fBports -u\fP)
|
||||
.B \-s
|
||||
remove upstream sources (those NOT obtained via \fBports -u\fP)
|
||||
.TP
|
||||
.B
|
||||
-t
|
||||
.B \-t
|
||||
(test mode) display the target files without deleting
|
||||
.TP
|
||||
.B
|
||||
-q
|
||||
.B \-q
|
||||
(quiet mode) suppress messages about files that are kept;
|
||||
basically the same as \fBprtwash [OPTIONS] | grep -v "keeping"\fP
|
||||
.TP
|
||||
.B
|
||||
-a
|
||||
.B \-a
|
||||
(automatic mode) take the port collections from the
|
||||
/etc/prt-get.conf file and do a recursive cleaning;
|
||||
if omitted, the command line must contain at least one <path> specifying
|
||||
@@ -71,12 +65,14 @@ a valid port directory
|
||||
.PP
|
||||
Misc options
|
||||
.TP
|
||||
.B
|
||||
-h
|
||||
.B \-\-parse\-pkgmk\-conf
|
||||
Revert to the v0.9 behaviour of parsing /etc/pkgmk.conf to determine the
|
||||
compression mode of built packages
|
||||
.TP
|
||||
.B \-h
|
||||
Display usage information
|
||||
.TP
|
||||
.B
|
||||
-v
|
||||
.B \-v
|
||||
Display version
|
||||
.SH ENVIRONMENT
|
||||
In automatic mode, \fBprtwash\fP gets a list of repositories from
|
||||
@@ -93,11 +89,24 @@ Sources under CRUX version control are only deleted if you pass the
|
||||
option \fB\-d\fP. Sources from upstream are only deleted if you pass the
|
||||
option \fB\-s\fP.
|
||||
.PP
|
||||
The current version of the package is only deleted if you pass the
|
||||
option \fB\-p\fP. Older versions of the package are only deleted if you
|
||||
pass the option \fB\-b\fP. Note that if the compression mode defined
|
||||
in /etc/pkgmk.conf has been changed since you last built the package,
|
||||
\fBprtwash\fP will not recognize the tarball in its regexp search.
|
||||
You can also delete the built package (current version) by passing
|
||||
the option \fB\-p\fP. To select only older versions for deletion,
|
||||
pass the option \fB\-b\fP instead. These two options operate independently,
|
||||
allowing you to target four distinct subsets (including the empty set)
|
||||
for deletion.
|
||||
.PP
|
||||
By passing the option \fB\-\-parse\-pkgmk\-conf\fP, you can modify the behaviour
|
||||
of the pattern matching performed to detect built packages. By default, the
|
||||
regexp searches are done with the patterns
|
||||
.B /${name}#${version}.*.pkg.tar.(gz|lz|xz|bz2)/
|
||||
and
|
||||
.B /${name}#.*pkg.tar.(gz|lz|xz|bz2)/
|
||||
using the variables defined in the \fBPkgfile\fP(5). Passing the option
|
||||
.B \-\-parse\-pkgmk\-conf
|
||||
will result in a more narrow regexp search, allowing the deletion of any package
|
||||
tarball that uses a different compression algorithm than the one currently defined
|
||||
in /etc/pkgmk.conf (which is how the v0.9 bash script worked).
|
||||
|
||||
.SH COMPARISON WITH OTHER UTILITIES
|
||||
Because \fBprtwash\fP reads the location of port collections from \fB/etc/prt-get.conf\fP(5),
|
||||
you can easily control which collections are cleaned in automatic mode by commenting
|
||||
|
||||
Reference in New Issue
Block a user