switch to gcc-4.5 and symlinks for default versions

Bug #676454 reported by Marcin Juszkiewicz
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.4-armel-cross (Ubuntu)
Fix Released
Undecided
Unassigned
gcc-4.5-armel-cross (Ubuntu)
Fix Released
Undecided
Unassigned
gcc-defaults-armel-cross (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Now gcc-4.[45]-armel-cross uses update-alternatives to handle which is default. This needs to be changed to follow normal gcc.

Implementation plan:

1. create gcc-defaults-armel-cross which will switch to gcc-4.5: DONE
2. create gcc-defaults-armel-cross which will use symlinks: DONE
3. drop postinst/prerm of gcc-4.[3456]-armel-cross to not use u-a: DONE
4. add preinst of gcc-4.[3456]-armel-cross to remove old u-a: DONE
5. upload newer gcc-4.[45]-armel-cross into archive to get rid of u-a: DONE
6. add conflicts on gcc-4.[45]-armel-cross (versions with u-a) to gcc-defaults-armel-cross packages: DONE
7. upload gcc-defaults-armel-cross into archive: TODO

Tags: patch
Marcin Juszkiewicz (hrw)
Changed in gcc-defaults-armel-cross (Ubuntu):
status: New → In Progress
assignee: nobody → Marcin Juszkiewicz (hrw)
Changed in gcc-4.5-armel-cross (Ubuntu):
assignee: nobody → Marcin Juszkiewicz (hrw)
Changed in gcc-4.4-armel-cross (Ubuntu):
assignee: nobody → Marcin Juszkiewicz (hrw)
Changed in gcc-4.5-armel-cross (Ubuntu):
status: New → Confirmed
Changed in gcc-4.4-armel-cross (Ubuntu):
status: New → Confirmed
Marcin Juszkiewicz (hrw)
Changed in gcc-4.5-armel-cross (Ubuntu):
status: Confirmed → In Progress
Marcin Juszkiewicz (hrw)
Changed in gcc-4.4-armel-cross (Ubuntu):
status: Confirmed → In Progress
description: updated
Marcin Juszkiewicz (hrw)
description: updated
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

This should be done in the preinst instead. Rationale: update-alternatives is part of dpkg, so doesn't require any Pre-Depends; and a dependency (such as the gcc-arm-linux-gnueabi dependency on gcc-4.5-arm-linux-gnueabi) does not prevent one package from being unpacked before the postinst of another package it depends on has been run. So if you do this in the postinst, you get:

 - gcc-4.5-arm-linux-gnueabi unpacked (enforced by the Conflicts: from gcc-arm-linux-gnueabi)
 - gcc-arm-linux-gnueabi unpacked; overwrites /usr/bin/arm-linux-gnueabi-gcc symlink
 - gcc-4.5-arm-linux-gnueabi configured; u-a remove runs, removing the symlink
 - gcc-arm-linux-gnueabi configured - but the gcc symlink is now missing

Otherwise, this looks ok.

Revision history for this message
Matthias Klose (doko) wrote :

please make sure that the maintainer scripts are only modified for the cross-builds, not the native builds

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

This patch removes all postinstall and prerm scripts used to set alternatives for cross toolchain packages. Additionally it adds preinst scripts which use update-alternatives to remove previously set alternatives for cross compiler.

Native build does not used postinst/prerm scripts at all and is not affected. Change will need to be done in gcc-4.[3-6] source packages as they are present in Debian 'sid'. gcc-4.1 is present in squeeze, gcc-4.2 only in lenny and I do not know should they be affected too or not.

tags: added: patch
Marcin Juszkiewicz (hrw)
description: updated
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

gcc-4.4 got released with fixes

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.5-armel-cross - 1.47

---------------
gcc-4.5-armel-cross (1.47) natty; urgency=low

  * "Say good bye to update-alternatives" release - LP: #676454
    - components does not register into u-a anymore - selection of default
      version is now done by gcc-defaults-armel-cross package.
    - bumped gcc-4.5-source to 4.5.2-8~
 -- Marcin Juszkiewicz <email address hidden> Mon, 04 Apr 2011 17:08:46 +0200

Changed in gcc-4.5-armel-cross (Ubuntu):
status: In Progress → Fix Released
Marcin Juszkiewicz (hrw)
Changed in gcc-4.4-armel-cross (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.4-armel-cross - 1.39

---------------
gcc-4.4-armel-cross (1.39) natty; urgency=low

  * "Say good bye to update-alternatives" release - LP: #676454
    - components does not register into u-a anymore - selection of default
      version is now done by gcc-defaults-armel-cross package.
    - bumped requirements to 4.4.5-15 which introduced needed changes
  * fixed path to quilt patches (not present now)
  * provide only required packages without libraries which are provided from
    gcc 4.5/4.6 packages
  * use PKG_IGNORE_CURRENTLY_BUILDING instead of NO_PKG_MANGLE to get -dbgsym
    packages - LP: #711523
  * drop old, not used code to regenerate debian/control
  * change dependencies to Debian ones
 -- Marcin Juszkiewicz <email address hidden> Fri, 01 Apr 2011 12:02:56 +0200

Changed in gcc-4.4-armel-cross (Ubuntu):
status: Fix Committed → Fix Released
Marcin Juszkiewicz (hrw)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-defaults-armel-cross - 1.5

---------------
gcc-defaults-armel-cross (1.5) natty; urgency=low

  * "Say good bye to update-alternatives" release - LP: #676454
    - components does not register into u-a anymore - selection of default
      version is now done by gcc-defaults-armel-cross package.
 -- Marcin Juszkiewicz <email address hidden> Fri, 15 Apr 2011 16:01:49 +0300

Changed in gcc-defaults-armel-cross (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.