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.
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'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?
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