Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571614 - willikins: incorrectly reports project as not existing when no members are associated
Summary: willikins: incorrectly reports project as not existing when no members are as...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-12 03:44 UTC by Sam Jorna (wraeth)
Modified: 2016-02-01 13:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
proj-shows-not-existing-when-empty.patch (proj-shows-not-existing-when-empty.patch,1.11 KB, patch)
2016-01-12 03:44 UTC, Sam Jorna (wraeth)
Details | Diff
0001-proj-Distinguish-between-non-existing-and-empty-proj.patch (0001-proj-Distinguish-between-non-existing-and-empty-proj.patch,1.77 KB, patch)
2016-01-12 12:38 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Jorna (wraeth) 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) 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) 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.