refresh the man-page examples

This commit is contained in:
John McQuah 2023-09-01 12:39:47 -04:00
parent e97879074b
commit 4c821419fb
1 changed files with 28 additions and 25 deletions

View File

@ -246,7 +246,7 @@ By default, output is restricted to ports that are installed. To see all the
dependencies, add the --all switch. Use --tree to get a nicely indented list. dependencies, add the --all switch. Use --tree to get a nicely indented list.
.TP .TP
.B dup [-v] [format] .B dup [\-v] [format]
List ports which can be found in multiple directories configured in List ports which can be found in multiple directories configured in
\fB/etc/prt\-get.conf\fP. \fB/etc/prt\-get.conf\fP.
Use the \fB\-v\fP switch to see a verbose report, which will show for each Use the \fB\-v\fP switch to see a verbose report, which will show for each
@ -261,39 +261,39 @@ symbols will be replaced as follows.
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%n \-> name of the port %n -> name of the port
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%p1 \-> full path (including name) to port taking precedence %p1 -> full path (including name) to port taking precedence
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%p2 \-> full path (including name) to port being hidden %p2 -> full path (including name) to port being hidden
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%v1 \-> version of port taking precedence %v1 -> version of port taking precedence
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%v2 \-> version of port being hidden %v2 -> version of port being hidden
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%M1 \-> maintainer of port taking precedence %M1 -> maintainer of port taking precedence
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%M2 \-> maintainer of port being hidden %M2 -> maintainer of port being hidden
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%u1 \-> URL of port taking precedence %u1 -> URL of port taking precedence
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%u2 \-> URL of port being hidden %u2 -> URL of port being hidden
.TP .TP
.B list [\-v|\-vv] [\-\-path] [\-\-regex] [filter] .B list [\-v|\-vv] [\-\-path] [\-\-regex] [filter]
@ -335,7 +335,7 @@ are replaced like this:
.TP .TP
\ \ \ \(bu \ \ \ \(bu
%P \-> optional dependencies %P -> optional dependencies
.TP .TP
\ \ \ \(bu \ \ \ \(bu
@ -669,18 +669,18 @@ Useful if there was a major soversion change in one of its dependencies,
and \fBrevdep openssh\fP indicates a broken package. :-) and \fBrevdep openssh\fP indicates a broken package. :-)
.TP .TP
.B MISSLIBS=$(revdep -vvv mpv | awk -v FS=: '/(missing library)/ {print $3}'); [ -n \(dq${MISSLIBS[@]}\(dq ] && for i in ${MISSLIBS[@]}; do prt\-get fsearch $i; done .B MISSLIBS=$(revdep \-vvv mpv | awk \-v FS=: '/(missing library)/ {print $3}'); [ \-n \(dq${MISSLIBS[@]}\(dq ] && for i in ${MISSLIBS[@]}; do prt\-get fsearch $i; done
(adapted from a script by ppetrov^) Check for the presence of the runtime libraries needed by mpv. (adapted from a script by ppetrov^) Check for the presence of the runtime libraries needed by mpv.
If any are absent, search the footprints to determine which ports provide the missing libraries. If any are absent, search the footprints to determine which ports provide the missing libraries.
.TP .TP
.B prt\-get isinst $(ls /usr/pkgmk/packages | sed 's/.*\e///' | tr '\en' ' ') | grep 'not installed' .B prt\-get isinst $(ls /usr/pkgmk/packages/*.tar.gz | sed 's/.*\e///; s/#.*//;') | awk '/not installed/ { print $2 }'
Determine whether there are any packages (in a shared output directory) that Determine whether there are any packages (in a shared output directory) that
have since been uninstalled, or were never installed after a successful run have since been uninstalled, or were never installed after a successful run
of \fBpkgmk\fP. of \fBpkgmk\fP.
.TP .TP
.B prt\-get printf '%i:%p:%n\en' | awk -v FS=: '/^diff:\e/usr\e/ports\e/core/ { print $3 }' | xargs prt\-get update .B prt\-get printf '%i:%p:%n\en' | awk \-v FS=: '/^diff:\e/usr\e/ports\e/core/ { print $3 }' | xargs prt\-get update
Basically a \fBsysup\fP operation, but restricted to the core collection. Basically a \fBsysup\fP operation, but restricted to the core collection.
Because core ports are often omitted from the dependency line if they aren't Because core ports are often omitted from the dependency line if they aren't
dynamically linked in, the \fBsysup\fP sorting algorithm might not put them dynamically linked in, the \fBsysup\fP sorting algorithm might not put them
@ -688,11 +688,11 @@ at the front of the queue. Run this command before a regular \fBsysup\fP in
order to ensure that core ports are updated first. order to ensure that core ports are updated first.
.TP .TP
.B prt\-get isinst $(prt-get info ffmpeg | awk -v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}') | awk -v FS=\(dq \(dq '/not installed/ {print $2}' .B prt\-get isinst $(prt\-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}') | awk \-v FS=\(dq \(dq '/not installed/ {print $2}'
Show all the optional dependencies of ffmpeg that are not currently installed. Show all the optional dependencies of ffmpeg that are not currently installed.
.TP .TP
.B prt\-get isinst $(prt-get info ffmpeg | awk -v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}') | awk -v FS=\(dq \(dq '/not installed/ {print $2}' | xargs prt\-get depinst \-\-group \-\-softdeps ffmpeg .B prt\-get isinst $(prt\-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}') | awk \-v FS=\(dq \(dq '/not installed/ {print $2}' | xargs prt\-get depinst \-\-group \-\-softdeps ffmpeg
Extension of the above. Installs ffmpeg and all its optional dependencies, in Extension of the above. Installs ffmpeg and all its optional dependencies, in
the order that guarantees a maximal feature set. The --group flag tells the order that guarantees a maximal feature set. The --group flag tells
\fBprt\-get\fP to abort the operation if any port fails to build, so as not to \fBprt\-get\fP to abort the operation if any port fails to build, so as not to
@ -700,7 +700,7 @@ spend any resources on ffmpeg until all of its optional dependencies are in
place. place.
.TP .TP
.B prt\-get isinst $(if grep -qE '^ffmpeg:' /etc/prt-get.softdeps 2>/dev/null; then grep -E '^ffmpeg:' /etc/prt-get.softdeps | cut -d: -f2 | tr ',' ' '; else prt-get info ffmpeg | awk -v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}'; fi) | awk -v FS=\(dq \(dq '/not installed/ {print $2}' | xargs prt\-get depinst \-\-group \-\-softdeps ffmpeg .B prt\-get isinst $(if grep \-qE '^ffmpeg:' /etc/prt\-get.softdeps 2>/dev/null; then grep \-E '^ffmpeg:' /etc/prt\-get.softdeps | cut \-d: \-f2 | tr ',' ' '; else prt-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}'; fi) | awk \-v FS=\(dq \(dq '/not installed/ {print $2}' | xargs prt\-get depinst \-\-group \-\-softdeps ffmpeg
Extension of the above (addressing a use case envisioned by ivandi). The Extension of the above (addressing a use case envisioned by ivandi). The
user can create the file /etc/prt-get.softdeps containing a line like user can create the file /etc/prt-get.softdeps containing a line like
.B ffmpeg: x264 x265 .B ffmpeg: x264 x265
@ -748,23 +748,26 @@ awk filter in the middle is needed to prevent the command from failing with the
error message "already installed". error message "already installed".
.TP .TP
.B prt\-get printf \(dq%p\et%u\en\(dq | grep myrepo | cut -f 2 .B prt\-get printf \(dq%p\et%u\en\(dq | grep myrepo | cut \-f 2
Print the upstream URL for each port in the collection \(dqmyrepo\(dq, Print the upstream URL for each port in the collection \(dqmyrepo\(dq,
perhaps as the first step in keeping your personal overlay up to date. perhaps as the first step in keeping your personal overlay up to date.
.TP .TP
.B prt\-get printf \(dq%M\et%n\en\(dq | grep -c -i ^unmaintained .B for u in $(prt\-get printf \(dq%M:%p/%n\en\(dq | grep \-i ^unmaintained | cut \-d: \-f2); do cd ${u%/*}; printf \(dq||%s ||\(dq ${u##*/}; git log ${u##*/} | head \-n 5 | awk '/^Date/ { $0=gensub(/^Date:\es+/,"","g"); printf(\(dq %s ||\en\(dq,$0); }'; cd \- >/dev/null; done
Count how many ports are marked unmaintained (and hence at risk of being dropped Generate a table of unmaintained ports and the dates of their most recent
from the repos by the time you next run 'ports -u'). commit, in PmWiki syntax (left-justified port names, centered dates).
Requires that your repositories are synchronized using the \fBgit(1)\fP driver.
Subsequent sorting by date may be done using \fBsort(1)\fP with the flags
-k, -M, and -n (the appropriate key defs will depend on your locale).
.TP .TP
.B comm -13 <(prt\-get depends firefox-bin |tail -n +2 |sort) <(prt\-get depends firefox |tail -n +2 |sort) .B comm \-13 <(prt\-get depends firefox\-bin |tail \-n +2 |sort) <(prt\-get depends firefox |tail \-n +2 |sort)
Find the build-time dependencies of firefox. Runtime dependencies would Find the build-time dependencies of firefox. Runtime dependencies would
also appear in the list generated by the first process substitution, and also appear in the list generated by the first process substitution, and
\fBcomm -13\fP will suppress what the two lists have in common. \fBcomm \-13\fP will suppress what the two lists have in common.
.TP .TP
.B prt-get listinst \-\-depsort | xargs prt-get install \-\-install\-root=/mnt .B prt\-get listinst \-\-depsort | xargs prt\-get install \-\-install\-root=/mnt
Sort the list of installed packages by dependencies, and then install all Sort the list of installed packages by dependencies, and then install all
those packages onto a backup filesystem (mounted at /mnt). If you have a those packages onto a backup filesystem (mounted at /mnt). If you have a
customized pkgadd.conf that you want applied to this operation, either copy customized pkgadd.conf that you want applied to this operation, either copy
@ -772,7 +775,7 @@ it to /mnt/etc where pkgadd will be looking for it, or pass the additional
option \-\-aargs=\(dq\-c /etc/pkgadd.conf\(dq to the install command. option \-\-aargs=\(dq\-c /etc/pkgadd.conf\(dq to the install command.
.TP .TP
.B prt-get list --path --regex '^xorg.*' | grep -v \(dq/usr/ports/xorg\(dq .B prt\-get list \-\-path \-\-regex '^xorg.*' | grep \-v \(dq/usr/ports/xorg\(dq
Show the ports whose names begin with xorg, but which appear outside the Show the ports whose names begin with xorg, but which appear outside the
xorg port collection. xorg port collection.
(At the time of writing, this command returned at least two font ports.) (At the time of writing, this command returned at least two font ports.)