force build
This commit is contained in:
parent
cee688b2c2
commit
1ba76a849a
@ -16,6 +16,7 @@ parser.add_argument('--logger', type=str)
|
|||||||
parser.add_argument('--live-iso-mode', type=str, default='local')
|
parser.add_argument('--live-iso-mode', type=str, default='local')
|
||||||
parser.add_argument('--hashed', action='store_true')
|
parser.add_argument('--hashed', action='store_true')
|
||||||
parser.add_argument('--just-copy-it', action='store_true', help="Just copy the images to the compose dir")
|
parser.add_argument('--just-copy-it', action='store_true', help="Just copy the images to the compose dir")
|
||||||
|
parser.add_argument('--force-build', action='store_true', help="Just build and overwrite the images")
|
||||||
results = parser.parse_args()
|
results = parser.parse_args()
|
||||||
rlvars = rldict[results.release]
|
rlvars = rldict[results.release]
|
||||||
major = rlvars['major']
|
major = rlvars['major']
|
||||||
@ -30,6 +31,7 @@ a = LiveBuild(
|
|||||||
compose_dir_is_here=results.local_compose,
|
compose_dir_is_here=results.local_compose,
|
||||||
hashed=results.hashed,
|
hashed=results.hashed,
|
||||||
justcopyit=results.just_copy_it,
|
justcopyit=results.just_copy_it,
|
||||||
|
force_build=results.force_build,
|
||||||
logger=results.logger
|
logger=results.logger
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1426,6 +1426,7 @@ class LiveBuild:
|
|||||||
hashed: bool = False,
|
hashed: bool = False,
|
||||||
image=None,
|
image=None,
|
||||||
justcopyit: bool = False,
|
justcopyit: bool = False,
|
||||||
|
force_build: bool = False,
|
||||||
logger=None
|
logger=None
|
||||||
):
|
):
|
||||||
|
|
||||||
@ -1449,6 +1450,7 @@ class LiveBuild:
|
|||||||
self.live_result_root = config['mock_work_root'] + "/lmc"
|
self.live_result_root = config['mock_work_root'] + "/lmc"
|
||||||
self.mock_isolation = isolation
|
self.mock_isolation = isolation
|
||||||
self.force_download = force_download
|
self.force_download = force_download
|
||||||
|
self.force_build = force_build
|
||||||
self.live_iso_mode = live_iso_mode
|
self.live_iso_mode = live_iso_mode
|
||||||
self.checksum = rlvars['checksum']
|
self.checksum = rlvars['checksum']
|
||||||
self.profile = rlvars['profile']
|
self.profile = rlvars['profile']
|
||||||
@ -1863,6 +1865,16 @@ class LiveBuild:
|
|||||||
self.major_version,
|
self.major_version,
|
||||||
arch
|
arch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.justcopyit:
|
||||||
|
if os.path.exists(os.path.join(live_res_dir, isoname)):
|
||||||
|
self.log.warn(Color.WARN + 'Image already exists.')
|
||||||
|
if self.force_build:
|
||||||
|
self.log.warn(Color.WARN + 'Building anyway.')
|
||||||
|
else:
|
||||||
|
self.log.warn(Color.WARN + 'Skipping.')
|
||||||
|
return
|
||||||
|
|
||||||
live_iso_cmd = '/bin/bash {}/liveisobuild-{}-{}.sh'.format(entries_dir, arch, image)
|
live_iso_cmd = '/bin/bash {}/liveisobuild-{}-{}.sh'.format(entries_dir, arch, image)
|
||||||
self.log.info('Starting mock build...')
|
self.log.info('Starting mock build...')
|
||||||
p = subprocess.call(shlex.split(live_iso_cmd))
|
p = subprocess.call(shlex.split(live_iso_cmd))
|
||||||
|
Loading…
Reference in New Issue
Block a user