SHA1-based copy checking breaks when there are expired sources in the target

Bug #575426 reported by Jonathan Riddell on 2010-05-04
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Critical
Steve Kowalik

Bug Description

I can copy-package.py from cocoplum to copy a package from a private PPA to a public one and it broke

lp_archive@cocoplum:~$ copy-package.py -p kubuntu-ninjas -b -s lucid --to-suite=lucid --to-ppa=kubuntu-ppa --to-ppa-name=ppa kde4libs -y
2010-05-04 21:38:01 INFO Creating lockfile: /var/lock/launchpad-copy-package.lock
2010-05-04 21:38:08 INFO FROM: kubuntu-ninjas: lucid-RELEASE
2010-05-04 21:38:08 INFO TO: kubuntu-ppa: lucid-RELEASE
2010-05-04 21:38:08 INFO Copy candidates:
2010-05-04 21:38:08 INFO kde4libs 4:4.4.3-0ubuntu1~ppa1 in lucid
2010-05-04 21:38:08 INFO kdelibs-bin 4:4.4.3-0ubuntu1~ppa1 in lucid amd64
2010-05-04 21:38:08 INFO kdelibs-bin 4:4.4.3-0ubuntu1~ppa1 in lucid i386
2010-05-04 21:38:08 INFO kdelibs5 4:4.4.3-0ubuntu1~ppa1 in lucid amd64
2010-05-04 21:38:08 INFO kdelibs5 4:4.4.3-0ubuntu1~ppa1 in lucid i386
2010-05-04 21:38:08 INFO kdelibs5-data 4:4.4.3-0ubuntu1~ppa1 in lucid amd64
2010-05-04 21:38:08 INFO kdelibs5-data 4:4.4.3-0ubuntu1~ppa1 in lucid armel
2010-05-04 21:38:08 INFO kdelibs5-data 4:4.4.3-0ubuntu1~ppa1 in lucid i386
2010-05-04 21:38:08 INFO kdelibs5-data 4:4.4.3-0ubuntu1~ppa1 in lucid ia64
2010-05-04 21:38:08 INFO kdelibs5-data 4:4.4.3-0ubuntu1~ppa1 in lucid powerpc
2010-05-04 21:38:08 INFO kdelibs5-data 4:4.4.3-0ubuntu1~ppa1 in lucid sparc
2010-05-04 21:38:08 INFO kdelibs5-dbg 4:4.4.3-0ubuntu1~ppa1 in lucid amd64
2010-05-04 21:38:08 INFO kdelibs5-dbg 4:4.4.3-0ubuntu1~ppa1 in lucid i386
2010-05-04 21:38:08 INFO kdelibs5-dev 4:4.4.3-0ubuntu1~ppa1 in lucid amd64
2010-05-04 21:38:08 INFO kdelibs5-dev 4:4.4.3-0ubuntu1~ppa1 in lucid i386
2010-05-04 21:38:08 INFO libplasma3 4:4.4.3-0ubuntu1~ppa1 in lucid amd64
2010-05-04 21:38:08 INFO libplasma3 4:4.4.3-0ubuntu1~ppa1 in lucid i386
Traceback (most recent call last):
  File "/srv/launchpad.net/codelines/current/scripts/ftpmaster-tools/copy-package.py", line 19, in <module>
    script.lock_and_run()
  File "/srv/launchpad.net/codelines/soyuz-production-rev-9329/lib/lp/services/scripts/base.py", line 280, in lock_and_run
    implicit_begin=implicit_begin, isolation=isolation)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-9329/lib/lp/services/scripts/base.py", line 238, in run
    self.main()
  File "/srv/launchpad.net/codelines/soyuz-production-rev-9329/lib/lp/soyuz/scripts/ftpmasterbase.py", line 302, in main
    self.mainTask()
  File "/srv/launchpad.net/codelines/soyuz-production-rev-9329/lib/lp/soyuz/scripts/packagecopier.py", line 752, in mainTask
    self.options.include_binaries, self.allow_delayed_copies)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-9329/lib/lp/soyuz/scripts/packagecopier.py", line 481, in do_copy
    copy_checker.checkCopy(source, destination_series, pocket)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-9329/lib/lp/soyuz/scripts/packagecopier.py", line 407, in checkCopy
    self._checkArchiveConflicts(source, series)
  File "/srv/launchpad.net/codelines/soyuz-production-rev-9329/lib/lp/soyuz/scripts/packagecopier.py", line 345, in _checkArchiveConflicts
    sha1 = library_file.content.sha1
AttributeError: 'NoneType' object has no attribute 'sha1'

OOPS-1586C2359 as an example.

William Grant (wgrant) wrote :

This is going to break any copies where the target archive has expired sources with the same name. In that case we will have to relax the check -- the SHA1 data is actually gone from the DB! That's pretty bad, but I don't think there's much choice.

summary: - copy-package broken
+ SHA1-based copy checking breaks when there are expired sources in the
+ target
Changed in soyuz:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Steve Kowalik (stevenk)
Max Bowsher (maxb) wrote :

Also affects copies done from public->public PPA in the web UI, with the traceback of:
http://pastebin.ubuntu.com/428588/

tags: added: ppa
Steve Kowalik (stevenk) wrote :

I have a branch underway that will fix this bug. Once I have it squared away, I'll be organising a CP to fix it quickly.

Steve Kowalik (stevenk) on 2010-05-06
Changed in soyuz:
status: Triaged → In Progress
tags: added: oops
description: updated
Changed in soyuz:
status: In Progress → Fix Released
milestone: none → 10.05
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions