diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-30 12:29:20 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-30 12:29:20 +0000 |
commit | a6f013d370040f6f35d1afad4ad1240ca74af53e (patch) | |
tree | 86f032560a092f0973e29685ffc8111fa42d0cb1 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm | |
parent | e97bf6c1fe3582f0b90f0af648b63450b17ea1a4 (diff) |
new functionality: copy elements of packing-lists to a new plist if they
are registered in a hash. This will be used to create borked packages in
a much simpler way.
Also, set_pkgname, so that I don't have to remember whether this
packing-list already has a name. Useful when copying stuff over.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index d694f368f1b..9e81dbf5acf 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.118 2007/05/29 13:52:07 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.119 2007/05/30 12:29:19 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -133,6 +133,12 @@ sub NoDuplicateNames() { 0 } sub signature {} +sub copy_if +{ + my ($self, $copy, $h) = @_; + $self->add_object($copy) if defined $h->{$self}; +} + # Basic class hierarchy # various stuff that's only linked to objects before/after them |