<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>32522</bug_id>
          
          <creation_ts>2016-09-23 18:06:19 +0300</creation_ts>
          <short_desc>gear produces diffs non-appliable by patch if there were submodule changes</short_desc>
          <delta_ts>2016-09-23 18:06:19 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>gear</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>17914</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Dmitry V. Levin">ldv</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>legion</cc>
    
    <cc>placeholder</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>158733</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-09-23 18:06:19 +0300</bug_when>
    <thetext>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&apos;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.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>