From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: steven.shi@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Mon, 17 Jun 2019 01:44:05 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 01:44:04 -0700 X-ExtLoop1: 1 Received: from jshi19-mobl.ccr.corp.intel.com ([10.254.215.142]) by fmsmga006.fm.intel.com with ESMTP; 17 Jun 2019 01:44:03 -0700 From: "Steven Shi" To: devel@edk2.groups.io Cc: liming.gao@intel.com, bob.c.feng@intel.com, christian.rodriguez@intel.com Subject: [PATCH v2 0/1] BaseTools:Introduce CopyFileOnChange() function to copy cache files Date: Mon, 17 Jun 2019 16:43:57 +0800 Message-Id: <20190617084358.6168-1-steven.shi@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 V2: set shallow=False in filecmp.cmp() to compare the src and dsc files content use shutil.copy() replace the shutil.copyfile() to do the file copy, which is better to reserve the dsc file metadata V1: Initial fix Steven Shi (1): BaseTools:Introduce CopyFileOnChange() function to copy cache files BaseTools/Source/Python/AutoGen/AutoGen.py | 10 ++-- .../Source/Python/Common/LongFilePathOs.py | 4 ++ BaseTools/Source/Python/Common/Misc.py | 55 +++++++++++++++++++ 3 files changed, 64 insertions(+), 5 deletions(-) -- 2.17.1.windows.2