Debian::AptContents doesn't correctly source apt-file contents files

Bug #1004080 reported by Giles Westwood
44
This bug affects 6 people
Affects Status Importance Assigned to Milestone
dh-make-perl (Ubuntu)
In Progress
Undecided
Unassigned

Bug Description

On precise.

AptContents.pm

    return map
        { $host . "_" . join( "_", $dir || (), "dists", $dist, $_ ) }
        @components;

returns gb.archive.ubuntu.com_ubuntu_dists_precise_main

When processing a line from the sources.list e.g.

deb http://gb.archive.ubuntu.com/ubuntu/ precise main

but apt-file actually creates a Contents file without main

gb.archive.ubuntu.com_ubuntu_dists_precise_Contents-amd64.gz

This causes the apt-file dependency management to fail.

So either apt-file or AptContents are wrong, they don't share a single library for parsing the sources.list file. apt-file uses:-

sub parse_sources_list($) {

##########################

A config only workaround to anyone who has this problem is to create a ~/.apt-file.conf

with

destination = <host>_<path>_dists_<dist>_main_Contents-<arch>.gz

or just to rename the files to include the components.

Tags: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dh-make-perl (Ubuntu):
status: New → Confirmed
Revision history for this message
Lasse Makholm (lasse-makholm) wrote :

Attached patch seems to fix it for me. It assumes that it's OK for repo_source_to_contents_paths() to generate paths that might not all exist - don't know if that can cause problems... Seems to work.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Sean Whitney (sean-whitney) wrote :

The patch supplied by Lasse works for me too.

Revision history for this message
gregor herrmann (gregoa) wrote :

I've committed Lasse's patch to the dh-make-perl git repo now, should be fixed in the next release.

http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/dh-make-perl.git;a=commitdiff;h=aa2facfcf73dbe7cbcdaa83a26049785943d963b

Revision history for this message
gregor herrmann (gregoa) wrote :

patch committed in git

Changed in dh-make-perl (Ubuntu):
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Patches

Remote bug watches

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