prt-auf: cleaned up the manpage, fixed incorrect reporting of repository path

This commit is contained in:
John McQuah 2022-06-11 19:36:23 -04:00
parent 6f02ab186c
commit 136106b169
2 changed files with 26 additions and 16 deletions

View File

@ -77,7 +77,8 @@ non-zero value otherwise. A typical usage is:
prt\-auf uses so\-called subcommands, which always have to be the first
non-option argument passed. This is very similar to
.B git(1).
[subcommand] can be one of the following:
\fBsubcommand\fP can be one of the following:
.TP
.B install [\-\-margs=] [\-\-aargs=] <package1> [<package2> ...]
@ -93,8 +94,8 @@ bring all the listed packages and their dependencies up to date. Among 'install'
and 'grpinst', this action is the most permissive, exempting from updates only the locked
ports in the dependency chain. You might use 'install' instead if you want a speedier
compilation time, but if any dependencies have a rapid release cycle and you haven't updated in a
while, there is no guarantee that your old installed version will work when building your desired
package.
while, there is no guarantee that your old installed dependency will provide all the functionality
needed by the desired package.
.TP
.B grpinst [\-\-margs=] [\-\-aargs=] <package1> [<package2> ...]
@ -165,11 +166,15 @@ spend this time once after updating the ports tree has been updated.
.TP
.B fsearch [\-\-path] [\-\-regex] <pattern>
Search the ports tree for file names that match \fBpattern\fP.
Pattern should be a Perl-compatible regular expression (e.g. prt-auf fsearch
--regex 'liblz(o2|ma).*') unless it contains no metacharacters (such as: +,
*, ., / ), in which case you can omit the \-\-regex switch. The full path is
\fInot\fP stripped from the footprint before matching, so if you're looking for
a filename that begins with 'liblz', you should use '\\/liblz' rather than '^liblz'.
.SH ""
When using the --regex switch with 'search', 'dsearch', or 'fsearch', \fIpattern\fP should be a
Perl-compatible regular expression (e.g. prt-auf fsearch --regex 'liblz(o2|ma).*'). You can omit
the --regex switch if your search pattern contains no metacharacters (such as: +, *, ., / ). Shell
globbing (with the * and ? wildcards) is \fINOT\fP supported. The 'fsearch' action looks for matches
against the full path, not just the filename, so if you're looking for a filename that begins
with 'liblz', you should use '\\/liblz' rather than '^liblz'.
.TP
.B info <port>
@ -369,15 +374,15 @@ that <package1> is not installed. Also takes more than one package as
argument.
.TP
.B ls [--path] <package>
.B ls [--path] <port>
Prints out a listing of the port's directory
.TP
.B cat <package> [<file>]
.B cat <port> [<file>]
Prints out the file to stdout. If <file> is not specified, 'Pkgfile' is used. If set, uses $PAGER.
.TP
.B edit <package> [<file>]
.B edit <port> [<file>]
Edit the file using the editor specified in the $EDITOR environment variable.
If <file> is not specified, 'Pkgfile' is used.
@ -513,7 +518,7 @@ also where the verbose switch (-v|-vv) is taken into account, appending to each
Although taking inspiration from \fBprt\-get\fP for its interface and configuration, \fBprt\-auf\fP
diverges from its predecessor in a few notable ways. Some of these differences are mere omissions,
which can easily be incorporated at a later date. Long-time users of \fBprt\-get\fP will quickly
notice the following differences:
observe the following differences:
.PP
.TP
\ \ \ \(bu mixed install/update mode. Packages given on the command line can be present or not, and
@ -566,7 +571,13 @@ rather than passing the "--ignore" option and letting the error go uncorrected.
was satisfied by a manual installation outside of pkgutils, a better response is to make a dummy
port and create an entry in the aliases file. That way prt-auf will treat the dependency as
satisfied for any subsequent installations on the same machine, and passing the "--ignore" option
will be unnecessary for all future ports with the same dependency.
will be unnecessary for all future ports with the same dependency. The canonical example of a line
in the aliases file is
.TP
\ \ \ \ \ rust-bin: rust
which tells \fBprt\-auf\fP that an installed copy of rust-bin is sufficient to proceed with the
compilation of a port that mentions rust in its "Depends on" line.
.SH "EXAMPLES"
.TP

View File

@ -134,7 +134,6 @@ if (($action =~ /^(listinst|listorphans)/)
my @fields = ("Name", "Repository", "Version", "Release", "Description",
"Dependencies", "URL", "Packager", "Maintainer",
"Readme", "PreInstall", "PostInstall");
$results[1] =~ s/^(.*)\/.*$/$1/;
for (my $i=0; $i<7; $i++) { printf $strf, $fields[$i], $results[$i]; }
printf $strf, $fields[8], $results[8];
} elsif ($action eq "remove") {
@ -376,7 +375,7 @@ sub get_pkgfile_fields {
$readme = "yes" if (-f "$portpath/README") or (-f "$portpath/README.md");
$preInstall = "yes" if (-f "$portpath/pre-install");
$postInstall = "yes" if (-f "$portpath/post-install");
$portpath =~ s/\/[a-zA-Z0-9]+$//;
$portpath =~ s/\/[^\/]+?$//; # now it should be called repository path
open(PF,$pkgfile) or die "Cannot open $pkgfile for reading!\n";
while (<PF>) {
@ -741,7 +740,7 @@ sub sysup {
sub find_built_pkg {
my $target = shift; my $CONF="/etc/pkgmk.conf"; local $/="\n";
my $COMPRESSION; my $PKG_DIR; my $portpath = (find_port_by_name($target,1,1,0));
my ($version, $release) = (get_pkgfile_fields($portpath))[0..1];
my ($version, $release) = (get_pkgfile_fields($portpath))[0,1];
open (CF,$CONF) or return;
while (<CF>) {