Comment 3 for bug 564759

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

So, I can find no legitimate reason for not passing a P-a-s verifier to createMissingBuilds. There are XXX call sites right now which do not do so:

  PackageCloner._create_missing_builds (bug 243252)
  PackageUpload._acceptNonSyncFromQueue (this bug)
  _do_direct_copy (bug 869308)
  InitializeDistroSeries (no bug, but only affects rebuilds done without the cloner, so quite possibly nobody's noticed)

When a pas_verify instance is passed, it's entirely formulaic:

  BuildDaemonPackagesArchSpecific(config.builddmaster.root, distroseries)

Two of these cases (PackageUpload._acceptNonSyncFromQueue and _do_direct_copy) are only operating on a single source upload. For these, I think the fix that would make the most sense would be for createMissingBuilds itself to create a P-a-s parsing instance if it wasn't passed one. I don't think this is realistically going to make things any worse, and it should allow us to remove a bit of duplicated code.

The other two cases involve processing potentially a large number of source packages, so we shouldn't rely on createMissingBuilds implicitly creating a pas_verify instance. In those cases, it's only a line or two of code to create an appropriate instance up-front.