summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-06-14 13:32:59 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-06-14 13:32:59 +0000
commit68b19e184fa17ffaa722e9f635a48b29ceed2038 (patch)
treefbda1bd66853d353376fd752d387ef404f5c354a
parent0aaa81c166553fd4db3877bf2dc853e98b71c25a (diff)
tweak pkg_info -S to separate pkgnames with @ from libraries with nothing.
*this goes together with a bsd.port.mk change* !!! fixes some ambiguities in out-of-date, for instance. if you're parsing pkg_info -S output manually, this *WILL* change the way things work
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Signature.pm18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Signature.pm b/usr.sbin/pkg_add/OpenBSD/Signature.pm
index 1a3192af0a1..6c3a5002508 100644
--- a/usr.sbin/pkg_add/OpenBSD/Signature.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Signature.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Signature.pm,v 1.12 2011/04/18 20:16:20 jasper Exp $
+# $OpenBSD: Signature.pm,v 1.13 2012/06/14 13:32:58 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@@ -18,6 +18,20 @@
use strict;
use warnings;
+package OpenBSD::PackageName::Name;
+sub long_string
+{
+ my $self = shift;
+ return '@'.$self->to_string;
+}
+
+package OpenBSD::LibObject;
+sub long_string
+{
+ my $self = shift;
+ return $self->to_string;
+}
+
package OpenBSD::PackingElement;
sub signature {}
@@ -68,7 +82,7 @@ sub new
sub string
{
my $self = shift;
- return join(',', $self->{name}, sort map {$_->to_string} values %{$self->{extra}});
+ return join(',', $self->{name}, sort map {$_->long_string} values %{$self->{extra}});
}
sub compare