From nobody Mon Feb 9 23:42:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65642+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65642+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1601083733; cv=none; d=zohomail.com; s=zohoarc; b=S/JykTCPmxjwuDr+gdcHbWnbI210G40BWCbt2Z9hkEBkhbj0ATyGIl9Zt7fvgwhKoY89LtZ1flapwRS4aTpS13mp32P3t/ck9NrPtZciPbo2AdghHb4UfnAD5PYZZl2ZtPNsnRGJ55ESNP6dwhZZzlghenTtPjnje/H4lnb2LbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601083733; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=wDf0IfEw4bMx6cTCB3SD3PC7uHZb/wRGPTSx2HiGr0s=; b=UCGC4eHB3H6p/d6OLkCMivKqP3IybRBLW5q81mLiYuppu8XRlAfwCzWO4hpj3DYwGpnsKjciyKy15vA9T7d4DMS5s8O6AGvN4TmcJbvkiydfZAnJ6dFublAyG3GaeMN249RaPaFNbeJYTg+8ojQrYC8d6iNJFQjCMwm4rtsSbcw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65642+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 160108373381536.81472292136198; Fri, 25 Sep 2020 18:28:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id HNSUYY1788612xeKpRBkPz6y; Fri, 25 Sep 2020 18:28:53 -0700 X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.2596.1601083731573090498 for ; Fri, 25 Sep 2020 18:28:51 -0700 IronPort-SDR: OCdUZflhDQTdy39uS0b7hF1sSf9GdzgsHvvbdpLPOQ7lCAEKRgpew1t031vXGNSH2/ZSEONeou 1mP61Hs2FFRA== X-IronPort-AV: E=McAfee;i="6000,8403,9755"; a="160930076" X-IronPort-AV: E=Sophos;i="5.77,303,1596524400"; d="scan'208";a="160930076" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 18:28:49 -0700 IronPort-SDR: F7fdbbf1WMxtI75GNsTI5y8yi8w3uHTuVGwaQv62+daFJ+k45PcfvTvYEig/EOU0oWlbhtqjNM x47UL+yZJWfg== X-IronPort-AV: E=Sophos;i="5.77,303,1596524400"; d="scan'208";a="513245999" X-Received: from nldesimo-desk1.amr.corp.intel.com ([10.212.4.151]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 18:28:49 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Ashley E Desimone , Puja Pandya , Bret Barkelew , Prince Agyeman , Erik Bjorge Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH V3 2/2] EdkRepo: Add support for subst drives Date: Fri, 25 Sep 2020 18:28:26 -0700 Message-Id: <20200926012826.4976-3-nathaniel.l.desimone@intel.com> In-Reply-To: <20200926012826.4976-1-nathaniel.l.desimone@intel.com> References: <20200926012826.4976-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nathaniel.l.desimone@intel.com X-Gm-Message-State: MuEWf9MLL9yy0fTvBSffLPjGx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601083733; bh=sJb8G39yrUlWIgb3Q1mkuHjSSRESZLanb+C/axyYhlE=; h=Cc:Date:From:Reply-To:Subject:To; b=F4ErQito4l5R1NPj56vuPOZH8YkalkBPcH6I2pQhrThhxXSBWzFTO+N/skmSMla0ueq cbPlyPUSqNoJBhfcBpvfyOL+JjAzo63A7bv+Rb9slj04Fxkdl5zwc911n8bP0Ov2W4sBY RJ2VHVD6tURrDXkdY4IrbYSrB+UEU36RTYA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" get_workspace_path() now converts a virtual drive path to a real path before any git repo operations are done. Cc: Ashley E Desimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Nate DeSimone Reviewed-by: Ashley DeSimone Reviewed-by: Erik Bjorge --- edkrepo/commands/clone_command.py | 8 ++++++++ edkrepo/config/config_factory.py | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/edkrepo/commands/clone_command.py b/edkrepo/commands/clone_com= mand.py index f638090..8769102 100644 --- a/edkrepo/commands/clone_command.py +++ b/edkrepo/commands/clone_command.py @@ -9,6 +9,7 @@ =20 import os import shutil +import sys =20 from edkrepo.commands.edkrepo_command import EdkrepoCommand from edkrepo.commands.edkrepo_command import SubmoduleSkipArgument, Source= ManifestRepoArgument @@ -20,6 +21,7 @@ from edkrepo.common.edkrepo_exception import EdkrepoInval= idParametersException, from edkrepo.common.edkrepo_exception import EdkrepoManifestNotFoundExcept= ion from edkrepo.common.humble import CLONE_INVALID_WORKSPACE, CLONE_INVALID_P= ROJECT_ARG, CLONE_INVALID_COMBO_ARG from edkrepo.common.humble import SPARSE_CHECKOUT, CLONE_INVALID_LOCAL_ROO= TS +from edkrepo.common.pathfix import get_subst_drive_dict from edkrepo.common.workspace_maintenance.workspace_maintenance import cas= e_insensitive_single_match from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t pull_all_manifest_repos, find_project_in_all_indices from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t list_available_manifest_repos @@ -77,6 +79,12 @@ class CloneCommand(EdkrepoCommand): workspace_dir =3D os.getcwd() else: workspace_dir =3D os.path.abspath(workspace_dir) + if sys.platform =3D=3D "win32": + subst =3D get_subst_drive_dict() + drive =3D os.path.splitdrive(workspace_dir)[0][0].upper() + if drive in subst: + workspace_dir =3D os.path.join(subst[drive], os.path.split= drive(workspace_dir)[1][1:]) + workspace_dir =3D os.path.normpath(workspace_dir) if os.path.isdir(workspace_dir) and os.listdir(workspace_dir): raise EdkrepoInvalidParametersException(CLONE_INVALID_WORKSPAC= E) if not os.path.isdir(workspace_dir): diff --git a/edkrepo/config/config_factory.py b/edkrepo/config/config_facto= ry.py index a82a438..fe69460 100644 --- a/edkrepo/config/config_factory.py +++ b/edkrepo/config/config_factory.py @@ -11,13 +11,16 @@ import os import sys import configparser import collections -from ctypes import * +if sys.platform =3D=3D "win32": + from ctypes import oledll, c_void_p, c_uint32, c_wchar_p + from ctypes import create_unicode_buffer =20 import edkrepo.config.humble.config_factory_humble as humble from edkrepo.common.edkrepo_exception import EdkrepoGlobalConfigNotFoundEx= ception, EdkrepoConfigFileInvalidException from edkrepo.common.edkrepo_exception import EdkrepoWorkspaceInvalidExcept= ion, EdkrepoGlobalDataDirectoryNotFoundException from edkrepo.common.edkrepo_exception import EdkrepoConfigFileReadOnlyExce= ption from edkrepo.common.humble import MIRROR_PRIMARY_REPOS_MISSING, MIRROR_DEC= ODE_WARNING, MAX_PATCH_SET_INVALID +from edkrepo.common.pathfix import get_subst_drive_dict from edkrepo_manifest_parser import edk_manifest from edkrepo.common.pathfix import expanduser =20 @@ -238,6 +241,11 @@ def get_workspace_path(): while True: if os.path.isdir(os.path.join(path, "repo")): if os.path.isfile(os.path.join(os.path.join(path, "repo"), "Ma= nifest.xml")): + if sys.platform =3D=3D "win32": + subst =3D get_subst_drive_dict() + drive =3D os.path.splitdrive(path)[0][0].upper() + if drive in subst: + path =3D os.path.join(subst[drive], os.path.splitd= rive(path)[1][1:]) return path if os.path.dirname(path) =3D=3D path: break --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65642): https://edk2.groups.io/g/devel/message/65642 Mute This Topic: https://groups.io/mt/77130070/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-