----- "James Hogarth" <[email protected]> wrote: > On 20 April 2010 15:47, Tomas Lestach <[email protected]> wrote: > > ----- "James Hogarth" <[email protected]> wrote: > > > >> Hi all, > >> > >> This is my first time trying to follow through the code and > >> contribute > >> to the codebase. > >> > >> >From my perspective the ability via the XML-RPC API to get the > last > >> repo modified date (and possibly whether a build would be in > >> progress) > >> would be extremely useful to us. > > > > Hello James, > > > > I think this is wonderful idea! It might be helpful for more > people. > > > >> > >> The idea being that after an RPM is built via a build system and > >> pushed via rhnpush there is not (as far as I know) a way via the > API > >> to check when the repodata actually gets updated. > >> > >> As a result I have had a couple of times when a deploy of the new > RPM > >> for our application is meant to be carried out but the repodata > >> hasn't > >> quite been built yet resulting in wasted time and another RPM > >> deployment later. > >> > >> I'm thinking adding this to > >> > java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java > >> within the ChannelSoftwareHandler class *could* provide at least > part > >> of that info... > >> > >> /** > >> * Returns the last build date on the repodata for a channel > >> * @param sessionKey WebSession containing User information. > >> * @param id - id of channel wanted > >> * @throws NoSuchChannelException thrown if no channel is > found. > >> * @return the build date on the repodata of the channel > requested > >> */ > >> > >> public String getChannelLastBuildById(String sessionKey, > Integer > >> id) > >> throws NoSuchChannelException { > >> User user = getLoggedInUser(sessionKey); > >> return > >> ChannelManager.getRepoLastBuild(lookupChannelById(user,id)); > >> } > >> > >> > > > > I've already applied your patch with one single change ... > > (because getRepoLastBuild() may return null -> no repo will be > generated for empty channels) > > > > > http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=6519f98fe579244ead774895b50f46c5a0d1f334 > > > > Thank you! > > > >> I'm a sysadmin by trade and only dabble in code at this point.... > >> > >> Does it at least look like I'm on the right track for a proper > patch > >> to be submitted? > > > > Yes, the patch looks very good. > > Usually patches are sent as output of `git format-patch`. Otherwise > no objections. :-) > > > > > > Best Regards, > > Tomas > > > >> Incidentally whilst I'm looking at this code anyway.... I've > noticed > >> that ChannelDetail shows a 12 hour date for last repo build and > last > >> modified a 24 hour date.... any ideas? > >> > >> James > >> > >> _______________________________________________ > >> Spacewalk-devel mailing list > >> [email protected] > >> https://www.redhat.com/mailman/listinfo/spacewalk-devel > > > > _______________________________________________ > > Spacewalk-devel mailing list > > [email protected] > > https://www.redhat.com/mailman/listinfo/spacewalk-devel > > > > I'm more used to subversion than git... having troubles with getting > any output from git format-patch on ubuntu lucid ... > > Attached is a `git diff` output with your revision and the changes to > documentation too... > > There is a test included but I'm not sure how useful it would be...
Hey James, I committed your test, however I agree with the question of usefulness. http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=efd78586df52c15ba8edc45262b3ae4cc358168c;hp=c32851db25e1038b8f1b900bb1b7fa3be6f71609 The javadoc and apidoc get generated automatically out of the comments. That's why I just added correct comments (not the htmls). http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=e65a07d5afda8e0160f4e8a173fc550b3be09537;hp=efd78586df52c15ba8edc45262b3ae4cc358168c > > Wahoo! My first code inclusion! ;) Congratulations! :-) > Thanks for the feedback Tomas... hopefully over time I'll be able to > contribute more as Spacewalk gets put to further use here.... Sure, looking forward to your next patches. Regards, Tomas > > Kind regards, > > James > > _______________________________________________ > Spacewalk-devel mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/spacewalk-devel _______________________________________________ Spacewalk-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-devel
