@@ -44,25 +44,26 @@ def setup_parser(subparser):
4444
4545 create = subparsers .add_parser ('create' )
4646 create .add_argument ('-f' , '--force' , action = 'store_true' ,
47- help = "overwrite tarball if it exists." )
48- create .add_argument ('-d' , '--directory' , metavar = 'directory' ,
49- type = str , default = '.' ,
50- help = "directory in which to save the tarballs." )
47+ help = "overwrite tarball if it exists." )
48+ create .add_argument ('-d' , '--directory' , metavar = 'directory' ,
49+ type = str , default = '.' ,
50+ help = "directory in which to save the tarballs." )
5151 create .add_argument (
5252 'packages' , nargs = argparse .REMAINDER ,
5353 help = "specs of packages to package" )
5454 create .set_defaults (func = createtarball )
5555
5656 install = subparsers .add_parser ('install' )
5757 install .add_argument ('-f' , '--force' , action = 'store_true' ,
58- help = "overwrite install directory if it exists." )
58+ help = "overwrite install directory if it exists." )
5959 install .add_argument (
6060 'packages' , nargs = argparse .REMAINDER ,
6161 help = "specs of packages to package" )
6262 install .set_defaults (func = installtarball )
6363
64+
6465def createtarball (args ):
65- if not args .packages :
66+ if not args .packages :
6667 tty .die ("build cache file creation requires at least one" +
6768 " installed package argument" )
6869 pkgs = set (args .packages )
@@ -81,8 +82,9 @@ def createtarball(args):
8182 tty .msg ('creating binary cache file for package %s ' % spec )
8283 build_tarball (spec , outdir , args .force )
8384
85+
8486def installtarball (args ):
85- if not args .packages :
87+ if not args .packages :
8688 tty .die ("build cache file installation requires at least one" +
8789 " package argument" )
8890 pkgs = set (args .packages )
@@ -110,6 +112,7 @@ def installtarball(args):
110112 else :
111113 tty .die ("Download of binary cache file for spec %s failed." % spec )
112114
115+
113116def buildcache (parser , args ):
114117 if args .func :
115118 args .func (args )
0 commit comments