extends downloads multiple times from same url

Bug #717802 reported by Rafael Monnerat
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

When a URL is used into extends (into some cfg), zc.buildout downloads multiple times the same configuration in the same run if the url is extended into 2 other diferent configuration files.

Example:

-- buildout.cfg content --
[buildout]
extends =
  http://url/to/file.cfg
  http://url/to/file2.cfg

-- http://url/to/file.cfg content --
[buildout]
extends =
  http://url/to/sample1.cfg

-- http://url/to/file2.cfg content --
[buildout]
extends =
  http://url/to/sample1.cfg

The file at http://url/to/sample1.cfg is downloaded twice by zc.buildout for every buildout run, and the download should happens only once per url.

This problem seems to happens due recursivity implemented into zc.buildout.buildout._open that does not consider that a url was already downloaded in same buildout run. I attached a patch which fix this issue and "download only once each url" per run.

Revision history for this message
Rafael Monnerat (rafael-nexedi) wrote :
Revision history for this message
Rafael Monnerat (rafael-nexedi) wrote :

Include a patch with a test for this bug.

This test also test https://bugs.launchpad.net/zc.buildout/+bug/717730

Revision history for this message
Rafael Monnerat (rafael-nexedi) wrote :

Included a fix and test for when a relative url is used in extends.

Example:

-- buildout.cfg content --
[buildout]
extends =
  http://url/to/file.cfg
  http://url/to/file2.cfg
  http://url/to/file3.cfg

-- http://url/to/file.cfg content --
[buildout]
extends =
  http://url/to/sample1.cfg

-- http://url/to/file2.cfg content --
[buildout]
extends =
  http://url/to/sample1.cfg

-- http://url/to/file3.cfg content --
[buildout]
extends =
  sample1.cfg

In this case, http://url/to/sample1.cfg should be downloaded only once too.

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.