summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Berezin <tobez@FreeBSD.org>2001-06-11 21:31:04 +0000
committerAnton Berezin <tobez@FreeBSD.org>2001-06-11 21:31:04 +0000
commit1f38377a7b8f56a950e2fa82b9e5ade313607ef1 (patch)
tree054d9036fd80e0d6a304ee2f726b3ebb28b248ce
parentf8c8c2b26dcfaba4cb049dea566d872afaab9dd4 (diff)
Notes
-rwxr-xr-xusr.sbin/pkg_install/version/pkg_version.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/version/pkg_version.pl b/usr.sbin/pkg_install/version/pkg_version.pl
index 94623e6c47a0..8647741ae7f7 100755
--- a/usr.sbin/pkg_install/version/pkg_version.pl
+++ b/usr.sbin/pkg_install/version/pkg_version.pl
@@ -373,7 +373,10 @@ foreach $packageString (sort keys %currentPackages) {
# Try to get the version out of the makefile.
# The chdir needs to be successful or our make -V invocation
# will fail.
- chdir "$PortsDirectory/$origin" or next;
+ unless (chdir "$PortsDirectory/$origin" and -r "Makefile") {
+ $currentPackages{$packageString}->{orphaned} = $origin;
+ next;
+ }
open PKGNAME, "$GetPkgNameCommand|";
$pkgname = <PKGNAME>;
@@ -449,7 +452,14 @@ foreach $packageString (sort keys %currentPackages) {
$currentVersion = $currentPackages{$packageString}{'fullversion'};
- if (defined $currentPackages{$packageString}{'portversion'}) {
+ if ($currentPackages{$packageString}->{orphaned}) {
+
+ next if $ShowCommandsFlag;
+ $versionCode = "?";
+ $Comment = "orphaned: $currentPackages{$packageString}->{orphaned}";
+
+ } elsif (defined $currentPackages{$packageString}{'portversion'}) {
+
$portVersion = $currentPackages{$packageString}{'portversion'};
$portPath = "$PortsDirectory/$currentPackages{$packageString}{'origin'}";