Mailinglist Archive: opensuse-buildservice (189 mails)

< Previous Next >
[opensuse-buildservice] [PATCH] osc: add -c flag to check package out to current diretory
  • From: Brandon Philips <brandon@xxxxxxxx>
  • Date: Sat, 28 Feb 2009 12:38:51 -0800
  • Message-id: <20090228203851.GB3936@xxxxxxxxxxxxxxxx>
A simple solution to the colons in project names messing up LD_LIBRARY_PATH:
http://lists.opensuse.org/archive/opensuse-buildservice/2008-12/msg00166.html

Example use:

$ osc co -c openSUSE:Factory osc
A $PWD/osc/debian.changelog
A $PWD/osc/debian.tar.gz
A $PWD/osc/osc-0.113.tar.gz
A $PWD/osc/osc.changes
A $PWD/osc/osc.dsc
A $PWD/osc/osc.spec
A $PWD/osc/ready

Versus without -c

$ osc co openSUSE:Factory osc
A $PWD/openSUSE:Factory/osc/debian.changelog
A $PWD/openSUSE:Factory/osc/debian.tar.gz
A $PWD/openSUSE:Factory/osc/osc-0.113.tar.gz
A $PWD/openSUSE:Factory/osc/osc.changes
A $PWD/openSUSE:Factory/osc/osc.dsc
A $PWD/openSUSE:Factory/osc/osc.spec
A $PWD/openSUSE:Factory/osc/ready


Signed-off-by: Brandon Philips <bphilips@xxxxxxx>

---
osc/commandline.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Index: osc/osc/commandline.py
===================================================================
--- osc.orig/osc/commandline.py
+++ osc/osc/commandline.py
@@ -1043,6 +1043,10 @@ Please submit there instead, or use --no
@cmdln.option('-u', '--unexpand-link', action='store_true',
help='if a package is a link, check out the _link file
' \
'instead of the expanded sources')
+ @cmdln.option('-c', '--current-dir', action='store_true',
+ help='place PACKAGE folder in current directory' \
+ 'instead of a PROJECT/PACKAGE directory')
+
@cmdln.alias('co')
def do_checkout(self, subcmd, opts, *args):
"""${cmd_name}: Check out content from the repository
@@ -1091,8 +1095,11 @@ Please submit there instead, or use --no
get_source_file(conf.config['apiurl'], project, package, filename,
revision=rev)

elif package:
+ if opts.current_dir: prj_dir = None
+ else: prj_dir = Project
+
checkout_package(conf.config['apiurl'], project, package,
- rev, expand_link=expand_link, prj_dir=project)
+ rev, expand_link=expand_link, prj_dir=prj_dir)

elif project:
if os.path.exists(project):
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
This Thread
Follow Ups