From: Chulwoo Shin Date: Mon, 27 Feb 2017 15:34:55 +0000 (+0900) Subject: [TIC-CORE] fixed default file name of kickstart X-Git-Tag: v20170316~2^2~3 X-Git-Url: http://review.tizen.org/git/?p=archive%2F20170607%2Ftools%2Ftic-core.git;a=commitdiff_plain;h=77a4f7058fd7ad5c856c65fbbbe37294888e6775 [TIC-CORE] fixed default file name of kickstart - fixed default name of kickstart - fixed repository url of default recipe Change-Id: I3758fe641a3e210fdad74f6775fe0062eff75adb Signed-off-by: Chulwoo Shin --- diff --git a/tic/command.py b/tic/command.py index 89df3fb..2a883cb 100644 --- a/tic/command.py +++ b/tic/command.py @@ -95,7 +95,7 @@ def analyze(repo_list, recipe_list=None): return result -def exports(export_type, recipe, packages, outdir, filename): +def exports(export_type, recipe, packages, outdir, filename=None): logger = logging.getLogger(__name__) #TODO validation should be checked before request @@ -131,15 +131,12 @@ def exports(export_type, recipe, packages, outdir, filename): # check whether the ks exists baseline=recipe['Default'].get('Baseline') ksname= ''.join([config.get('FileName'), '.ks']) - if filename: - ksname= ''.join([config.get('FileName'), '.ks']) - kspath=os.path.join(yaml_info.cachedir, baseline, ksname) if not os.path.exists(kspath): raise TICError('No ks file was created from kickstarter') # copy the ks to output directory - output=copyfile(kspath, outdir) + output=copyfile(kspath, outdir, filename) logger.info('copy the ks file from %s to dst:%s', kspath, output) return output diff --git a/tic/parser/recipe_parser.py b/tic/parser/recipe_parser.py index 102daee..b2f3876 100644 --- a/tic/parser/recipe_parser.py +++ b/tic/parser/recipe_parser.py @@ -65,10 +65,10 @@ def get_default_recipe(): Schedule= "*", Active= True, Platform= 'Wayland', - Part= 'mobile-2parts-emulator', + Part= 'mobile-mbr', Mic2Options= '-f loop --pack-to=@NAME@.tar.gz', FileName= 'default', - Repos=['tizen-standard'], + Repos=['tizen-unified', 'tizen-base'], Groups=[], ExtraPackages= [], RemovePackages=[] diff --git a/tic/utils/file.py b/tic/utils/file.py index 442f3ce..06e6727 100644 --- a/tic/utils/file.py +++ b/tic/utils/file.py @@ -44,8 +44,10 @@ def decompress_gzip(intput_path, output_path): f.close() return output_path -def copyfile(src, dst): +def copyfile(src, dst, filename=None): abs_dst=os.path.abspath(os.path.expanduser(dst)) make_dirs(abs_dst) + if filename: + abs_dst = os.path.join(abs_dst, filename) shutil.copy(src, abs_dst) return os.path.join(abs_dst, os.path.basename(src)) \ No newline at end of file