summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2013-12-30 09:14:50 +0000
committerMarc Espie <espie@cvs.openbsd.org>2013-12-30 09:14:50 +0000
commitbb3ad4fdb3e0790e055f818356d0da6297adef8e (patch)
tree259bceb4923605fd3d1d310317a15d285f5b2085 /usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
parente8cae10db5180f7a83b2e3d2e2dbcb6f21adf527 (diff)
@vendor annotation
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PkgCreate.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index aa977de2bca..9e4443e843a 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.74 2013/12/29 13:40:54 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.75 2013/12/30 09:14:49 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -1082,6 +1082,16 @@ sub create_archive
return OpenBSD::Ustar->new($fh, $state, $dir);
}
+sub setup_vendor
+{
+ my ($self, $plist, $state) = @_;
+ my $vendor = $state->{subst}->value('VENDOR');
+ if (!defined $vendor) {
+ return;
+ }
+ OpenBSD::PackingElement::Vendor->add($plist, $vendor);
+}
+
sub sign_existing_package
{
my ($self, $state, $pkg) = @_;
@@ -1091,6 +1101,7 @@ sub sign_existing_package
my $plist = OpenBSD::PackingList->fromfile($dir.CONTENTS);
$plist->set_infodir($dir);
$self->add_signature($plist, $state);
+ $self->setup_vendor($plist, $state);
$plist->save;
my $tmp = OpenBSD::Temp::permanent_file($output, "pkg");
my $wrarc = $self->create_archive($state, $tmp, ".");
@@ -1134,6 +1145,7 @@ sub add_extra_info
my ($self, $plist, $state) = @_;
my $subst = $state->{subst};
+ $self->setup_vendor($plist, $state);
my $fullpkgpath = $subst->value('FULLPKGPATH');
my $cdrom = $subst->value('PERMIT_PACKAGE_CDROM') ||
$subst->value('CDROM');;