given binary package and version, is it possible to obtain source package and version?

Asked by Scott Moser

Heres the problem I'm trying to solve:
  I have a manifest of a UEC image [1]. The manifest contains a list of all binary packages installed and their version. I want to compare two manifests to see what has changed between them. Then, for each change, I want to grab changelogs and show only the differences. The images contain only packages in main, and only the release, -updates or -security pockets.
  So, I'm given:
bin-package-A bin-version-X
bin-package-A bin-version-Y
  and the knowledge that all binary packages listed came from main and were in a pocket release, -updates, or -security.

  At the point when I compare these manifests, it is possible that neither bin-version-X nor bin-version-Y are still available in the archive (ie, they could have come from -updates or -security and been replaced).

  That leaves me with 2 problems that are not easily solved
1.) what source package built the bin-package:bin-version combinations above
2.) what source version built the bin-package:bin-version combinations above

'1' is doable using apt if binary-A exists by that name in the archive now, and you assume it did not change source packages.
But I don't see any way to do it at all in launchpadlib.

'2' is more difficult as bin-version does not necessarily equal source-version. It is necessary because changelogs show source-versions, not binary-versions. (see binary package dmsetup built by source lvm2 [2])

I cant seem to find anyway to do this if the binary packages are not in the archive at the moment.

For an example of the problem, consider the following that existed during maverick development:
  source: lvm2 2.02.54-1ubuntu4
  binary: dmsetup 2:1.02.39-1ubuntu4

The full problem is to find changelog differences that would be relevant for a change from a binary package 'dmsetup 2:1.02.39-1ubuntu4' to 'dmsetup 2:1.02.39-1ubuntu6'. The issue in '2' is just to determine what source the dmsetup binary came from.

from launchpadlib.launchpad import Launchpad

| src = "lvm2"
| src_ver = "2.02.54-1ubuntu4"
| bin = "dmsetup"
| bin_ver = "2:1.02.39-1ubuntu4"
| arch = "amd64"
| cachedir = "/tmp/mytest"
|
| lp = Launchpad.login_anonymously('just testing', 'production', cachedir)
| u = lp.distributions['ubuntu']
| archive = u.main_archive
| builds = archive.getBuildRecords(source_name='lvm2')
| arch_builds = [b for b in builds if b.arch_tag = arch]

now i have 'arch_builds' which are all amd64 builds of lvm2
I can go through build.current_source_publication_link to get a
source_package_publishing_history and then getPublishedBinaries()
on that.
a.) This is going to be hard on launchpad.
b.) I would have to walk all the builds to get this, and it seems that
    current_source_publication is empty for any build not currently in
    the archive. So, for any build that is no longer in the archive, I cannot
    see a way I can get at the PublishedBinaries()

So, I can't find a way to get what I want.

Anyone able to help?

--
[1] http://uec-images.ubuntu.com/releases/lucid/release/ubuntu-10.04-server-uec-amd64.manifest
[2] https://launchpad.net/ubuntu/+source/lvm2

Question information

Language:
English Edit question
Status:
Expired
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Whiteboard:
Retargeting to a team that can answer the question.
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Martin Pool (mbp) said :
#2

It seems like this question is mostly about limits in the lp api, which go a bit out of my depth. But it looks like it's mostly about Soyuz and not specific to building from branches?

Revision history for this message
Martin Pool (mbp) said :
#3

reopen onto soyuz

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.