Loading bin/is +4 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ def c_build(parser, args): # load source image simg = SourceImage(args.path) # do the job simg.build(force=args.force, check=not args.no_check) simg.build(force=args.force, force_payload=args.payload, check=not args.no_check) # compute building time t1 = time.time() dt = int(t1 - t0) Loading Loading @@ -370,7 +370,9 @@ p_build = subparsers.add_parser("build", help=c_build.__doc__.lower()) p_build.add_argument("-c", "--no-check", action="store_true", default=False, help="do not check compilation before adding scripts") p_build.add_argument("-f", "--force", action="store_true", default=False, help="overwrite existing image") help="rebuild image if already exists") p_build.add_argument("-p", "--payload", action="store_true", default=False, help="rebuild payloads if already exists") p_build.add_argument("path", nargs="?", default=".") p_build.set_defaults(func=c_build) Loading completion/bash/is +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ _is() { (( args > 2 )) && _filedir '?(u)isimage' ;; build) [[ "$cur" == -* ]] && _opt '-h --help -f --force -c --no-check' && return 0 [[ "$cur" == -* ]] && _opt '-h --help -f --force -p --payload -c --no-check' && return 0 _count_args (( args == 2 )) && _filedir -d ;; Loading installsystems/image.py +4 −4 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ class SourceImage(Image): if not os.path.exists(os.path.join(self.base_path, "description")): raise Exception("No description file") def build(self, force=False, check=True): def build(self, force=False, force_payload=False, check=True): ''' Create packaged image ''' Loading @@ -168,7 +168,7 @@ class SourceImage(Image): self.check_scripts(self.parser_path) self.check_scripts(self.setup_path) # Create payload files payloads = self.create_payloads() payloads = self.create_payloads(force=force_payload) # generate a JSON description jdesc = self.generate_json_description(payloads) # creating scripts tarball Loading Loading @@ -204,7 +204,7 @@ class SourceImage(Image): tarball.close() arrowlevel(-1) def create_payloads(self): def create_payloads(self, force=False): ''' Create all data payloads in current directory Doesn't compute md5 during creation because tarball can Loading @@ -231,7 +231,7 @@ class SourceImage(Image): Payload.extension) source_stat = os.stat(source_path) isdir = stat.S_ISDIR(source_stat.st_mode) if os.path.exists(dest_path): if os.path.exists(dest_path) and not force: arrow("Payload %s already exists" % dest_path) else: arrow("Creating payload %s" % dest_path) Loading Loading
bin/is +4 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ def c_build(parser, args): # load source image simg = SourceImage(args.path) # do the job simg.build(force=args.force, check=not args.no_check) simg.build(force=args.force, force_payload=args.payload, check=not args.no_check) # compute building time t1 = time.time() dt = int(t1 - t0) Loading Loading @@ -370,7 +370,9 @@ p_build = subparsers.add_parser("build", help=c_build.__doc__.lower()) p_build.add_argument("-c", "--no-check", action="store_true", default=False, help="do not check compilation before adding scripts") p_build.add_argument("-f", "--force", action="store_true", default=False, help="overwrite existing image") help="rebuild image if already exists") p_build.add_argument("-p", "--payload", action="store_true", default=False, help="rebuild payloads if already exists") p_build.add_argument("path", nargs="?", default=".") p_build.set_defaults(func=c_build) Loading
completion/bash/is +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ _is() { (( args > 2 )) && _filedir '?(u)isimage' ;; build) [[ "$cur" == -* ]] && _opt '-h --help -f --force -c --no-check' && return 0 [[ "$cur" == -* ]] && _opt '-h --help -f --force -p --payload -c --no-check' && return 0 _count_args (( args == 2 )) && _filedir -d ;; Loading
installsystems/image.py +4 −4 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ class SourceImage(Image): if not os.path.exists(os.path.join(self.base_path, "description")): raise Exception("No description file") def build(self, force=False, check=True): def build(self, force=False, force_payload=False, check=True): ''' Create packaged image ''' Loading @@ -168,7 +168,7 @@ class SourceImage(Image): self.check_scripts(self.parser_path) self.check_scripts(self.setup_path) # Create payload files payloads = self.create_payloads() payloads = self.create_payloads(force=force_payload) # generate a JSON description jdesc = self.generate_json_description(payloads) # creating scripts tarball Loading Loading @@ -204,7 +204,7 @@ class SourceImage(Image): tarball.close() arrowlevel(-1) def create_payloads(self): def create_payloads(self, force=False): ''' Create all data payloads in current directory Doesn't compute md5 during creation because tarball can Loading @@ -231,7 +231,7 @@ class SourceImage(Image): Payload.extension) source_stat = os.stat(source_path) isdir = stat.S_ISDIR(source_stat.st_mode) if os.path.exists(dest_path): if os.path.exists(dest_path) and not force: arrow("Payload %s already exists" % dest_path) else: arrow("Creating payload %s" % dest_path) Loading