Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Brian Dolbec <dolsen@g.o>
Subject: Re: [gentoo-catalyst] [PATCH 4/4] cleanup long lines, improve usage() output formatting slightly
Date: Sat, 14 Dec 2013 05:14:27
Message-Id: CAEdQ38GAiEgzQaT+_L-q53yzC2GOD6eD9MtFsEWqJx4v3FZTbQ@mail.gmail.com
In Reply to: [gentoo-catalyst] [PATCH 4/4] cleanup long lines, improve usage() output formatting slightly by Brian Dolbec
1 On Fri, Dec 13, 2013 at 7:07 PM, Brian Dolbec <dolsen@g.o> wrote:
2 > ---
3 > catalyst | 83 +++++++++++++++++++++++++++++++++++++---------------------------
4 > 1 file changed, 48 insertions(+), 35 deletions(-)
5 >
6 > diff --git a/catalyst b/catalyst
7 > index 60cea3e..a68a2ba 100755
8 > --- a/catalyst
9 > +++ b/catalyst
10 > @@ -24,31 +24,33 @@ __version__="2.0.15"
11 > conf_values={}
12 >
13 > def usage():
14 > - print "Usage catalyst [options] [-C variable=value...] [ -s identifier]"
15 > - print " -a --clear-autoresume clear autoresume flags"
16 > - print " -c --config use specified configuration file"
17 > - print " -C --cli catalyst commandline (MUST BE LAST OPTION)"
18 > - print " -d --debug enable debugging"
19 > - print " -f --file read specfile"
20 > - print " -F --fetchonly fetch files only"
21 > - print " -h --help print this help message"
22 > - print " -p --purge clear tmp dirs,package cache and autoresume flags"
23 > - print " -P --purgeonly clear tmp dirs,package cache and autoresume flags and exit"
24 > - print " -T --purgetmponly clear tmp dirs and autoresume flags and exit"
25 > - print " -s --snapshot generate a release snapshot"
26 > - print " -V --version display version information"
27 > - print " -v --verbose verbose output"
28 > - print
29 > - print "Usage examples:"
30 > - print
31 > - print "Using the commandline option (-C, --cli) to build a Portage snapshot:"
32 > - print "catalyst -C target=snapshot version_stamp=my_date"
33 > - print
34 > - print "Using the snapshot option (-s, --snapshot) to build a release snapshot:"
35 > - print "catalyst -s 20071121"
36 > - print
37 > - print "Using the specfile option (-f, --file) to build a stage target:"
38 > - print "catalyst -f stage1-specfile.spec"
39 > + print """Usage catalyst [options] [-C variable=value...] [ -s identifier]
40 > + -a --clear-autoresume clear autoresume flags
41 > + -c --config use specified configuration file
42 > + -C --cli catalyst commandline (MUST BE LAST OPTION)
43 > + -d --debug enable debugging
44 > + -f --file read specfile
45 > + -F --fetchonly fetch files only
46 > + -h --help print this help message
47 > + -p --purge clear tmp dirs,package cache, autoresume flags
48 > + -P --purgeonly clear tmp dirs,package cache, autoresume flags and exit
49 > + -T --purgetmponly clear tmp dirs and autoresume flags and exit
50 > + -s --snapshot generate a release snapshot
51 > + -V --version display version information
52 > + -v --verbose verbose output
53 > +
54 > +Usage examples:
55 > +
56 > +Using the commandline option (-C, --cli) to build a Portage snapshot:
57 > +catalyst -C target=snapshot version_stamp=my_date
58 > +
59 > +Using the snapshot option (-s, --snapshot) to build a release snapshot:
60 > +catalyst -s 20071121"
61 > +
62 > +Using the specfile option (-f, --file) to build a stage target:
63 > +catalyst -f stage1-specfile.spec
64 > +"""
65 > +
66 >
67 > def version():
68 > print "Catalyst, version "+__version__
69 > @@ -77,7 +79,8 @@ def parse_config(myconfig):
70 > # first, try the one passed (presumably from the cmdline)
71 > if myconfig:
72 > if os.path.exists(myconfig):
73 > - print "Using command line specified Catalyst configuration file, "+myconfig
74 > + print "Using command line specified Catalyst configuration file, "+\
75
76 No need to add \
77
78 (same comment applies elsewhere)

Replies