Mailinglist Archive: opensuse-buildservice (366 mails)
| < Previous | Next > |
Re: [opensuse-buildservice] obs_mirror_project
- From: "Dr. Peter Poeml" <poeml@xxxxxxx>
- Date: Thu, 16 Aug 2007 19:04:38 +0200
- Message-id: <20070816170438.GN17030@xxxxxxx>
On Thu, Aug 16, 2007 at 10:43:27AM -0300, James Oakley wrote:
> On Thursday 16 August 2007 7:50 am, Dr. Peter Poeml wrote:
> > James,
> >
> > I have added a get_binary_list() to osc (just checked it into svn).
> >
> > I also hacked up a "ls --binary" extension to osc (which uses this new
> > method). Not in svn yet.
> >
> > I am attaching a patch to the script you posted. It uses the new osc
> > function, and I simplified two places where I used two existing
> > functions to pull stuff from the api, and the permissions bitmask fix I
> > mentioned before.
> >
> > I would like to integrate more stuff into osc, if possible.
>
> It would be nice to be able to get some more metadata from the binary list. It
> appears that binaries built from projects are listed as <name>.rpm instead of
> <name>-<version>-<release>.<arch>.rpm. There's no way to tell from the
> filename alone if it's different from a local copy. An md5sum would solve
> that problem.
It might be possible that there is a way.
When asking for binaries in the backend, they are unversioned.
When asking for published binaries though, they are versioned:
% osc-stable req published/Apache/SLE_10/x86_64/
<directory>
<entry name="GeoIP-1.4.2-4.2.x86_64.rpm" />
<entry name="GeoIP-debuginfo-1.4.2-4.2.x86_64.rpm" />
...
I'm not sure at the moment, if the size, mtime or md5sum can be obtained somehow.
I don't find it in the api docs.
Andreas? Michael?
> > I am also interested in feedback about friendlyness of using the osc
> > module from external scripts.
>
> It works great, in my experience. This isn't the first script I've written
> with it.
Cool. And good to know. I usually try not to break existing usage of the
code... being aware of users increases the motivation for that, and
makes me know that it is worth my time :-)
> The initialisation isn't as intuitive as it could be, however:
>
> conf.get_config()
> conf.config['apiurl'] = conf.config['scheme'] + '://' + conf.config['apisrv']
> conf.config['user'] = conf.config['auth_dict'][conf.config['apisrv']]['user']
> conf.init_basicauth(conf.config)
>
> It would be nicer if there was one function to call, eg:
>
> conf.init(apisrv=None)
>
> where the default api server will be used if apisrv is None.
>
> Some simple examples in the documentation would help those looking to learn
> the library as well.
Definitely. I'll put this onto the TODO.
Thanks!
Peter
--
"WARNING: This bug is visible to non-employees. Please be respectful!"
SUSE LINUX Products GmbH
Research & Development
> On Thursday 16 August 2007 7:50 am, Dr. Peter Poeml wrote:
> > James,
> >
> > I have added a get_binary_list() to osc (just checked it into svn).
> >
> > I also hacked up a "ls --binary" extension to osc (which uses this new
> > method). Not in svn yet.
> >
> > I am attaching a patch to the script you posted. It uses the new osc
> > function, and I simplified two places where I used two existing
> > functions to pull stuff from the api, and the permissions bitmask fix I
> > mentioned before.
> >
> > I would like to integrate more stuff into osc, if possible.
>
> It would be nice to be able to get some more metadata from the binary list. It
> appears that binaries built from projects are listed as <name>.rpm instead of
> <name>-<version>-<release>.<arch>.rpm. There's no way to tell from the
> filename alone if it's different from a local copy. An md5sum would solve
> that problem.
It might be possible that there is a way.
When asking for binaries in the backend, they are unversioned.
When asking for published binaries though, they are versioned:
% osc-stable req published/Apache/SLE_10/x86_64/
<directory>
<entry name="GeoIP-1.4.2-4.2.x86_64.rpm" />
<entry name="GeoIP-debuginfo-1.4.2-4.2.x86_64.rpm" />
...
I'm not sure at the moment, if the size, mtime or md5sum can be obtained somehow.
I don't find it in the api docs.
Andreas? Michael?
> > I am also interested in feedback about friendlyness of using the osc
> > module from external scripts.
>
> It works great, in my experience. This isn't the first script I've written
> with it.
Cool. And good to know. I usually try not to break existing usage of the
code... being aware of users increases the motivation for that, and
makes me know that it is worth my time :-)
> The initialisation isn't as intuitive as it could be, however:
>
> conf.get_config()
> conf.config['apiurl'] = conf.config['scheme'] + '://' + conf.config['apisrv']
> conf.config['user'] = conf.config['auth_dict'][conf.config['apisrv']]['user']
> conf.init_basicauth(conf.config)
>
> It would be nicer if there was one function to call, eg:
>
> conf.init(apisrv=None)
>
> where the default api server will be used if apisrv is None.
>
> Some simple examples in the documentation would help those looking to learn
> the library as well.
Definitely. I'll put this onto the TODO.
Thanks!
Peter
--
"WARNING: This bug is visible to non-employees. Please be respectful!"
SUSE LINUX Products GmbH
Research & Development
| < Previous | Next > |