summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2020-02-20 16:31:11 +0000
committerespie <espie@openbsd.org>2020-02-20 16:31:11 +0000
commitc1cf5f13f617bfac28727fb7e092ff5ee9a67809 (patch)
treeb7673f4d6d3fa2d08796f91a3514b4440c6572da
parentRelax the grip the dead hand of QBUS (a.k.a. MAXPHYS) has on the (diff)
downloadwireguard-openbsd-c1cf5f13f617bfac28727fb7e092ff5ee9a67809.tar.xz
wireguard-openbsd-c1cf5f13f617bfac28727fb7e092ff5ee9a67809.zip
make shell "with debug info" by default and add a bit of code to mark
stuff "no debug" eventually
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index e93d584ed38..8fa4a3147c3 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.274 2019/11/10 16:43:11 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.275 2020/02/20 16:31:11 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -361,6 +361,7 @@ sub write
{
my ($self, $fh) = @_;
print $fh "\@comment no checksum\n" if defined $self->{nochecksum};
+ print $fh "\@comment no debug\n" if defined $self->{nodebug};
$self->SUPER::write($fh);
if (defined $self->{d}) {
$self->{d}->write($fh);
@@ -393,6 +394,10 @@ sub destate
$self->{nochecksum} = 1;
undef $state->{nochecksum};
}
+ if (defined $state->{nodebug}) {
+ $self->{nodebug} = 1;
+ undef $state->{nodebug};
+ }
}
sub add_digest
@@ -455,6 +460,9 @@ sub check_digest
sub IsFile() { 1 }
+package OpenBSD::PackingElement::FileWithDebugInfo;
+our @ISA=qw(OpenBSD::PackingElement::FileBase);
+
package OpenBSD::PackingElement::File;
our @ISA=qw(OpenBSD::PackingElement::FileBase);
@@ -573,7 +581,7 @@ __PACKAGE__->register_with_factory;
sub dirclass() { "OpenBSD::PackingElement::Infodir" }
package OpenBSD::PackingElement::Shell;
-our @ISA=qw(OpenBSD::PackingElement::FileBase);
+our @ISA=qw(OpenBSD::PackingElement::FileWithDebugInfo);
sub keyword() { "shell" }
__PACKAGE__->register_with_factory;
@@ -660,9 +668,6 @@ sub format
return 1;
}
-package OpenBSD::PackingElement::FileWithDebugInfo;
-our @ISA=qw(OpenBSD::PackingElement::FileBase);
-
package OpenBSD::PackingElement::Lib;
our @ISA=qw(OpenBSD::PackingElement::FileWithDebugInfo);