Metalink md5sum check fails due to change in format

Bug #1080964 reported by bcbc
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CD Images

Bug Description

When Wubi downloads or checks an ISO, it first downloads the metalink file and the associated MD5SUMS (and .gpg file). The format of this file has changed since 12.10 and this means Wubi cannot validate it anymore. I guess the difference is that the MD5SUM is generated with the -b option (which adds the *) and Wubi fails to extract the correct md5sum from the file now. Since the metalink file is not a binary file, the bug might not be in Wubi, but rather in the generation of the MD5SUMS itself.

For example, in 12.04 it looks like this:
642624ef99acfc3135b614aa8513dfb5 ubuntu-12.04.1-alternate-amd64.metalink
018a6e8d27af1311a9037e912e927f7c ubuntu-12.04.1-alternate-i386.metalink
3dd7fc6bd982b0b064df19b8b0a725db ubuntu-12.04.1-desktop-amd64.metalink
dbf554af89362d4eae7125294a8a61ee ubuntu-12.04.1-desktop-i386.metalink
2b9e106f1fd2f37fff27c9177aa8e487 ubuntu-12.04.1-server-amd64.metalink
eb79491af8c4ff3b6e8f70bb4b180bcc ubuntu-12.04.1-server-i386.metalink

But in 12.10 it looks like this:
1fdde0057923dc6c4bd69b657480a631 *ubuntu-12.10-beta2-desktop-amd64+mac.metalink
091d4adafcfe4eea08eb41771be3f3ba *ubuntu-12.10-beta2-desktop-amd64.metalink
940ab0bf82879435181f8c03304e7387 *ubuntu-12.10-beta2-desktop-armhf+omap4.metalink
9e0ad0a15414df437a27c66da938d3e3 *ubuntu-12.10-beta2-desktop-i386.metalink
4672b67404c84ba74bf104607bbec49a *ubuntu-12.10-beta2-server-amd64+mac.metalink
a8d35d8579f11579e802667bbcb7b0fb *ubuntu-12.10-beta2-server-amd64.metalink
fb6219893d9f4f329183fafaac258681 *ubuntu-12.10-beta2-server-armhf+omap4.metalink
12fbf5ccf3aedfd8fe31f1ab00ec8ddb *ubuntu-12.10-beta2-server-i386.metalink
e1a7672decc21eb6a65464b0a239a1db *ubuntu-12.10-desktop-amd64+mac.metalink
894437367bf791cf02902d6f5285af98 *ubuntu-12.10-desktop-amd64.metalink
57a58f151b50e218acc4724388d2f387 *ubuntu-12.10-desktop-armhf+omap4.metalink
11e206f0d5e147fe05b9e85d78f5f187 *ubuntu-12.10-desktop-i386.metalink
fc37a124ca1957d7549a296d59e3dd81 *ubuntu-12.10-server-amd64+mac.metalink
35afee005d732a9ad0361b4aae25e3c3 *ubuntu-12.10-server-amd64.metalink
68adfc9d71d5b3613a09c3e6c45f8ba5 *ubuntu-12.10-server-armhf+omap4.metalink
c4fd126394cf2e1bbd626b5f74b3e40b *ubuntu-12.10-server-i386.metalink

The actual code in /home/bcbc/wubi/src/wubi/backends/common/ reads as follows:
        md5sums = dict([reversed(line.split()) for line in md5sums.split('\n') if line])
        md5sum = md5sums.get(os.path.basename(metalink))

The first line creates the md5sums dictionary:
{... '*ubuntu-12.10-desktop-amd64.metalink': '894437367bf791cf02902d6f5285af98' ...}
And the second reads the entry with key: ubuntu-12.10-desktop-amd64.metalink (which returns None) and compares the value to the actual md5sum and fails.

This is not a breaking bug. It just believes the file is corrupted, but continues to run.

Tags: quantal
bcbc (bcbc)
description: updated
Changed in wubi:
importance: Undecided → Medium
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.