Debian Patching: Patch apply doesn't order patch ID's based on patch dependency
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Jessica Castelino |
Bug Description
Brief Description
-----------------
When we apply a patch, it sorts the id list alphabetically and not based on the requires dependency.
Example:
If we have First_Patch, Second_Patch, Third_Patch and Fourth_Patch such that
Second_Patch requires First_Patch
Third_Patch requires Second Patch
Fourth_Patch requires Third_Patch
The patch apply ordering is [First_Patch, Fourth_Patch, Second_Patch, Third_Patch]
This will cause an error. The First_Patch will apply but the Fourth Patch will raise an error since the base commit wouldn't match (due to patch dependency on Third_Patch which hasn't yet been applied). As a result, we will be forced to apply one patch at a time.
This affects the "sw-patch apply --all" and vim that uses this API to apply patches.
The ideal ordering is [First_Patch, Second_Patch, Third_Patch, Fourth_Patch]
Severity
--------
Major
Steps to Reproduce
------------------
sw-patch upload First_Patch Second_Patch Third_Patch Fourth_Patch
sw-patch apply --all
Expected Behavior
------------------
Patches should be applied in the order [First_Patch, Second_Patch, Third_Patch, Fourth_Patch]
Actual Behavior
----------------
Patches are applied in the order [First_Patch, Fourth_Patch, Second_Patch, Third_Patch]
Reproducibility
---------------
100% reproducible
System Configuration
-------
All
Branch/Pull Time/Commit
-------
24th January, 2022
Last Pass
---------
N/A
Timestamp/Logs
--------------
N/A
Test Activity
-------------
Developer Testing
Workaround
----------
N/A
Changed in starlingx: | |
assignee: | nobody → Jessica Castelino (jcasteli) |
tags: | added: stx.update |
Changed in starlingx: | |
importance: | Undecided → Medium |
tags: | added: stx.8.0 |
Fix proposed to branch: master /review. opendev. org/c/starlingx /update/ +/871745
Review: https:/