prt-auf: widened the search criteria for find_port_by_desc()
This commit is contained in:
parent
de5bbb0198
commit
b963030c6b
@ -533,18 +533,11 @@ dependency chain unless that package also appears on the command line.
|
||||
package if a build fails.
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu no internal handling of build/install logs. In the event that stdout is \fInot\fP
|
||||
redirected to a file, consider using the 'grpinst' action so that error messages remain in the
|
||||
scrollback buffer. If \fBprt\-auf\fP is used non-interactively (say, in a cron job), then another
|
||||
non-interactive process can take care of renaming the file where the stdout of \fBprt\-auf\fP was
|
||||
dumped. This design decision is closer to the spirit of "do one thing and do it well", although
|
||||
\fBprt\-auf\fP ignores this advice elsewhere by implementing such luxuries as
|
||||
.B prt\-auf ls, prt\-auf edit, prt\-auf readme
|
||||
when command substitutions like
|
||||
.B ls $(prt\-auf path $desired_port)
|
||||
or
|
||||
.B vim $(prt\-auf path $desired_port)/Pkgfile
|
||||
are perfectly cromulent ways to do the same thing.
|
||||
\ \ \ \(bu no internal handling of build/install logs. This omission will be sorely missed by
|
||||
administrators of remote CRUX installations, who are unlikely to want to write their own
|
||||
non-interactive script for cleaning up the redirected stdout of \fBprt\-auf\fP and organizing the
|
||||
build logs that way. Once \fBprt\-auf\fP sees wider adoption beyond the handful of early testers who
|
||||
find value in its approach to package management, the internal handling of build logs will be added.
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu no version comparator. One of the main reasons to run CRUX is to stay current with the
|
||||
|
@ -89,7 +89,7 @@ if (($action =~ /^(listinst|listorphans)/)
|
||||
} elsif ($action =~ /^(list|search|dsearch|path|dependent)/) {
|
||||
exit 1 if ($#results < 0);
|
||||
foreach my $result (@results) {
|
||||
chomp($result); next if ($result =~ /^\s*$/);
|
||||
chomp $result; next if ($result =~ /^\s*$/);
|
||||
$result =~ s/.*\/(.*)$/$1/ if (($action ne "path") and ($osearch{path}==0));
|
||||
$result .= " $V_REPO{$result}" if $osearch{verbose}==1;
|
||||
$result .= " $V_REPO{$result}\n$DESC{$result}\n" if $osearch{verbose}>1;
|
||||
@ -427,7 +427,7 @@ sub find_port_by_file { # for now only used to search footprints, but can be gen
|
||||
|
||||
sub find_port_by_desc {
|
||||
my $query=shift;
|
||||
my @hits = grep { $DESC{$_} =~ /$query/i } keys %DESC;
|
||||
my @hits = grep { (/$query/i) or ($DESC{$_} =~ /$query/i) } keys %DESC;
|
||||
return @hits;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user