From 2e6d561b843dea3801ca1fe57007780bb4835b1f Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Sat, 6 Apr 2024 14:26:06 +0200 Subject: [PATCH 1/2] [FORUM 505] prepare command fix on windows --- src/system.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/system.py b/src/system.py index cc500d0..7b8d149 100644 --- a/src/system.py +++ b/src/system.py @@ -152,7 +152,7 @@ exit $res # NOTICE: this command only works with recent version of git # because --work-tree does not work with an absolute path if src.architecture.is_windows(): - cmd = "rm -rf %(where)s && git clone %(git_options)s %(remote)s %(where)s && git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(tag)s" + cmd = "rmdir /S /Q %(where)s && git clone %(git_options)s %(remote)s %(where)s && git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(tag)s" else: # for sat compile --update : changes the date of directory, only for branches, not tag cmd = r""" @@ -244,13 +244,13 @@ rm -rf $tmpDir cmd = r""" set tmpDir=%(tmpWhere)s && \ -rm -rf $tmpDir -git clone %(git_options)s %(remote)s $tmpDir && \ -cd $tmpDir && \ +rmdir /S /Q %tmpDir% +git clone %(git_options)s %(remote)s %tmpDir% && \ +cd %tmpDir% && \ git checkout %(tag)s && \ mv %(sub_dir)s %(where)s && \ -git log -1 > %(where)s/README_git_log.txt && \ -rm -rf $tmpDir +git log -1 > %(where)s\\README_git_log.txt && \ +rmdir /S /Q %tmpDir% """ % aDict DBG.write("cmd", cmd) -- 2.30.2 From 30285870559be5d3f978f5e5fa43219c62b6108d Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 7 May 2024 10:50:33 +0200 Subject: [PATCH 2/2] relax constraint about openssl for windows - Python embeds already ssl --- commands/compile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/compile.py b/commands/compile.py index 12cfbe6..d084b2d 100644 --- a/commands/compile.py +++ b/commands/compile.py @@ -502,7 +502,7 @@ def compile_product_pip(sat, :rtype: int ''' # pip needs openssl-dev. If openssl is declared in the application, we check it! - if "openssl" in config.APPLICATION.products: + if "openssl" in config.APPLICATION.products and not src.architecture.is_windows(): openssl_cfg = src.product.get_product_config(config, "openssl") if not src.product.check_installation(config, openssl_cfg): raise src.SatException(_("please install system openssl development package, it is required for products managed by pip.")) -- 2.30.2