The idea was to print the package repository used followed by the stuff
found in it, but that doesn't work:
  $ pkg_info -vQ foo
  Use of uninitialized value $ENV{"PKG_PATH"} in concatenation (.) or string at 
/usr/libdata/perl5/OpenBSD/PkgInfo.pm line 604.
  PKG_PATH=
  foo2zjs-20140627
  foobillard-3.0ap0
  fookebox-0.7.1p1
  foomatic-db-4.0.20150415
  foomatic-db-engine-4.0.12p0

The value it was trying to print is wrong anyway since PackageRepositoryList
is influenced by more than just $ENV, and isn't necessarily a single value
anyway since pkg.conf can have
  installpath = repo1
  installpath += repo2
and rarely actually is a single value since we implicitly prepend file:./

This patch removes the broken behavior. I plan to separately introduce
a more robust way of enumerating the used package repositories in a
following patch.


Index: PkgInfo.pm
===================================================================
RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm,v
retrieving revision 1.35
diff -u -p -d -r1.35 PkgInfo.pm
--- PkgInfo.pm  6 Apr 2015 12:19:35 -0000       1.35
+++ PkgInfo.pm  23 Jun 2015 19:59:26 -0000
@@ -601,7 +601,6 @@ sub parse_and_run
        if ($state->opt('Q')) {
                require OpenBSD::Search;
 
-               print "PKG_PATH=$ENV{PKG_PATH}\n" if $state->verbose;
                my $partial = 
OpenBSD::Search::PartialStem->new($state->opt('Q'));
                my $r = $state->repo->match_locations($partial);
 

Reply via email to