text stringlengths 15 499 |
|---|
[09:11] <wgrant> Ah. That would be your problem. |
[09:11] <jml> bigjools, that's probably what we want here. |
[09:11] <jml> bigjools, since these are for official package branches for a distroseries, pocket. |
[09:11] <bigjools> I tried the karmic kernel and xorg driver a month aho and it was no better |
[09:12] <thumper> jml: because the tests aren't there any more :) |
[09:12] * thumper thinks... |
[09:12] <bigjools> jml: great, so the next thing to work out is whether there are package-specific permisssions, component-specific permissions then packageset permissions |
[09:12] <jml> thumper, yeah. I checked. |
[09:12] <jml> thumper, and at their new location, the test modules have been correctly factored. |
[09:12] <jml> thumper, so it's a little more fix released than invalid. |
[09:13] <jml> thumper, but no big deal. |
[09:13] <al-maisan> bigjools: I understood jml merely wants a yes/no answer.. |
[09:13] <jml> yes. |
[09:13] <jml> what al-maisan said :) |
[09:13] <bigjools> that's not possible |
[09:13] <bigjools> like I already said |
[09:13] <jml> ok. |
[09:13] <thumper> jml: changed to make you feel better :) |
[09:14] <jml> thumper, you're a champ. :) |
[09:14] <al-maisan> bigjools: assuming jml knows the destination archive, IArchive.canUpload() should provide the yes/no answer .. |
[09:14] <bigjools> al-maisan: no, it can't |
[09:14] <al-maisan> please explain. |
[09:14] <bigjools> you also need to know the package name, a component name or a packageset |
[09:15] <bigjools> you only don't need those if you have a PPA |
[09:15] <al-maisan> ah, right. |
[09:15] <jml> bigjools, we have the package name, since we have an ISourcePackage. |
[09:15] <bigjools> jml: that's a good start :) but not enough yet |
[09:15] <bigjools> you also need to know which component it's headed for |
[09:15] <bigjools> and you have to check both |
[09:15] * jml buckles up and sits tight. |
[09:16] <bigjools> so start with canUpload(user, package_name) |
[09:16] <bigjools> if it works, great |
[09:16] <bigjools> if it doesn't, you need to use canUpload(user, component) |
[09:16] <jml> bigjools, if I know the distroseries & sourcepackagename, can I can derive the component? |
[09:16] <bigjools> yes |
[09:16] <bigjools> you need to work out where it's published |
[09:16] <bigjools> that was where I was going next :) |
[09:17] <bigjools> jml: I'll point you at example code |
[09:17] <jml> how bout I just sit quiet for a bit then? :) |
[09:17] <bigjools> lib/lp/archiveuploader/nascentupload.py |
[09:17] <bigjools> verify_acl() does the upload checks |
[09:18] <al-maisan> bigjools: that's a great pointer! |
[09:18] <bigjools> jml: you need to know which pocket it's being uploaded to as well, you have a suite somewhere IIRC? |
[09:18] * jml looks |
[09:18] <jml> bigjools, yep. |
[09:19] <BjornT_> jml: you can also look at BugNomination.canApprove(), which does similar check (except that it doesn't check for packagesets yet) |
[09:19] <jml> http://paste.ubuntu.com/224163/ |
[09:19] <bigjools> jml: ok so you need to look up the SPPH for that package/pocket |
[09:19] <bigjools> BjornT_: you need to fix that for karmic :) |
[09:19] <jml> that's the test I'm halfway through writing. |
[09:20] <bigjools> jml: distroseries.getPublishedReleases() does that lookup |
[09:20] <BjornT_> bigjools: how about finally adding a method that gives you a yes/no answer? ;) this is at least the second time we implement these checks. |
[09:20] <bigjools> BjornT_: it's not possible |
[09:20] <BjornT_> bigjools: that is, second time outside of soyus |
[09:21] <jml> bigjools, and once I get the SPPH |
[09:21] <BjornT_> bigjools: why not. how can i and jml get a a yes/no answer if it's not possible? |
[09:21] <bigjools> there are three different things to check depending on what data you have |
[09:21] <bigjools> and which distroseries it is |
[09:21] <bigjools> (after karmic) |
[09:22] <bigjools> jml: once you get the spph, you can get spph.component, and pass it to canUpload() |
[09:22] <jml> bigjools, how will I know which element from getPublishedReleases to use? |
[09:22] <BjornT_> bigjools: both jml (i think at least) and i have an ISourcePackage. i.e., we have a source package in a distro series. all information can be derived from that, can't it? |
[09:23] <BjornT_> bigjools: if not, then i'm doing something wrong |
[09:23] <jml> BjornT_, I do have an ISourcePackage. |
[09:23] <bigjools> BjornT_: you need the pocket as well, but after that yes, we could factor it somewhere |
[09:23] <BjornT_> bigjools: how do i know the pocket? |
[09:24] <bigjools> BjornT_: it depends on where the package is being uploaded to |
[09:24] <bigjools> and is data that you need to supply |
[09:24] <BjornT_> bigjools: can the same ISourcePackage be uploaded to multiple pockets? |
[09:25] <bigjools> it can exist in multiple pockets |
[09:25] <bigjools> it can start in say, security, and be copied to updates |
[09:25] <bigjools> wgrant, can you think of an example where something would have a different component in a different pocket? |
[09:25] <BjornT_> bigjools: so in what way should i fix BugNomination.canApprove()? it doesn't use pockets at all |
[09:25] <bigjools> BjornT_: let me check your code |
[09:26] <wgrant> bigjools: It might have been done once, but I don't remember. It was certainly discussed with the archive admins, who talked to one of you guys, who confirmed it was possible with SQL, IIRC. I don't remember if it was actually done. |
[09:26] <jml> I see you use latest_published_component |
[09:26] <al-maisan> NascentUpload.verify_acl() does not seem to use pockets either .. |
[09:26] <jml> BjornT_, ^ |
[09:27] <wgrant> But that's such a strange case it's not worth caring about for this, I don't think. |
[09:27] <bigjools> source_package.latest_published_component is perfect |
[09:27] <jml> ok |
[09:27] <bigjools> al-maisan: not in that specific place, because it already looked them up |
[09:27] <bigjools> al-maisan: see getSourceAncestry() |
[09:27] <BjornT_> jml: yes. that's why i'd like a method that accepts an ISourcePackage that does the check for me! |
[09:28] * al-maisan looks |
[09:28] <BjornT_> s/check/checks/ |
[09:28] <jml> BjornT_, I'm inclined to agree. |
[09:28] <bigjools> BjornT_, jml: yes, I can add something to do that |
[09:28] <jml> But I'd like to get to the end of bigjools's explanation :) |
[09:28] <bigjools> aaaaanyway |
[09:28] <jml> bigjools, well, I'm happy to do so, since I'm working on this problem now. |
[09:28] <bigjools> jml: awesome |
[09:29] <jml> check_permission(ISourcePackage, 'launchpad.Edit'), I assume. |
[09:29] <bigjools> jml: no, IArchive.<something> |
[09:29] <bigjools> let me think a but |
[09:29] <bigjools> bit |
[09:29] <bigjools> because we are trying to fix the security adapter, it won't work for lp.Append on IArchive right now |
[09:32] <bigjools> jml: you could change canUpload() so it takes an optional ISourcePackage |
[09:33] <jml> bigjools, AIUI, BjornT_ & I are just going to derive the IArchive instance from the ISourcePackage anyway |
[09:33] <bigjools> jml: I think that's a bad idea |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.