Package: gcc-4.9-doc
Version: 4.9.1-3
Severity: important
Justification: fails M-A release goal

Hi,

if I want to install the gcc-doc:i386 package on a system where
i386 is a foreign architecture (amd64 or x32; especially impor‐
tant on the latter which does not have a non-free repository of
its own), it fails to install:

tglase@tglase:~ $ sudo apt-get install gcc-doc
[sudo] password for tglase:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) gcc-doc [ i386 ] < none -> 5:4.9.1-3 > ( contrib/doc )
Broken gcc-doc:i386 Depends on gcc-4.9-doc [ i386 ] < none > ( none ) (>= 
4.9.1-2)
Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gcc-doc:i386 : Depends: gcc-4.9-doc:i386 (>= 4.9.1-2) but it is not installable
E: Unable to correct problems, you have held broken packages.

This is a bit surprising, because gcc-4.9-doc is arch:all AFAICT:

tglase@tglase:~ $ apt-cache policy gcc-4.9-doc gcc-doc
gcc-4.9-doc:
  Installed: 4.9.1-3
  Candidate: 4.9.1-3
  Version table:
 *** 4.9.1-3 0
        500 http://ftp.de.debian.org/debian/ sid/non-free all Packages
        100 /var/lib/dpkg/status
gcc-doc:i386:
  Installed: (none)
  Candidate: 5:4.9.1-3
  Version table:
     5:4.9.1-3 0
        500 http://mirror.lan.tarent.de/debian/ sid/contrib i386 Packages
        500 http://ftp.de.debian.org/debian/ sid/contrib i386 Packages

I think the problem here is that gcc-doc is not arch:all but of a
foreign architecture, and this foreign-ness is inherited by the
arch:all gcc-4.9-doc package, because all !arch:all packages that
gcc-4.9-doc depends on must also be installed from i386 unless
marked as M-A: foreign. Hence, gcc-4.9-doc itself must be marked
M-A: foreign, to lose this property.

Manual hack:

$ apt-get download gcc-4.9-doc
$ sudo dpkg -i gcc-4.9-doc_4.9.1-3_all.deb
$ sudoedit /var/lib/dpkg/status # this WILL break your system ;)

Search for a line 「Package: gcc-4.9-doc」 and append a line
「Multi-Arch: foreign」 directly below it. Then, search the
version line – in my case 「Version: 4.9.1-3」, and append a
sole dot behind it: 「Version: 4.9.1-3.」 (this makes APT not
fulfil the package’s dependencies from the list in the repo
but from the local entry, because the local version is newer).
Save and exit the editor. Then rejoice:

tglase@tglase:~ $ sudo apt-get install gcc-doc                                  
                           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following NEW packages will be installed:
  gcc-doc:i386
0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
Need to get 5274 B of archives.
After this operation, 7168 B of additional disk space will be used.
Get:1 http://mirror.lan.tarent.de/debian/ sid/contrib gcc-doc i386 5:4.9.1-3 
[5274 B]
Fetched 5274 B in 0s (62.3 kB/s)        
Selecting previously unselected package gcc-doc.
(Reading database ... 216864 files and directories currently installed.)
Preparing to unpack .../gcc-doc_5%3a4.9.1-3_i386.deb ...
Unpacking gcc-doc (5:4.9.1-3) ...
Processing triggers for man-db (2.7.0.2-2) ...
Processing triggers for install-info (5.2.0.dfsg.1-5) ...

This shows that adding “M-A: foreign” to gcc-*-doc is correct fix.

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to