Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 571614

Summary: willikins: incorrectly reports project as not existing when no members are associated
Product: Gentoo Infrastructure Reporter: Sam Jorna (wraeth) (RETIRED) <wraeth>
Component: OtherAssignee: Gentoo Infrastructure <infra-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: proj-shows-not-existing-when-empty.patch
0001-proj-Distinguish-between-non-existing-and-empty-proj.patch

Description Sam Jorna (wraeth) (RETIRED) gentoo-dev 2016-01-12 03:44:46 UTC
Created attachment 422616 [details, diff]
proj-shows-not-existing-when-empty.patch

When using the new !proj function in willikins, if the project has no members associated according to the xml, willikins reports the project as not existing:

> <wraeth> !proj mate@gentoo.org
> <willikins> No such project: mate@gentoo.org

Attached patch seems to resolve in my testing.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-12 08:08:20 UTC
Oh u. I'd rather use true/false rather than 1/nil though ;-P.
Comment 2 Sam Jorna (wraeth) (RETIRED) gentoo-dev 2016-01-12 08:25:52 UTC
Whichever is preferred - I don't particularly know Ruby, and this did the trick :)

Change as desired, or I can re-upload a patch if you'd prefer.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-12 12:07:17 UTC
Ok, I'll update and test it locally, and then submit to Robin for final approval.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-12 12:31:23 UTC
Patch sent to Robin. I've also added explicit handling of non-existing subprojects in case that ever becomes necessary (malformed projects.xml?).
Comment 5 Sam Jorna (wraeth) (RETIRED) gentoo-dev 2016-01-12 12:33:48 UTC
Thanks Michał (and also in advance to Robin). I'd be interested to see how you handled that, though I can always wait until it's in rbot-gentoo.git :)
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-12 12:38:15 UTC
Created attachment 422664 [details, diff]
0001-proj-Distinguish-between-non-existing-and-empty-proj.patch

Sure, here you are.