From nobody Mon May 20 07:56:06 2024 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+57769+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+57769+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1587511626; cv=none; d=zohomail.com; s=zohoarc; b=ifFiiEHOoS1/K0eIbj6+wg16vlTGJcqzZE/T6AGqq3noDbuNZg7N0sd5DlwovuwmSUnfFyl8I6wOiewAJvXv1hW6/ufVESDmKsz0IaP9CKIMxJ5RzOaRvwiSLXR4pSUP5YdQWgAQxylREX4uUkrO9rMnbstTq+EdZU7moBBKgDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587511626; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=cRQeDx8UuUF3EhbbKhogn+iqyLCpDdbdAHQnONRDN9k=; b=k9rbuZn3AXv7Nu1EI5qtP7qXCRWg8R6mTm50sA8dMnwchYdhTUdwUOIJgAdFgRdGM6Qz7vI7nWlKkPPBtSkmh+/L6duXz0nQwQB4gZmEWaAT9TxhLwUULvbjnbTlrh3gcQnu43KigXgnolcI9yg1qXpbd6y2a1qmJMxu4KRjTqg= 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+57769+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 1587511626250266.5411937068866; Tue, 21 Apr 2020 16:27:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id pfYoYY1788612xJg41kAG5I1; Tue, 21 Apr 2020 16:27:05 -0700 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.1022.1587511624924453176 for ; Tue, 21 Apr 2020 16:27:05 -0700 IronPort-SDR: q6djlgg3f5UQqOoDCYmACVFajwFhEXI3M8yxTJoSg8ehG+24u9cK0iBf3o2+B3KQFpcxZy98SE jKI0GgLqFt6A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 16:27:04 -0700 IronPort-SDR: YeipolVFtr63lR4gRSpjfA7bRHWxGiOLMc7loQxC8exqU/S95KUD3rVFW/RT7c6azfs8Rhl+07 jTYnD5a0fgTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,411,1580803200"; d="scan'208";a="291754455" X-Received: from ecbjorge-mobl1.amr.corp.intel.com ([10.252.132.250]) by orsmga008.jf.intel.com with ESMTP; 21 Apr 2020 16:27:03 -0700 From: "Bjorge, Erik C" To: devel@edk2.groups.io Cc: Nate DeSimone , Ashley DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Improve removal of content with AlwaysExclude Date: Tue, 21 Apr 2020 16:26:35 -0700 Message-Id: <5612a4e98256fbb2230393845632116b5a10729e.1587511536.git.erik.c.bjorge@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,erik.c.bjorge@intel.com X-Gm-Message-State: GM52IBSN6cpYyoCWNrbobx0sx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1587511625; bh=UfdH8cZqvqX/xGrwHZHgRkVqErmQfmE0iTbshAb2lv4=; h=Cc:Date:From:Reply-To:Subject:To; b=M5YdXYUupIMK/+snwueJR3rL/mKlhu0IY46QQqqOx2K/6WJz5rQnaoU2ZH8I5g8WGXm WWOg6v6g2YFoFMpGYNqD2WEGLPohvsGUzY0Go2+uqEjhBnWPhDvHHB2cz/stkU1skuO6R Chu+UeLmUIQRJjKF+fpnU6JC4Z2E6/vFl8g= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The AlwaysExclude XML tag has existed but only removed entries from the list of sparse objects. Now items in the AlwaysExclude tag will be actively removed by prefixing '!' to the entry. Signed-off-by: Erik Bjorge Cc: Nate DeSimone Cc: Ashley DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman Reviewed-by: Ashley DeSimone Reviewed-by: Nate DeSimone --- project_utils/sparse.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/project_utils/sparse.py b/project_utils/sparse.py index b17d688..dbe2d80 100644 --- a/project_utils/sparse.py +++ b/project_utils/sparse.py @@ -3,7 +3,7 @@ ## @file # sparse.py # -# Copyright (c) 2017- 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017- 2020, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # import os @@ -552,11 +552,11 @@ class BuildInfo: =20 def sparse_checkout(self, root=3DNone, always_include=3D[], always_exc= lude=3D[]): """Performs a sparse checkout operation on a single repository""" - local_prune_data =3D set() + local_prune_data =3D [] for item in always_include: - local_prune_data.add('/{}'.format(item)) + local_prune_data.append('/{}'.format(item)) for item in always_exclude: - local_prune_data.discard('/{}'.format(item)) + local_prune_data.append('!/{}'.format(item)) try: repo =3D git.Repo(root) except: @@ -578,7 +578,11 @@ def process_sparse_checkout(workspace_root, repo_list,= current_combo, manifest): workspace_list.extend([os.path.join(workspace_root, os.path.normpath(x= .root)) for x in repo_list]) =20 # Filter sparse data entries that apply to the current combo or all co= mbos - sparse_data =3D [x for x in manifest.sparse_data if x.combination is N= one or x.combination =3D=3D current_combo] + # Build list in three steps (all, repo, combo) to make sure the priori= ty is correct + sparse_data =3D [] + sparse_data.extend([x for x in manifest.sparse_data if x.remote_name i= s None and x.combination is None]) + sparse_data.extend([x for x in manifest.sparse_data if x.remote_name i= s not None and x.combination is None]) + sparse_data.extend([x for x in manifest.sparse_data if x.remote_name i= s not None and x.combination =3D=3D current_combo]) =20 # Create object that processes build information. build_info =3D BuildInfo(workspace_list) @@ -602,8 +606,8 @@ if __name__ =3D=3D "__main__": # Program Information # __title__ =3D 'Sparse Checkout' - __version__ =3D '0.02.00' - __copyright__ =3D 'Copyright (c) 2017, Intel Corporation. All rights r= eserved.' + __version__ =3D '0.03.00' + __copyright__ =3D 'Copyright (c) 2017 - 2020, Intel Corporation. All r= ights reserved.' =20 # # Processes command line arguments --=20 2.21.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 (#57769): https://edk2.groups.io/g/devel/message/57769 Mute This Topic: https://groups.io/mt/73185406/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-