sync-source aborts with ForbiddenAttribute

Bug #121519 reported by Martin Pitt
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Celso Providelo

Bug Description

Since today's LP rollout, sync-source does not work any more:

$ sync-source -b stevenk -f xapian-bindings
Traceback (most recent call last):
  File "/home/lp_archive/bin/sync-source", line 1602, in ?
    main()
  File "/home/lp_archive/bin/sync-source", line 1588, in main
    arguments = init()
  File "/home/lp_archive/bin/sync-source", line 1567, in init
    objectize_options()
  File "/home/lp_archive/bin/sync-source", line 1521, in objectize_options
    Options.tosuite = Options.todistro.currentrelease.name
zope.security.interfaces.ForbiddenAttribute: ('currentrelease', <Distribution at 0x2aaab2908f10>)

and it's not only currentrelease, if I try to circumvent it, it still fails:

$ sync-source -s gutsy -b stevenk -f xapian-bindings
Traceback (most recent call last):
  File "/home/lp_archive/bin/sync-source", line 1602, in ?
    main()
  File "/home/lp_archive/bin/sync-source", line 1588, in main
    arguments = init()
  File "/home/lp_archive/bin/sync-source", line 1567, in init
    objectize_options()
  File "/home/lp_archive/bin/sync-source", line 1522, in objectize_options
    Options.tosuite = Options.todistro.getRelease(Options.tosuite)
zope.security.interfaces.ForbiddenAttribute: ('getRelease', <Distribution at 0x2aaab2908f10>)

Tags: lp-soyuz
Martin Pitt (pitti)
Changed in soyuz:
status: New → Confirmed
Revision history for this message
Julian Edwards (julian-edwards) wrote :

sync-source is still using currentrelease instead of currentseries.

This should have been renamed in Mark's big change from distrorelease to distroseries, I don't know why it got missed.

Revision history for this message
Colin Watson (cjwatson) wrote :

I've fixed this in place in ~lp_archive/bin/sync-source, although the version in RF (or at least the one in codelines/current/) needs to be fixed too.

Revision history for this message
Martin Pitt (pitti) wrote :

remove-package.py suffers from the same bug. I recommend a thorough grep -r currentrelease in RF :-)

Revision history for this message
Celso Providelo (cprov) wrote :

{{{
$grep -n 'currentrelease' -r scripts/
scripts/ftpmaster-tools/archive-cruft-check.py:297: Options.distrorelease = Options.distro.currentrelease.name
scripts/ftpmaster-tools/remove-package.py:270: Options.suite = Options.distro.currentrelease.name
scripts/ftpmaster-tools/sync-source.py:1239: Options.target_suite = Options.target_distro.currentrelease.name
}}}

IFW, they were missed because: 1 - they live in a very unexpected place; 2 - they are not covered by tests.

Revision history for this message
Jonathan Riddell (jr) wrote :

backports-source has the same issue

Revision history for this message
Celso Providelo (cprov) wrote :

Needs in-place fix

Changed in soyuz:
assignee: nobody → cprov
importance: Undecided → Critical
status: Confirmed → Triaged
Revision history for this message
Celso Providelo (cprov) wrote :

backport-source is not even in RF.

Revision history for this message
Celso Providelo (cprov) wrote :

Changes applied in production launchpad-tree, pending migration to scritps outside RF (as backport-source and sync-source).
Changes are going to be merge ASAP in RF and cherrypicked in production officially.

Changed in soyuz:
status: Triaged → In Progress
Revision history for this message
Celso Providelo (cprov) wrote :

RF 4439

Changed in soyuz:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

This affects archive-cruft-check.py as well:

$ archive-cruft-check.py -n
Traceback (most recent call last):
  File "/srv/launchpad.net/codelines/current/scripts/ftpmaster-tools/archive-cruft-check.py", line 23, in ?
    from canonical.launchpad.database import DistroArchReleaseBinaryPackage
ImportError: cannot import name DistroArchReleaseBinaryPackage

This is DistroArchSeriesBinaryPackage now.

Revision history for this message
Celso Providelo (cprov) wrote :

further fixes will be applied via bug 121784.

Revision history for this message
Celso Providelo (cprov) wrote :

Despite of not solving the problem entirely

Changed in soyuz:
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.