-sub move_dsc_to_bpd ($) {
- my ($dscfn) = @_;
- printdebug "moving $dscfn and all referenced files to ".bpd_abs()."\n";
- $dsc = parsecontrol($dscfn, "source package");
- foreach my $l (split /\n/, getfield $dsc, 'Files') {
- $l =~ m/\S+$/ or next;
- $l =~ s/.* //;
- printdebug "found $l - renaming\n";
- rename "$l", bpd_abs()."/$l"
- or fail "put in place new source file ($l): $!";
- }
- printdebug "moving $dscfn to ".bpd_abs()."/$dscfn\n";
- rename "$dscfn", bpd_abs()."/$dscfn"
- or fail "put in place new source file ($dscfn): $!";
-}
-