@ISA=qw(Exporter);
@EXPORT=qw(&init &doit &complex_doit &verbose_print &error &warning &tmpdir
&pkgfile &pkgext &isnative &autoscript &filearray &GetPackages
- &xargs %dh);
+ &basename &xargs %dh &compat);
my $max_compat=3;
# the default, doing them all.
if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
if ($dh{DOINDEP} || $dh{DOARCH} || $dh{DOSAME}) {
- # User specified that all arch (in)dep package be
- # built, and there are none of that type.
- error("I have no package to act on");
+ error("You asked that all arch in(dep) packages be built, but there are none of that type.");
}
push @{$dh{DOPACKAGES}},@allpackages;
}
sub pkgext {
my $package=shift;
- if ($package ne $dh{MAINPACKAGE}) {
- return "$package.";
+ if (compat(1) and $package eq $dh{MAINPACKAGE}) {
+ return "";
}
- return "";
+ return "$package.";
}
# Returns 1 if the package is a native debian package, null otherwise.