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 20:18:21 +0200
- Message-id: <20070816181820.GP17030@xxxxxxx>
On Thu, Aug 16, 2007 at 04:18:26PM +0200, Dr. Peter Poeml wrote:
> On Thu, Aug 16, 2007 at 09:45:30AM -0300, James Oakley wrote:
> > On Thursday 16 August 2007 5:13 am, Adrian Schröter wrote:
> > > Would a GPLv2 license okay with you ?
> > > Would it be okay when we relicense it at any later point under a later GPL
> > > license ?
> >
> > Absolutely, I submitted it for potential inclusion.
>
> Great. Thank you!
>
> I have been playing with an osc "mirror_binaries" command. Looks
> promising. Can download binaries project-wide or per package. But has
> the same problems you also mentioned, like not really checking for
> uptodate-ness.
Alright, I just committed all what's needed in osc the core to list and
download binaries.
I also committed an extension to the "ls" command to list binaries.
Then I have a command to mirror binaries to a local directory.
It is attached. (Try it by putting it to .osc-plugins/)
Thanks,
Peter
--
"WARNING: This bug is visible to non-employees. Please be respectful!"
SUSE LINUX Products GmbH
Research & Development
@cmdln.option('-q', '--quiet', action='store_true',
help='do not show downloading progress')
@cmdln.option('--package', metavar='PACKAGE',
help='only binaries of this package')
@cmdln.option('-d', '--destdir', default='.', metavar='DIR',
help='destination directory')
def do_mirror_binaries(self, subcmd, opts, project, repository, architecture):
"""${cmd_name}: Mirror binaries of a project to local directory
It does download directly from the api server.
Packages don't need to be "published" to be downloaded.
${cmd_usage}
${cmd_option_list}
"""
# Get package list
filenames = get_binarylist(conf.config['apiurl'],
project, repository, architecture,
package=opts.package)
if not os.path.isdir(opts.destdir):
print "Creating %s" % opts.destdir
os.makedirs(opts.destdir, 0755)
progress_meter = True
if opts.quiet:
progress_meter = False
for filename in filenames:
if os.path.exists('%s/%s' % (opts.destdir, filename)):
continue
targetfilename = '%s/%s' % (opts.destdir, filename)
get_binary_file(conf.config['apiurl'],
project, repository, architecture,
filename,
targetfilename=targetfilename,
package=opts.package,
progress_meter=progress_meter)
> On Thu, Aug 16, 2007 at 09:45:30AM -0300, James Oakley wrote:
> > On Thursday 16 August 2007 5:13 am, Adrian Schröter wrote:
> > > Would a GPLv2 license okay with you ?
> > > Would it be okay when we relicense it at any later point under a later GPL
> > > license ?
> >
> > Absolutely, I submitted it for potential inclusion.
>
> Great. Thank you!
>
> I have been playing with an osc "mirror_binaries" command. Looks
> promising. Can download binaries project-wide or per package. But has
> the same problems you also mentioned, like not really checking for
> uptodate-ness.
Alright, I just committed all what's needed in osc the core to list and
download binaries.
I also committed an extension to the "ls" command to list binaries.
Then I have a command to mirror binaries to a local directory.
It is attached. (Try it by putting it to .osc-plugins/)
Thanks,
Peter
--
"WARNING: This bug is visible to non-employees. Please be respectful!"
SUSE LINUX Products GmbH
Research & Development
@cmdln.option('-q', '--quiet', action='store_true',
help='do not show downloading progress')
@cmdln.option('--package', metavar='PACKAGE',
help='only binaries of this package')
@cmdln.option('-d', '--destdir', default='.', metavar='DIR',
help='destination directory')
def do_mirror_binaries(self, subcmd, opts, project, repository, architecture):
"""${cmd_name}: Mirror binaries of a project to local directory
It does download directly from the api server.
Packages don't need to be "published" to be downloaded.
${cmd_usage}
${cmd_option_list}
"""
# Get package list
filenames = get_binarylist(conf.config['apiurl'],
project, repository, architecture,
package=opts.package)
if not os.path.isdir(opts.destdir):
print "Creating %s" % opts.destdir
os.makedirs(opts.destdir, 0755)
progress_meter = True
if opts.quiet:
progress_meter = False
for filename in filenames:
if os.path.exists('%s/%s' % (opts.destdir, filename)):
continue
targetfilename = '%s/%s' % (opts.destdir, filename)
get_binary_file(conf.config['apiurl'],
project, repository, architecture,
filename,
targetfilename=targetfilename,
package=opts.package,
progress_meter=progress_meter)
| < Previous | Next > |