--
Tomas Lestach
RHN Satellite Engineering, Red Hat
----- "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