Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-26 Thread Helmut Grohne
Control: clone -1 -2
Control: submitter -2 !
Control: reassign -2 dpkg-cross
Control: retitle -2 mark dpkg-crossed packages Multi-Arch: foreign
Control: tags -2 + patch

On Fri, Jun 26, 2020 at 02:12:46PM +0800, YunQiang Su wrote:
> Helmut Grohne  于2020年6月26日周五 上午5:11写道:
> > Did you actually try the patch to see whether it solves your problem?
> 
> You patch cannot work:
> 
> root@sid-i386:/build# dpkg -i
> gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb
> libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb
> Selecting previously unselected package gcc-10-i686-linux-gnu:amd64.
> (Reading database ... 42731 files and directories currently installed.)
> Preparing to unpack gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb ...
> Unpacking gcc-10-i686-linux-gnu:amd64 (10.1.0-4cross1) ...
> Selecting previously unselected package libgcc-10-dev-i386-cross.
> Preparing to unpack libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb ...
> Unpacking libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
> dpkg: dependency problems prevent configuration of 
> gcc-10-i686-linux-gnu:amd64:
>  gcc-10-i686-linux-gnu:amd64 depends on libgcc-10-dev-i386-cross (>=
> 10.1.0-4cross1).
> 
> dpkg: error processing package gcc-10-i686-linux-gnu:amd64 (--install):
>  dependency problems - leaving unconfigured
> Setting up libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
> Errors were encountered while processing:
>  gcc-10-i686-linux-gnu:amd64

Thank you. You are correct. The patch cannot work as is. The patch can
only change the Multi-Arch field of tool packages, not for library
packages. Library packages should be Multi-Arch: same. However, we are
converting those architecture-dependent Multi-Arch: same packages to
libsomething-somearch-cross packages using dpkg-cross. And then they
become Multi-Arch: foreign. Since they, too, carry the architecture in
their name, they should be Multi-Arch: foreign as well. That's a pretty
simple change to dpkg-cross. So we need both patches in combination
here.

Could you try answering the other question from my mail about why the
Multi-Arch field would be harmful?

Helmut
diff --minimal -Nru dpkg-cross-2.6.15/dpkg-cross dpkg-cross-2.6.15/dpkg-cross
--- dpkg-cross-2.6.15/dpkg-cross2017-07-24 17:47:10.0 +0200
+++ dpkg-cross-2.6.15/dpkg-cross2020-06-26 17:52:45.0 +0200
@@ -1105,6 +1105,7 @@
print CONTROL "Section: " . $control{"section"} . "\n";
print CONTROL "Priority: extra\n";
print CONTROL "Architecture: all\n";
+   print CONTROL "Multi-Arch: foreign\n";
 
if (defined($control{"maintainer"})) {
print CONTROL "Maintainer: " . $control{"maintainer"} . "\n";


Processed: Re: Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-26 Thread Debian Bug Tracking System
Processing control commands:

> clone -1 -2
Bug #963254 [src:gcc-10] gcc-10: d/rules.def, set AQ to :all for cross build
Bug 963254 cloned as bug 963759
> submitter -2 !
Bug #963759 [src:gcc-10] gcc-10: d/rules.def, set AQ to :all for cross build
Changed Bug submitter to 'Helmut Grohne ' from 'YunQiang Su 
'.
> reassign -2 dpkg-cross
Bug #963759 [src:gcc-10] gcc-10: d/rules.def, set AQ to :all for cross build
Bug reassigned from package 'src:gcc-10' to 'dpkg-cross'.
No longer marked as found in versions gcc-10/10.1.0-4.
Ignoring request to alter fixed versions of bug #963759 to the same values 
previously set
> retitle -2 mark dpkg-crossed packages Multi-Arch: foreign
Bug #963759 [dpkg-cross] gcc-10: d/rules.def, set AQ to :all for cross build
Changed Bug title to 'mark dpkg-crossed packages Multi-Arch: foreign' from 
'gcc-10: d/rules.def, set AQ to :all for cross build'.
> tags -2 + patch
Bug #963759 [dpkg-cross] mark dpkg-crossed packages Multi-Arch: foreign
Added tag(s) patch.

-- 
963254: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963254
963759: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963759
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-26 Thread YunQiang Su
Helmut Grohne  于2020年6月26日周五 上午5:11写道:
>
> On Thu, Jun 25, 2020 at 09:49:01AM +0800, YunQiang Su wrote:
> > Helmut Grohne  于2020年6月24日周三 上午6:30写道:
> > > On Sun, Jun 21, 2020 at 09:10:48PM +0800, YunQiang Su wrote:
> > > > The major problem is  Depends: libgcc-10-dev-i386-cross:amd64 (>=
> > > > 10.1.0-3cross1) but it is not installable
> > > > we need to mark gcc-10-i686-linux-gnu depends on
> > > > libgcc-10-dev-i386-cross:all to solve this problem.
> > >
> > > Can you try applying the attached patch?
> >
> > I don't think that mark gcc-N-triple as MA: foreign is a good idea.
> > It may confuse some user lot: will they try to install gcc-N-triple
> > from non-compliance arch?
>
> Can you elaborate on why you think this is not a good idea? In
> particular, #666743 will also include this change. The patch set has
> been there for quite a while. It would be high time comment on such an
> important aspect.
>
> I'm also confused about which users would be confused by the change. The
> idea is that it doesn't matter which gcc you install. apt will prefer
> the native one. What does "non-compliance" mean in this context?
>
> Did you actually try the patch to see whether it solves your problem?

You patch cannot work:

root@sid-i386:/build# dpkg -i
gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb
libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb
Selecting previously unselected package gcc-10-i686-linux-gnu:amd64.
(Reading database ... 42731 files and directories currently installed.)
Preparing to unpack gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb ...
Unpacking gcc-10-i686-linux-gnu:amd64 (10.1.0-4cross1) ...
Selecting previously unselected package libgcc-10-dev-i386-cross.
Preparing to unpack libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb ...
Unpacking libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
dpkg: dependency problems prevent configuration of gcc-10-i686-linux-gnu:amd64:
 gcc-10-i686-linux-gnu:amd64 depends on libgcc-10-dev-i386-cross (>=
10.1.0-4cross1).

dpkg: error processing package gcc-10-i686-linux-gnu:amd64 (--install):
 dependency problems - leaving unconfigured
Setting up libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
Errors were encountered while processing:
 gcc-10-i686-linux-gnu:amd64

>
> Helmut
>


-- 
YunQiang Su