python: refresh patches

The patch tool will apply patches by default with "fuzz", which is where if the
hunk context isn't present but what is there is close enough, it will force the
patch in.

Whilst this is useful when there's just whitespace changes, when applied to
source it is possible for a patch applied with fuzz to produce broken code which
still compiles (see #10450).  This is obviously bad.

We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For
that to be realistic the existing patches with fuzz need to be rebased and
reviewed.

(From OE-Core rev: 0b25fcee333e6207a8596d26adfa65fec85c26df)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2018-03-08 20:18:02 +02:00
committed by Richard Purdie
parent e5f5aa5604
commit fe9e4bbee7
7 changed files with 57 additions and 81 deletions

View File

@@ -17,12 +17,12 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Lib/sysconfig.py | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index a545ab9..74317d1 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -554,7 +554,10 @@ def get_config_vars(*args):
_config_vars['exec_prefix'] = EXEC_PREFIX
Index: Python-3.5.3/Lib/distutils/sysconfig.py
===================================================================
--- Python-3.5.3.orig/Lib/distutils/sysconfig.py
+++ Python-3.5.3/Lib/distutils/sysconfig.py
@@ -498,7 +498,10 @@ def get_config_vars(*args):
_config_vars['SO'] = SO
# Always convert srcdir to an absolute path
- srcdir = _config_vars.get('srcdir', project_base)
@@ -33,11 +33,11 @@ index a545ab9..74317d1 100644
if os.name == 'posix':
if python_build:
# If srcdir is a relative path (typically '.' or '..')
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 7287f11..cc92998 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -562,7 +562,10 @@ def get_config_vars(*args):
Index: Python-3.5.3/Lib/sysconfig.py
===================================================================
--- Python-3.5.3.orig/Lib/sysconfig.py
+++ Python-3.5.3/Lib/sysconfig.py
@@ -544,7 +544,10 @@ def get_config_vars(*args):
_CONFIG_VARS['userbase'] = _getuserbase()
# Always convert srcdir to an absolute path
@@ -49,6 +49,3 @@ index 7287f11..cc92998 100644
if os.name == 'posix':
if _PYTHON_BUILD:
# If srcdir is a relative path (typically '.' or '..')
--
1.7.9.5