[api] need URLs to binary changes, build output files

Bug #415583 reported by Kees Cook
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Muharem Hrnjadovic

Bug Description

While attempting to convert the ubuntu-security publication LP HTML-parser to the LP API, I found several things that are not exposed to the API that we need:

- source_package_publishing_history needs links to all of the source input files (e.g. .dsc, .diff.gz, .tar.gz, etc URLs)
  - we currently scrape the "Package files" section for the .dsc, .diff.gz, .tar.gz shown in +archive/ppa/+sourcepub/NNN/+listing-archive-extra

- binary_package_publishing_history needs links to all of the build output files (e.g. .changes, .deb, .udeb, etc URLs)
  - we currently scrape the "Package files" section for the .debs shown in +archive/ppa/+sourcepub/NNN/+listing-archive-extra
  - we currently scrape the "Changes file" section for .changes files shown in +archive/ppa/+build/NNN

It would also be nice to have an easier-to-find answer to the "is this an arch-all package?" question. It seems that from the API, this is answered by:
  arch_all = False
  for src in archive.getPublishedSources(source_name=pkg_name, status='Published'):
    for bin in src.getPublishedBinaries():
      if bin.distro_arch_series.is_nominated_arch_indep:
        arch_all = True

This is rather "expensive", I would hope for replacing the last three lines with:
    if src.is_arch_indep:
      arch_all = True

Revision history for this message
Kees Cook (kees) wrote :

It would also be nice to be able to fetch private files without needing to resort to browser cookies (e.g. use the existing API credentials to fetch the source.changes file).

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Kees, as I understand it it's pretty impossible right now to do that in the API, it doesn't really handle that sort of thing as it's a ReSTful API. It will be better if we can join the API session_secret to the webapp's auth cookie somehow.

Changed in soyuz:
importance: Undecided → High
milestone: none → 3.1.10
status: New → Triaged
Revision history for this message
Michael Bienia (geser) wrote :

For the first point (accessing source files from API), there is already bug #394827.

tags: added: api
Changed in soyuz:
assignee: nobody → Muharem Hrnjadovic (al-maisan)
tags: added: oem-services
Changed in soyuz:
milestone: 3.1.10 → 3.1.11
Changed in soyuz:
status: Triaged → In Progress
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in soyuz:
status: In Progress → Fix Committed
Changed in soyuz:
status: Fix Committed → Fix Released
Revision history for this message
Kees Cook (kees) wrote :

Muharem: btw, thank you very much for this. We finally moved our main scraper to the API. We're so very close to be 100% API. :) I've opened bug 498079 for the last remaining missing bit (I think binary changes files were accidentally overlooked when implementing this bug's feature list).

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.