summaryrefslogtreecommitdiff
path: root/prtsweep.1
diff options
context:
space:
mode:
Diffstat (limited to 'prtsweep.1')
-rw-r--r--prtsweep.150
1 files changed, 41 insertions, 9 deletions
diff --git a/prtsweep.1 b/prtsweep.1
index de49808..2272d2b 100644
--- a/prtsweep.1
+++ b/prtsweep.1
@@ -1,6 +1,7 @@
.\"
.\" prtsweep manual page.
-.\" (C) 2e003 by Martin Opel <mo@obbl-net.de>
+.\" (C) 2e003 by Martin Opel
+.\" Revised 2021 by John McQuah
.\"
.TH prtsweep 1
.SH NAME
@@ -11,12 +12,12 @@ prtsweep \- sweep old files from the ports directories
[\-a] [\-d] [\-n] [PORTDIR ...]
.SH DESCRIPTION
-The \fIprtsweep\fP program sweeps port directories from unneeded files.
-Unneeded files are either files which are not part of the source array
-in the Pkgfile or package files with a name like
+The \fIprtsweep\fP program sweeps port directories, deleting unneeded files.
+"Unneeded" here means not found in the Pkgfile source array, and not the
+built package
.PP
.nf
- name#version.pkg.tar.gz
+ name#version-release.pkg.tar.gz
.fi
.PP
All other files are removed. If a port directory is empty, the whole directory
@@ -32,7 +33,7 @@ in these directories.
.TP
.I "\-d"
Removes empty directories completely. This happens when ports are moved for
-example from unstable to stable or vice versa. Note that this option only
+example from opt to contrib or vice versa. Note that this option only
deletes empty directories, so accidently removing whole directory trees
should not happen, even if you use
.IP
@@ -43,8 +44,39 @@ should not happen, even if you use
To remove these moved ports completely you have to run \fIprtsweep\fP twice
to first remove the files and second remove the empty directory.
.TP
+.I "\-p"
+Also removes the built package.
+.TP
.I "\-n"
-Dryrun. Do not remove anything really.
+Dry-run. Do not remove anything really.
+.TP
+.I "\-q"
+Quiet mode. Do not pause to inform the user when analysis of the config file
+indicates that clutter from building ports might still remain elsewhere
+in the filesystem.
+.SH ENVIRONMENT
+In automatic mode, \fBprtsweep\fP reads from /etc/pkgmk.conf
+any custom settings for PKGMK_SOURCE_DIR and PKGMK_PACKAGE_DIR
+to determine where the clutter from a pkgmk build is likely to
+appear. If the directories potentially cluttered by pkgmk builds
+are shared among many ports, e.g., by setting a nonempty
+PKGMK_SOURCE_DIR with no reference to the port name, then
+\fBprtsweep\fP will pause and inform the user that a follow-up
+cleaning using other tools might be needed. This warning can be suppressed
+by passing the \fB\-q\fP option.
+.PP
+\fBprtsweep\fP then gets a list of active port collections
+from /etc/ports/*.{rsync,httpup}, and for each collection descends into the
+individual port directories to read the associated Pkgfiles.
+After reading the Pkgfile, \fBprtsweep\fP will know the source filenames and
+the package filename. \fBprtsweep\fP then compares the contents of the port
+directory with this list of needed files, and any non-matching filename is
+deleted (or just printed to stderr if dry-run mode is enabled).
+.PP
+After a real cleaning by \fBprtsweep\fP (not dry-run mode), each port
+directory should contain only the Pkgfile, source files obtained
+by rsync or httpup, and the built package (if present, and option -p was
+not given on the command line).
.SH EXAMPLES
@@ -71,7 +103,7 @@ for all ports directories and cleans them automatically:
...
.fi
-.SH AUTHOR
-Martin Opel <mo@obbl-net.de>
+.SH AUTHORS
+Martin Opel <mo at obbl-net dot de>, John McQuah <jmcquah at disroot dot org>
.SH "SEE ALSO"
prtwash(1)

Generated by cgit