remove test that's now bogus, as fullpkgpath takes precedence.
authorespie <espie@openbsd.org>
Tue, 26 Jan 2021 12:13:21 +0000 (12:13 +0000)
committerespie <espie@openbsd.org>
Tue, 26 Jan 2021 12:13:21 +0000 (12:13 +0000)
thanks bluhm@

usr.sbin/pkg_add/OpenBSD/PkgCreate.pm

index 609e9d9..0890610 100644 (file)
@@ -1,6 +1,6 @@
 #! /usr/bin/perl
 # ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.170 2021/01/11 12:23:34 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.171 2021/01/26 12:13:21 espie Exp $
 #
 # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
 #
@@ -1338,16 +1338,12 @@ sub add_extra_info
            $subst->value('CDROM');;
        my $ftp = $subst->value('PERMIT_PACKAGE_FTP') ||
            $subst->value('FTP');
-       if (defined $cdrom || defined $ftp) {
-               $ftp //= 'no';
-               $ftp = 'yes' if $ftp =~ m/^yes$/io;
-               $cdrom = 'yes' if defined $cdrom && $cdrom =~ m/^yes$/io;
+       $ftp //= 'no';
+       $ftp = 'yes' if $ftp =~ m/^yes$/io;
+       $cdrom = 'yes' if defined $cdrom && $cdrom =~ m/^yes$/io;
 
-               OpenBSD::PackingElement::ExtraInfo->add($plist,
-                   $fullpkgpath, $cdrom, $ftp);
-       } else {
-               $state->errsay("Package without FULLPKGPATH");
-       }
+       OpenBSD::PackingElement::ExtraInfo->add($plist,
+           $fullpkgpath, $cdrom, $ftp);
 }
 
 sub add_elements