distviper
—
wipe outdated files from the FreeBSD ports distdir
distviper |
[-dhinqv ] [keep] |
The distviper
script removes outdated files within
DISTDIR
of the
ports(7).
To achieve this it reads distinfo files from the
PORTSDIR
and creates a list of files to keep if they
should be encountered.
The following argument types can be given.
- keep
- Chooses which kind of files are kept:
all
,
thorough
- Keep files required for any port in the ports tree. The
thorough alias exists for compatibility with the
original bsdadminscripts.
installed
- Keep files required for any currently installed port.
fast
- This is the same as calling
distviper
with the
-n
flag and the
installed argument. It exists for compatibility
with the original bsdadminscripts.
The following options are supported:
-d
--demo
- The program is run in demo mode. The program acts as if it would operate
normally, but does not remove any files.
-h
--help
- Displays the available options.
-i
--interactvie
- This option prompts for confirmation before deleting a file. It is ignored
in demo mode.
-n
--no-checksum
- Turn off checksum validation for files to keep. Much faster, but also
risks leaving invalid files in
DISTDIR
.
-q
--quiet
- Supresses all output except for interactive prompts.
-v
--verbose
- Makes the script talkative about what is currently going on.
- keep
- There are currently two modes available. By default the thorough mode is
selected, which scans all distinfo files. The fast mode only scans
distinfo files for installed ports.
The following environment variables are supported:
PORTSDIR
- The location of the ports tree, e.g.
/usr/ports.
DISTDIR
- The location of the distribution files, e.g.
/usr/ports/distfiles.
The variables are collected running:
make -f/usr/share/mk/bsd.port.mk -VPORTSDIR -VDISTDIR
Delete any distfile not referenced by the current ports tree:
The demo mode can be used to check which files would be
removed:
Avoid expensive operations, i.e. only keep files for installed
ports and do not perform checksum validation:
Only keep files for installed ports, and ask for confirmation:
- 1
- An unknown parameter has been supplied.
- 2
- An unknown mode command has been supplied.
- 3
- More than one mode commands have been supplied.
The distviper
script first appeared in the
bsdadminscripts-5.0 collection. It was rewritten for the bsda2 collection.