Bug 32522 - gear produces diffs non-appliable by patch if there were submodule changes
Summary: gear produces diffs non-appliable by patch if there were submodule changes
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: gear (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Dmitry V. Levin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks: 17914
  Show dependency tree
 
Reported: 2016-09-23 18:06 MSK by Ivan Zakharyaschev
Modified: 2016-09-23 18:06 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2016-09-23 18:06:19 MSK
gear-2.0.7-alt1

If a diff-rule (in .gear/rules) takes two trees as the arguments which include a submodule path, and the submodule commit changed between the two tree, then the diff which is produced by gear is not appliable by patch:

$ cat I2util.rej 
--- I2util
+++ I2util
@@ -1 +1 @@
-Subproject commit 9f240cdbc0051a9754d6c773558e7b0a8c1b0400
+Subproject commit b0b4dccc6a9ee47d70ec7971a52c7a6a2079fe51

Work-around: filter out the submodule paths with something like patchutils from the saved patches.

It would be nice if gear would filter them out itself since they are useless for gear's purpose.

(On another hand, the failure of such a patch can be regarded as a warning that there is an unsupported kind of diff there, namely, submodules... But I assume tha the maintainer usually knows what he is doing, and knows that there are Git submodules in the upstream, and wants to ignore them when building.)