Hi,

root@caramel:~# pkg_add -P ftp tree 
quirks-3.165 signed on 2019-08-07T13:50:33Z
tree-0.62: ok
root@caramel:~# pkg_delete tree     
tree-0.62: ok
root@caramel:~# pkg_add -P cdrom tree
quirks-3.165 signed on 2019-08-07T13:50:33Z
|No change in quirks-3.165Use of uninitialized value in string ne
at /usr/libdata/perl5/OpenBSD/Add.pm line 314. Package tree-0.62 is not
for cdrom Couldn't install tree-0.62

Here's a naive and untested diff ;)
Not entirely sure how much -P is useful tho.

Index: pkg_add.1
===================================================================
RCS file: /cvs/src/usr.sbin/pkg_add/pkg_add.1,v
retrieving revision 1.159
diff -u -p -r1.159 pkg_add.1
--- pkg_add.1   4 Jul 2019 15:25:16 -0000       1.159
+++ pkg_add.1   9 Aug 2019 15:24:51 -0000
@@ -412,8 +412,6 @@ if applicable.
 Check permissions for distribution, where
 .Ar type
 can be
-.Sq cdrom
-or
 .Sq ftp .
 .It Fl qq
 Do not bother with checksums for configuration files.
cvs server: Diffing OpenBSD
Index: OpenBSD/Add.pm
===================================================================
RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/Add.pm,v
retrieving revision 1.182
diff -u -p -r1.182 Add.pm
--- OpenBSD/Add.pm      10 Jul 2019 11:15:15 -0000      1.182
+++ OpenBSD/Add.pm      9 Aug 2019 15:24:51 -0000
@@ -311,10 +311,6 @@ sub prepare_for_addition
 {
        my ($self, $state, $pkgname) = @_;
 
-       if ($state->{cdrom_only} && $self->{cdrom} ne 'yes') {
-           $state->errsay("Package #1 is not for cdrom", $pkgname);
-           $state->{problems}++;
-       }
        if ($state->{ftp_only} && $self->{ftp} ne 'yes') {
            $state->errsay("Package #1 is not for ftp", $pkgname);
            $state->{problems}++;


Cheers,
Daniel

Reply via email to