[pbuilder-dist] hardcodes the mirrors to use

Bug #824285 reported by Martin Pool
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Fix Released
Medium
Unassigned
Declined for Lucid by Stefano Rivera

Bug Description

I have a nearby Ubuntu mirror set up in /etc/pbuilderrc, but pbuilder-dist seems to always override this and use archive.ubuntu.com. It looks like this is intentional in the script, but is it really a good idea?

Tags: patch
Benjamin Drung (bdrung)
summary: - pbuilder-dist always uses archive.ubuntu.com
+ [pbuilder-dist] always uses archive.ubuntu.com
Benjamin Drung (bdrung)
Changed in ubuntu-dev-tools (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: [pbuilder-dist] always uses archive.ubuntu.com

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

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

I was nearly pulling my hair out before realising that I'm hitting the same bug as you are.

No, this is absolutely not a good idea and the behaviour should be changed. I was using "pbuilder-dist login --save-after-login" for god know how many times trying to get the tool to switch from using ftp to http for sid. This was very important because http traffic is cached here. How was I supposed to know that pbuilder-dist doesn't care about my explicit instructions? Please change this.

summary: - [pbuilder-dist] always uses archive.ubuntu.com
+ [pbuilder-dist] hardcodes the mirrors to use
Rolf Leggewie (r0lf)
Changed in ubuntu-dev-tools (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Mathieu Parent (math-parent) wrote :

The attached patch adds support for 'MIRRORSITE' env var.

Doc still to do.

Revision history for this message
Mathieu Parent (math-parent) wrote :

Doc patch for the above patch.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Can we use the same mirror configuration that other tools use? See ubuntu-dev-tools(5)

Revision history for this message
Mathieu Parent (math-parent) wrote :

OK. I was using the one from pbuilderrc.

I will provide a new patch with UBUNTUTOOLS_DEBIAN_MIRROR and UBUNTUTOOLS_UBUNTU_MIRROR.

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

The attachment "Proposed solution" 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-sponsors 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
Mathieu Parent (math-parent) wrote :

Here is an updated patch

Revision history for this message
Martin Pool (mbp) wrote :

@math-parent (nice nick) Patch v2 looks ok to me.

I don't care which variable is used as long as there is at least one. But, I've got to say, pace stefanor, it is weird to have something in the pbuilder package not respect pbuilderrc.

Revision history for this message
Mathieu Parent (math-parent) wrote :

@mbp: I can provide a patch that uses both env. But which one should be used first?

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 824285] Re: [pbuilder-dist] hardcodes the mirrors to use

Personally, either order is fine.

Revision history for this message
Stefano Rivera (stefanor) wrote :

That sounds good. I suggest using ubuntutools.config, which can easily handle the ubuntu-dev-tools style config, and what it calls "compat_keys"

Revision history for this message
Mathieu Parent (math-parent) wrote :

New patch that supports both UBUNTUTOOLS_{DEBIAN,UBUNTU}_MIRROR and MIRRORSITE.

It also adds support for OTHERMIRROR.

Revision history for this message
Martin Pool (mbp) wrote :

A cleaner way to write that in Python would be

arguments.append(['--mirror',
    os.environ.get('UBUNTUTOOLS_DEBIAN_MIRROR',
        os.environ.get('MIRRORSITE',
           'http://ftp.debian.org/debian'))])

aside from that, +1 from me.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Thanks Mathieu. I'll adapt your patch to use ubuntutools.config.

Changed in ubuntu-dev-tools (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Why was this ticket declined for lucid (and without further comment! :-( )?

Revision history for this message
Stefano Rivera (stefanor) wrote :

Because the implementation in lucid would be different, and we'll have a new LTS out soon, anyway.

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

This bug was fixed in the package ubuntu-dev-tools - 0.135

---------------
ubuntu-dev-tools (0.135) unstable; urgency=low

  * grab-merge: Use wget -nv rather than -q, so that we see error messages
    (LP: #881967)
  * requestsync: Make --lp the default.
  * submittodebian: Use prettier patch filenames (LP: #887333)
  * mk-sbuild:
    -Allow creating experimental chroots again (LP: #885499)
    - experimental shouldn't be the default in experimental chroots.
    - Add --eatmydata flag (LP: #888440)
  * pbuilder-dist:
    - Support using non-master mirrors. Thanks Mathieu Parent. (LP: #824285)
    - Enable non-release pockets by default (LP: #781003)
  * New scripts:
    - reverse-depends: Replaces reverse-build-depends. Uses an UbuntuWire
      webservice for determining all reverse(-build)-dependencies for a
      package. (LP: #696373)
    - requestbackport: Files a backport request bug report, including a full
      testing checklist.
  * Don't allow boilerplate prompts through in submittodebian and requestsync
    (LP: #887336)
  * Add changelog retrieval to lpapicache, and use this in syncpackage and
    requestsync. The changelogs should be available in Launchpad sooner than
    Debian PTS.

 -- Stefano Rivera <email address hidden> Tue, 15 Nov 2011 01:51:36 +0200

Changed in ubuntu-dev-tools (Ubuntu):
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.