mishandles prerequists-sources.list on ports architectures

Bug #172609 reported by LaMont Jones on 2007-11-28
16
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
High
Michael Vogt
Gutsy
High
Michael Vogt
Hardy
High
Michael Vogt

Bug Description

Binary package hint: update-manager

The machine in question is an ia64 host which lists only a local mirror in sources.list, and that mirror only has -security and -updates (in addition to the base release), no -backports. The machine _does_ have access to the public network, and is therefore able to access public mirror sites as well.

do-release-update eventually generates /etc/apt/sources.list.d/prerequists-sources.list with the following:
  # sources.list fragment for pre-requists (one with countrymirror, one fallback)
  deb http://us.archive.ubuntu.com/ubuntu feisty-backports main/debian-installer
  #deb http://archive.ubuntu.com/ubuntu feisty-backports main/debian-installer
  # below is just for testing
  #deb http://archive.dogfood.launchpad.net/ubuntu feisty-backports main/debian-installer

However, the correct entry for this machine (being ia64) would be:
  deb http://ports.ubuntu.com/ubuntu-ports feisty-backports main/debian-installer

TEST CASE:
1. install feisty on a hppa or ia64 machine and ensure that update-manager 0.59.25 from feisty-updates gets installed
2. run update-manager
3. watch it fail with the error that it can't fetch the prerequists

4. run update-manager --proposed (to the the upgrader version from gutsy-proposed)
5. watch it work

If you don't have ia64/hppa, you can simulate the problem (best in a VM, its a bit disruptive):
0. modify your /etc/apt/sources.list so that:
    all http://archive.ubuntu.com/ubuntu lines are replaced with "http://ports.ubuntu.com/"
    the deb-src lines removed (or unchanged)
1. start update-manager
2. add the file /etc/apt/apt.conf.d/02_ia64
3. add the line: APT::Architecture "ia64";
    to the file

Its important that update-manager is started before the file that modifies the architecture is added, otherwise update-manager
will not start. The error for the stock update-manager is that its fails to get the prerequists (the problem with the real hardare).
With the fix (the version from -proposed) the update will continue to the point that it displays what packages are obsolete
now but it will stop with "can not calculate the upgrade". That is ok, it can not do that because it can not deal with the already
installed i386 packages that would need to be replaced with ia64 versions.

LaMont Jones (lamont) on 2007-11-28
Changed in update-manager:
assignee: nobody → mvo
importance: Undecided → High
status: New → Confirmed
Michael Vogt (mvo) wrote :
Changed in update-manager:
milestone: none → gutsy-updates
Michael Vogt (mvo) wrote :

To test the fix (before it enter gutsy-proposed) run:
$ cd /tmp
$ wget http://people.ubuntu.com/~mvo/dist-upgrader/gutsy-0.81.1.tar.gz
$ tar xzvf gutsy-0.81.1.tar.gz
$ sudo ./gutsy --mode=server

(mode=server is only needed if you run it on a server install).

Please let me know if it works for you on ia64/hppa.

Thanks,
 Michael

Martin Pitt (pitti) wrote :

Accepted into gutsy-proposed. Please

 - test that the upgrade on ports works now
 - test that the feisty→gutsy upgrade still works on i386
 - upload the fix to hardy

Changed in update-manager:
assignee: nobody → mvo
importance: Undecided → High
status: New → In Progress
LaMont Jones (lamont) wrote :

With 0.81.1:

% more /etc/apt/sources.list.d/prerequists-sources.list.ports
# sources.list fragment for pre-requists of arches living on ports.ubuntu.com
deb http://ports.ubuntu.com/ feisty-backports main/debian-installer

it should read:
deb http://ports.ubuntu.com/ubuntu-ports feisty-backports main/debian-installer

in order to succeed. This leads to:
2007-12-16 10:01:16,234 ERROR Can not find backport 'release-upgrader-apt'

Michael Vogt (mvo) wrote :

Thanks a lot for testing!

I uploaded a update to http://people.ubuntu.com/~mvo/dist-upgrader/gutsy-0.81.2.tar.gz

Could you please give it a try?

Thanks,
 Michael

Changed in update-manager:
milestone: gutsy-updates → ubuntu-8.04-beta
status: Confirmed → Fix Committed
LaMont Jones (lamont) wrote :

The newer version fixes the problem quite nicely.

Thank you.

Martin Pitt (pitti) wrote :

What's the hardy and gutsy status of this?

Michael Vogt (mvo) wrote :

The fix is now in hardy and gutsy-proposed. I will add better verification instructions as well (also it might be trick to find ia64 or hppa machines within the sru-verification team).

Changed in update-manager:
status: Fix Committed → Fix Released
status: In Progress → Fix Committed
Michael Vogt (mvo) wrote :

It turns out that I have spoken too early, the update-manager in gutsy-proposed does not fix the problem. The propper fix is uploaded as 0.81.2 (a couple of days ago) and is waiting for approval.

Thanks,
 Michael

Changed in update-manager:
status: Fix Committed → In Progress
Michael Vogt (mvo) on 2008-01-18
description: updated
Michael Vogt (mvo) wrote :

This adds the missing http://ports.ubuntu.com/ to the list of valid mirrors.

Martin Pitt (pitti) wrote :

Accepted into gutsy-proposed, please test.

Changed in update-manager:
status: In Progress → Fix Committed
Brian Murray (brian-murray) wrote :

I've tried to test that the update-manager version in gutsy-proposed works for updating from Feisty to Gutsy. However, I think there is an issue with the test case.

Running 'update-manager --proposed' doesn't end up using update-manager version 0.81.2 which is the one in gutsy-proposed. Reading through the update-manager changelog I found bug 109290 which is an SRU for the Edgy version of update-manager to support dist upgrades using the release upgrade in -proposed. I don't think this made it into the Feisty version of update-manager though. I've looked at the debdiff and the code and don't see it. Additionally, executing 'do-release-upgrade --propsed' fails.

Michael Vogt (mvo) on 2008-04-14
description: updated
Michael Vogt (mvo) wrote :

The version reported in /var/log/dist-upgrade/main.log is unfortunately incorrect. To verify that you got the right version from -proposed you can run:
$ find /tmp -name "gutsy.tar.gz" -exec md5sum {} \;
c3e213c06aae367192d65a143d9b9014 /tmp/gutsy.tar.gz
c3e213c06aae367192d65a143d9b9014 /tmp/gutsy.tar.gz

and compare the output to the output above.

Brian Murray (brian-murray) wrote :

Using the test case provided I have verified that the version of update-manager in gutsy-proposed no longer receives the 'fails to get prerequisites' error message.

Martin Pitt (pitti) wrote :

Copied to gutsy-updates.

Changed in update-manager:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers