Wouter Verhelst wrote:
> When reading the documentation page, the '-a' option clearly states 'Act
> on all architecture dependent packages', and therefore this does seem to
> be consistent with the documentation. However, I believe redefining it
> to say 'all architecture dependent packages relevant for this
> architecture' would be more useful

That's the -s flag, have you tried it?

> while it would be unlikely that this
> would bebreaking anything that depends on the current behaviour (the
> current behaviour results in either building the same thing as this
> proposed behaviour, or failing outright).

IIRC the reason -a does not do what -s does is because it made debhelper
quite a bit slower since it needs to run dpkg-architecture (at least twice)
for each command. That speed issue may not be very relevant now (except for
on, oh, m68k and arm?). And maybe that could be optimised.. in fact
I think I just eliminated it.

The only case I can imagine where the current -a behavior might be depended
on is something using dh_listpackages -a to get a list of all binary packages,
including ones not built for the current architecture, and doing something
with it other than building packages. That seems unlikely.

I don't think there's any particular reason for dh to have its current
behavior -- it can run dpkg-architecture just once when figuring out
which packages to act on. The change there looks to be this simple, though
I need to test it:

--- a/dh
+++ b/dh
@@ -363,7 +363,7 @@ if ($sequence eq 'binary-arch') {
        push @options, "-a";
        # as an optimisation, remove from the list any packages
        # that are not arch dependent
-       my %arch_packages = map { $_ => 1 } getpackages("arch");
+       my %arch_packages = map { $_ => 1 } getpackages("same");
        @packages = grep { $arch_packages{$_} } @packages;
 }
 elsif ($sequence eq 'binary-indep') {

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to