diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-03-18 18:21:41 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-03-18 18:21:41 +0000 |
commit | ad5e15fd1344dd65375020cec8ed9b59ef1f81b1 (patch) | |
tree | 2452c654c97592682643d687f07597e1c7dcca00 /usr.bin | |
parent | 3680add51692fbab6c838a3e6a02464995cb53a7 (diff) |
- when a newer version of an installed package is requested, print the URL
where to find a newer version, if possible. matches fd.o pkg-config.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/pkg-config/pkg-config | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config index f6f82419033..77a2e6e8434 100644 --- a/usr.bin/pkg-config/pkg-config +++ b/usr.bin/pkg-config/pkg-config @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: pkg-config,v 1.40 2011/03/18 15:26:11 jasper Exp $ +# $OpenBSD: pkg-config,v 1.41 2011/03/18 18:21:40 jasper Exp $ # $CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $ # Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org> @@ -607,9 +607,12 @@ sub versionmatch sub mismatch { my ($p, $cfg, $op, $v) = @_; - print STDERR "Requested '$p $op $v' but version of ", - stringize($cfg->get_property('Name')), " is ", - stringize($cfg->get_property('Version')), "\n"; + my $name = stringize($cfg->get_property('Name')); + my $version = stringize($cfg->get_property('Version')); + my $url = stringize($cfg->get_property('URL')); + + print STDERR "Requested '$p $op $v' but version of $name is $version\n"; + print STDERR "You may find new versions of $name at $url\n" if $url; } sub simplify_and_reverse |