generate-contents-files.py ignores the release pocket

Bug #771727 reported by William Grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Jeroen T. Vermeulen

Bug Description

generate-contents-files.py does this:

    def getPocketSuffixes(self):
        """Query the distribution's pocket suffixes."""
        return self.queryDistro("pocket_suffixes").split()

But the suffix for Release is '', so split only returns suffixes for non-Release pockets.

Related branches

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

As it turns out, it's not the split() that does it. LpQueryDistro deliberately doesn't even return the empty pocket suffix.

Disaster strikes in this bit of shell script that I converted incorrectly:

# Combine all supported series with all pocket suffixes to build the list
# of suites for which we will generate/update Contents.gz.
new_suites=
for suite in $suites; do
  new_suites="${new_suites:+$new_suites }$suite"
  for pocket_suffix in $pocket_suffixes; do
    if [ -d "$ARCHIVE/ubuntu/dists/$suite$pocket_suffix" ]; then
      new_suites="$new_suites $suite$pocket_suffix"
    fi
  done
done
suites="$new_suites"

This adds the $suite to $new_suites, and then for each non-empty pocket suffix adds $suite$pocket_suffix to $new_suites.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

One simple fix is to go into lp.archivepublisher.scripts.generate_contents_files.GenerateContentsFiles and make getPocketSuffixes return pocketsuffix.values() instead of building it in top of queryDistro. That'll be another pain point when we make pockets dynamic, but that's a drop in a bucket.

tags: added: derivation
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.05
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad:
status: Fix Committed → 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.