text stringlengths 15 499 |
|---|
[09:34] <bigjools> it's tying everything into a single archive |
[09:35] <jml> bigjools, I don't see how we can avoid that. |
[09:35] <BjornT_> bigjools: i don't see how we could get the right archive, though. all we have is a distribution/distroseries and a source package name |
[09:35] <jml> BjornT_, in my case, I also have a pocket. |
[09:35] <jml> and a pocketful of broken dreams |
[09:35] <jml> but I don't plan on using them. |
[09:35] <bigjools> jml, BjornT_: you have to decide which archive you're uploading to, simple fact. In most cases it's IDistribution.main_archive |
[09:36] <bigjools> but there's no way that should go in the security adapter |
[09:36] <bigjools> hard-coded I mean |
[09:36] <wgrant> Something like latest_published_archive seems to make sense. |
[09:36] <wgrant> Which will be either primary or partner. |
[09:37] <bigjools> I don't think it does |
[09:37] <jml> bigjools, ok. so how about this: |
[09:37] <wgrant> How is it significantly different from latest_published_component? |
[09:37] <jml> bigjools, I add a method / function / whatever, |
[09:37] <jml> bigjools, it takes an ISourcePackage, an IPerson and an optional IArchive |
[09:38] <jml> if IArchive is None, it gets it from source_package.distribution.main_archive or whatever is a sane default. |
[09:38] <jml> then it does the black handwavey magic that I'm slowly beginning to understand |
[09:39] <jml> bigjools, because, in the design of Bugs and Code, there's absolutely know way of knowing the archive beyond that. |
[09:39] <jml> no way. |
[09:39] * jml was correcting spelling, rather than adding emphasis |
[09:39] <bigjools> :) |
[09:39] <bigjools> so |
[09:40] <jml> basically all I've got to work with is the stuff in this string: 'lp:ubuntu/karmic-backports/openssh' |
[09:40] <bigjools> at some point, you're going to have source package branches and bugs linked to PPAs |
[09:40] <bigjools> you don't right now, so assuming main_archive is fine |
[09:41] <lifeless> I'd say the per team package branch would map to that team/persons PPA |
[09:41] <bigjools> but don't hack that into soyuz code *please* |
[09:41] <lifeless> e.g. my subunit branches |
[09:41] <bigjools> yes, either way there's an archive involved |
[09:42] <jml> bigjools, I was thinking a method on ISourcePackage, actually. that leaves the assumption at quite a high level, and in exactly one place. |
[09:42] <bigjools> wgrant: latest_published_component works because packages are not generally in more than one distro archive at once |
[09:42] <BjornT_> bigjools: it feels like there should be some object representing a package in a PPA (or rather, a package in a specific archive), no? |
[09:42] <wgrant> bigjools: More than one distro component, you mean? |
[09:42] <bigjools> no, archive |
[09:43] <jml> BjornT_, that sounds right to me. |
[09:43] <jml> (or at least a good question) |
[09:43] <al-maisan> for anything that starts with 'lp:ubuntu/..' you'd take the corresponding main_archive; for anything that begins with 'lp:~user/..' you'd fall back to the respective PPA (how about users with multiple PPAs though?) |
[09:43] <bigjools> BjornT_: that's called a publication |
[09:43] <wgrant> bigjools: How's the archive presence relevant to latest_published_component? |
[09:43] <BjornT_> bigjools: isn't that tied to a specific version of the package? |
[09:44] <bigjools> wgrant: because when you're looking for the publications, it needs an archive a well |
[09:44] <bigjools> BjornT_: right |
[09:44] <wgrant> bigjools: Oh, true. |
[09:45] <BjornT_> bigjools: what i'm looking for is something like ISourcePackage, or maybe even IDistributionSourcePackage. maybe they should be extended to know which archive they belong to. |
[09:45] <al-maisan> I should say for 'lp:<distro>/..' one should take the main_archive .. |
[09:46] <bigjools> ISourcePackage should really be named IDistroSeriesSourcePackage ! |
[09:47] <bigjools> let me think about it for a moment |
[09:53] <maxb> How do you properly clean a launchpad source tree, including linked sourcedeps? |
[09:54] <bigjools> jml: ok I have a plan |
[09:54] <bigjools> maxb: make clean does all of that apart from removing the links |
[09:54] <bigjools> which I don't think anything does |
[09:55] <jml> bigjools, I'm all ears. |
[09:55] <bigjools> jml: we need ISourcePackage.lastest_published which will return a publication |
[09:55] <bigjools> then you can do spph.component and spph.archive |
[09:55] <bigjools> without duplicating queries |
[09:56] <jml> what kind of object is a publication, an IPublication? |
[09:56] <bigjools> jml: ISourcePackagePublishingHistory |
[09:56] <jml> golly. |
[09:56] <jml> I can see why you said 'publication' the first time :) |
[09:57] <bigjools> lol |
[09:57] <wgrant> At least there isn't still a SecureSourcePackagePublishingHistory still in wide use, although it does seem to still exist :( |
[09:57] <bigjools> jml: and reviewers always say to us "why are you using spph as a variable name?" |
[09:57] <bigjools> wgrant: yes, it needs ripping out |
[09:57] <bigjools> I tried once, and ended up in a world of pain |
[09:58] <bigjools> jml: does it make sense to you? |
[09:59] <jml> bigjools, ummm. let's go through this again from the top |
[09:59] <bigjools> okay |
[09:59] <jml> bigjools, I get the latest_published |
[10:00] <jml> bigjools, then I ...? |
[10:00] <bigjools> can I assume that you have an ISourcePackage already? |
[10:00] <wgrant> (I'm glad DistroArchSeriesBinaryPackageRelease isn't spelt out in full) |
[10:00] <jml> bigjools, yes! |
[10:00] <jml> bigjools, branch.sourcepackage :) |
[10:00] <bigjools> poifekt |
[10:00] <bigjools> so |
[10:01] <bigjools> add a new property to it, latest_published (trivial, just return self._getFirstPublishingHistory |
[10:01] <bigjools> then you have in your hands a component and an archive |
[10:02] <bigjools> this could be encapsulated inside IArchive.canUpload() |
[10:02] <bigjools> if you pass it an ISourcePackage |
[10:02] <bigjools> the only thing canUpload doesn't check is packageset permissions, I think I need to ask al-maisan why he didn't change it to do that ... |
[10:03] <al-maisan> bigjools: it does .. actually. |
[10:03] * al-maisan checked the sources. |
[10:03] <bigjools> it does? great! |
[10:04] <bigjools> al-maisan: but I can't see where |
[10:04] <al-maisan> bigjools: what eventually gets called is IArchive.getPermissions() and that does the right thing. |
[10:05] <bigjools> yes, I see it now |
[10:05] <bigjools> fab |
[10:05] <bigjools> jml: so that's it, are you comfortable with it? |
[10:05] <jml> bigjools, comfortable enough to start, I think. |
[10:06] <bigjools> jml: oh actually you can't put it in canUpload |
[10:06] <bigjools> d'oh |
[10:06] <bigjools> but it's still easy |
[10:06] <jml> I was thinking maybe having a canUploadTo on ISourcePackage or something |
[10:06] <jml> something will fall out anyway |
[10:07] <bigjools> jml: canUploadToArchive would be good |
[10:07] <jml> *nod* |
[10:07] <bigjools> anyway I have a call now |
[10:07] <bigjools> catcha later |
[10:07] <jml> and maybe I can do something to stop the duplication between bugs & code here |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.