try putting stuff we don't know about in the default plist

This commit is contained in:
espie 2018-04-26 13:27:06 +00:00
parent 337a331e97
commit 78e0b718ad

View File

@ -1,5 +1,5 @@
#! /usr/bin/perl
# $OpenBSD: update-plist,v 1.6 2018/04/26 12:19:19 espie Exp $
# $OpenBSD: update-plist,v 1.7 2018/04/26 13:27:06 espie Exp $
# Copyright (c) 2018 Marc Espie <espie@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
@ -131,6 +131,13 @@ sub nlist
return $self->{nlist};
}
sub strip_prefix
{
my ($self, $path) = @_;
$path =~ s,^\Q$self->{state}{prefix}\E/,,;
return $path;
}
package PlistReader::State;
our @ISA = qw(OpenBSD::PkgCreate::State);
@ -302,6 +309,10 @@ for my $path (sort keys %$objects) {
my $s = $e->{comesfrom};
$e->add_object($s->nlist);
}
} else {
my $o = $objects->{$path};
$o->element_class->add($lists[0]->nlist,
$lists[0]->strip_prefix($path));
}
}
use File::Path;