Dear Maintainer,
the script copy Build-Depends into Depends. But those are not the same
fields. Build-Depends parsed differently by apt then Depends. For most
cases it is the same. But when you specify Build-Depends as for example
python3-mako apt will install python3-mako:all arch. But when this build
dependency moved into Depends with out arch specification, apt will try
to install python3-mako:i386. and since here is no python3-mako:i386
install will failed.
Following should work on amd64:
apt build-dep mangohud
apt build-dep mangohud:i386
mk-build-deps mangohud
mk-build-deps -a i386 mangohud
This patch / hack fixing the behaviour:
diff --git a/scripts/mk-build-deps.pl b/scripts/mk-build-deps.pl
index 8b35e7e..f09ae9b 100755
--- a/scripts/mk-build-deps.pl
+++ b/scripts/mk-build-deps.pl
@@ -425,7 +425,7 @@ if ($opt_install) {
my (@pkg_names, @deb_files, @buildinfo_files, @changes_files, %uniq);
for my $package (@packages) {
if ($uniq{ $package->{deb_file} }++ == 0) {
- push @pkg_names, $package->{package};
+ push @pkg_names, $package->{package}.":".$package->{arch};
push @deb_files, $package->{deb_file};
push @buildinfo_files, $package->{buildinfo_file};
push @changes_files, $package->{changes_file};
@@ -514,16 +514,6 @@ sub build_equiv {
$hostarch = $opt_hostarch;
}
- if ($packagearch eq "all") {
- if ($buildarch ne $hostarch) {
- die
-"build architecture \"$buildarch\" is unequal host architecture
\"$hostarch\" in which case the package architecture must not be \"all\"
(but \"$hostarch\" instead)\n";
- }
- } elsif ($packagearch ne $hostarch) {
- die
-"The package architecture must be equal to the host architecture except
if the package architecture is \"all\"\n";
- }
-
my $build_profiles = [split /\s+/, ($ENV{'DEB_BUILD_PROFILES'} // "")];
if (defined $opt_buildprofiles) {
$build_profiles = [split /,/, $opt_buildprofiles];
@@ -560,6 +550,10 @@ sub build_equiv {
$dep->{archqual} = $buildarch;
}
}
+ my $str = `apt-cache showsrc "$dep" | grep-dctrl --show-field
Package-List - | awk '\$1 == "$dep" && /arch=all/{print \$1}'`;
+ if ($str ne "") {
+ $dep->{archqual} = "all";
+ }
return 1;
};
deps_iterate($positive, $handle_native_archqual);
@@ -574,6 +568,14 @@ sub build_equiv {
$buildess .= ", crossbuild-essential-$hostarch:$buildarch";
}
+ use File::Temp ();
+ my $temp = File::Temp->new();
+ print $temp
+"
+$pkgname ($opts->{version}) unstable; urgency=low
+
+ * First version
+";
my $readme = '/usr/share/devscripts/templates/README.mk-build-deps';
open EQUIVS, "| equivs-build $args-"
or die "$progname: Failed to execute equivs-build: $!\n";
@@ -581,7 +583,9 @@ sub build_equiv {
. "Priority: optional\n"
. "Standards-Version: 3.7.3\n\n"
. "Package: $pkgname\n"
- . "Architecture: $packagearch\n"
+ . "Architecture: any\n"
+ . "Multi-Arch: same\n"
+ . "Changelog: $temp\n"
. "Depends: $buildess, $positive\n";
print EQUIVS "Conflicts: $negative\n" if $negative;
@@ -603,10 +607,17 @@ sub build_equiv {
my $v = Dpkg::Version->new($version);
# The version in the .deb filename will not contain the epoch
$version = $v->as_string(omit_epoch => 1);
- my $deb_file = "${pkgname}_${version}_${packagearch}.deb";
+ my $debarch;
+ if ($packagearch eq "all") {
+ $debarch = "$buildarch";
+ } else {
+ $debarch = "$packagearch";
+ }
+ my $deb_file = "${pkgname}_${version}_${debarch}.deb";
my $buildinfo_file = "${pkgname}_${version}_${hostarch}.buildinfo";
my $changes_file = "${pkgname}_${version}_${hostarch}.changes";
return {
+ arch => $debarch,
package => $pkgname,
deb_file => $deb_file,
buildinfo_file => $buildinfo_file,
--- /etc/devscripts.conf ---
Empty.
--- ~/.devscripts ---
DEBEMAIL=axet@me.com
DEBFULLNAME="Alexey Kuznetsov"