summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-04-16 13:27:26 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-04-16 13:27:26 +0000
commit40a5a32781ac6ed44bac6e5a1b36f20c0ce83824 (patch)
tree7a98d0a64b5ca6578069bf240deced9ef165dab1 /usr.sbin/pkg_add
parentc3f09030202d3847b87612825f71641cd96e208c (diff)
supplementary code for Samples
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCheck.pm19
1 files changed, 18 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
index 59f2e2cf7cc..5808a759903 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCheck.pm,v 1.36 2012/04/16 10:55:31 espie Exp $
+# $OpenBSD: PkgCheck.pm,v 1.37 2012/04/16 13:27:25 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -168,6 +168,23 @@ sub basic_check
}
}
+package OpenBSD::PackingElement::Sample;
+use File::Basename;
+sub basic_check
+{
+ my ($self, $state) = @_;
+ my $name = $state->{destdir}.$self->fullname;
+ $state->{known}{dirname($name)}{basename($name)} = 1;
+}
+
+package OpenBSD::PackingElement::Sampledir;
+sub basic_check
+{
+ my ($self, $state) = @_;
+ my $name = $state->{destdir}.$self->fullname;
+ $state->{known}{$name} //= {};
+}
+
package OpenBSD::PackingElement::Mandir;
sub basic_check
{