Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionBrian J. Murrell
2020-12-07 23:04:09 UTC
Description of problem:
If I have a patch produced from git such as:
diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py
index 468b7d57..ed494733 100644
--- a/selftests/functional/test_basic.py
+++ b/selftests/functional/test_basic.py
@@ -184,6 +184,13 @@ class RunnerOperationTest(unittest.TestCase):
self.assertIn(' data ' + mapping['data_dir'], result.stdout)
self.assertIn(' logs ' + mapping['logs_dir'], result.stdout)
+ def test_runner_phases(self):
+ cmd_line = ('%s run --sysinfo=off --job-results-dir %s '
+ 'phases.py' % (AVOCADO, self.tmpdir))
+ result = process.run(cmd_line)
+ expected_rc = exit_codes.AVOCADO_ALL_OK
+ self.assertEqual(result.exit_status, expected_rc,
+ "Avocado did not return rc %d:\n%s" % (expected_rc, result))
def test_runner_all_ok(self):
os.chdir(basedir)
cmd_line = ('%s run --sysinfo=off --job-results-dir %s '
and run it through filterdiff -p1 -x selftests/\*, the header of the file being excluded from the patch is still included:
$ filterdiff -p1 -x selftests/\* < foo.patch
diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py
index 468b7d57..ed494733 100644
Which causes patch to barf:
$ filterdiff -p1 -x selftests/\* < foo.patch | patch -p1 --dry-run
can't find file to patch at input line 2
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py
|index 468b7d57..ed494733 100644
--------------------------
File to patch:
Version-Release number of selected component (if applicable):
patchutils-0.3.3-4.el7.x86_64.rpm
How reproducible:
100%
Steps to Reproduce:
1. See description. It's quite detailed.
Actual results:
Patch fails on filterdiff output
Expected results:
Patch should not fail
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (patchutils bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2021:0342
Description of problem: If I have a patch produced from git such as: diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py index 468b7d57..ed494733 100644 --- a/selftests/functional/test_basic.py +++ b/selftests/functional/test_basic.py @@ -184,6 +184,13 @@ class RunnerOperationTest(unittest.TestCase): self.assertIn(' data ' + mapping['data_dir'], result.stdout) self.assertIn(' logs ' + mapping['logs_dir'], result.stdout) + def test_runner_phases(self): + cmd_line = ('%s run --sysinfo=off --job-results-dir %s ' + 'phases.py' % (AVOCADO, self.tmpdir)) + result = process.run(cmd_line) + expected_rc = exit_codes.AVOCADO_ALL_OK + self.assertEqual(result.exit_status, expected_rc, + "Avocado did not return rc %d:\n%s" % (expected_rc, result)) def test_runner_all_ok(self): os.chdir(basedir) cmd_line = ('%s run --sysinfo=off --job-results-dir %s ' and run it through filterdiff -p1 -x selftests/\*, the header of the file being excluded from the patch is still included: $ filterdiff -p1 -x selftests/\* < foo.patch diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py index 468b7d57..ed494733 100644 Which causes patch to barf: $ filterdiff -p1 -x selftests/\* < foo.patch | patch -p1 --dry-run can't find file to patch at input line 2 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py |index 468b7d57..ed494733 100644 -------------------------- File to patch: Version-Release number of selected component (if applicable): patchutils-0.3.3-4.el7.x86_64.rpm How reproducible: 100% Steps to Reproduce: 1. See description. It's quite detailed. Actual results: Patch fails on filterdiff output Expected results: Patch should not fail