<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl -w
# This file was preprocessed, do not edit!


package Debconf::DbDriver::Copy;
use strict;
use Debconf::Log qw{:all};
use base 'Debconf::DbDriver';


sub copy {
	my $this=shift;
	my $item=shift;
	my $src=shift;
	my $dest=shift;
	
	debug "db $this-&gt;{name}" =&gt; "copying $item from $src-&gt;{name} to $dest-&gt;{name}";
	
	my @owners=$src-&gt;owners($item);
	if (! @owners) {
		@owners=("unknown");
	}
	foreach my $owner (@owners) {
		my $template = Debconf::Template-&gt;get($src-&gt;getfield($item, 'template'));
		my $type="";
		$type = $template-&gt;type if $template;
		$dest-&gt;addowner($item, $owner, $type);
	}
	foreach my $field ($src-&gt;fields($item)) {
		$dest-&gt;setfield($item, $field, $src-&gt;getfield($item, $field));
	}
	foreach my $flag ($src-&gt;flags($item)) {
		$dest-&gt;setflag($item, $flag, $src-&gt;getflag($item, $flag));
	}
	foreach my $var ($src-&gt;variables($item)) {
		$dest-&gt;setvariable($item, $var, $src-&gt;getvariable($item, $var));
	}
}


1
</pre></body></html>