<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9953</bug_id>
          
          <creation_ts>2016-07-15 15:58:56 +0000</creation_ts>
          <short_desc>patchtest-oe: some series cannot be parse correctly and no checks can be done</short_desc>
          <delta_ts>2017-12-06 17:03:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Patchwork/Patchtest</product>
          <component>Patchtest</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</reporter>
          <assigned_to name="Daniela Plascencia">daniela.plascencia</assigned_to>
          <cc>damien.lespiau</cc>
    
    <cc>daniela.plascencia</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64050</commentid>
    <comment_count>0</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-07-15 15:58:56 +0000</bug_when>
    <thetext>The suite that check patches uses two (external) python modules to parse the mailbox (containing the patch series): mailbox and unidiff. The latter is used to convert diff into a python object but some of the series [1] raise an exception:

Traceback (most recent call last):
  File &quot;/usr/lib64/python2.7/unittest/suite.py&quot;, line 146, in _handleClassSetUp
    setUpClass()
  File &quot;/home/lsandov1/repos/pt-oe/base.py&quot;, line 38, in setUpClass
    cls.patchset = PatchSet(f, encoding=u&apos;UTF-8&apos;)
  File &quot;/usr/lib/python2.7/site-packages/unidiff-0.5.2-py2.7.egg/unidiff/patch.py&quot;, line 278, in __init__
    self._parse(data, encoding=encoding)
  File &quot;/usr/lib/python2.7/site-packages/unidiff-0.5.2-py2.7.egg/unidiff/patch.py&quot;, line 320, in _parse
    current_file._parse_hunk(line, diff, encoding)
  File &quot;/usr/lib/python2.7/site-packages/unidiff-0.5.2-py2.7.egg/unidiff/patch.py&quot;, line 193, in _parse_hunk
    raise UnidiffParseError(&apos;Hunk diff line expected: %s&apos; % line)
UnidiffParseError: Hunk diff line expected: diff --git a/meta/recipes-graphics/directfb/directfb/fix-client-gfx_state-initialisation.patch b/meta/recipes-graphics/directfb/d\
irectfb/fix-client-gfx_state-initialisation.patch

We need to figure out the root cause (series malformed or patch syntax not recognized by the library?).


[1] https://patchwork.openembedded.org/series/11/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64059</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-07-15 16:35:33 +0000</bug_when>
    <thetext>Another series with problems: https://patchwork.openembedded.org/series/193/

Traceback (most recent call last):
  File &quot;/usr/lib64/python2.7/unittest/suite.py&quot;, line 146, in _handleClassSetUp
    setUpClass()
  File &quot;/home/lsandov1/repos/pt-oe/base.py&quot;, line 38, in setUpClass
    cls.patchset = PatchSet(f, encoding=u&apos;UTF-8&apos;)
  File &quot;/usr/lib/python2.7/site-packages/unidiff-0.5.2-py2.7.egg/unidiff/patch.py&quot;, line 278, in __init__
    self._parse(data, encoding=encoding)
  File &quot;/usr/lib/python2.7/site-packages/unidiff-0.5.2-py2.7.egg/unidiff/patch.py&quot;, line 320, in _parse
    current_file._parse_hunk(line, diff, encoding)
  File &quot;/usr/lib/python2.7/site-packages/unidiff-0.5.2-py2.7.egg/unidiff/patch.py&quot;, line 193, in _parse_hunk
    raise UnidiffParseError(&apos;Hunk diff line expected: %s&apos; % line)
UnidiffParseError: Hunk diff line expected: self.rpm_libdir[1:])</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65647</commentid>
    <comment_count>2</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-08-31 15:02:14 +0000</bug_when>
    <thetext>Due to time constrains, moving it to M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66702</commentid>
    <comment_count>3</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-09-28 21:02:41 +0000</bug_when>
    <thetext>The problems comes from patchwork. Somehow, pw instruments the patch, destroying the diff format.

This is way another way to reproduce it without patchtest:
wget https://patchwork.openembedded.org/patch/125979/raw/ -O pw.mbox 
wget http://git.yoctoproject.org/cgit/cgit.cgi/poky/patch/?id=8c95d2220f1b477e32ed6cf4a28199590d15a411 -O git.patch


&gt;&gt;&gt; import unidiff
&gt;&gt;&gt; unidiff.PatchSet.from_filename(&apos;git.patch&apos;)
&lt;PatchSet: [&lt;PatchedFile: meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb.inc&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb/0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb/bashism.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb/compar_fn_t.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb/configurefix.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb/fix-client-gfx_state-initialisation.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb/fusion.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb/union-sigval.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch&gt;, &lt;PatchedFile: meta/recipes-graphics/directfb/directfb_1.7.7.bb&gt;]&gt;
&gt;&gt;&gt; unidiff.PatchSet.from_filename(&apos;pw.patch&apos;)
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/local/lib/python2.7/dist-packages/unidiff/patch.py&quot;, line 326, in from_filename
    instance = cls(f)
  File &quot;/usr/local/lib/python2.7/dist-packages/unidiff/patch.py&quot;, line 278, in __init__
    self._parse(data, encoding=encoding)
  File &quot;/usr/local/lib/python2.7/dist-packages/unidiff/patch.py&quot;, line 320, in _parse
    current_file._parse_hunk(line, diff, encoding)
  File &quot;/usr/local/lib/python2.7/dist-packages/unidiff/patch.py&quot;, line 193, in _parse_hunk
    raise UnidiffParseError(&apos;Hunk diff line expected: %s&apos; % line)
unidiff.errors.UnidiffParseError: Hunk diff line expected: diff --git a/meta/recipes-graphics/directfb/directfb/fix-client-gfx_state-initialisation.patch b/meta/recipes-graphics/directfb/directfb/fix-client-gfx_state-initialisation.patch


Perhaps long diff lines are being cut by pw, breaking the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66703</commentid>
    <comment_count>4</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-09-28 21:05:53 +0000</bug_when>
    <thetext>Damien,

we are seeing that long lines on mailing list patches are being truncated by PW. Do you happen to know the reason?

Daniela,
Please continue your debugging and file a bug in pw repository if necessary, so the pw community is aware of this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66913</commentid>
    <comment_count>5</comment_count>
    <who name="Daniela Plascencia">daniela.plascencia</who>
    <bug_when>2016-10-04 22:29:56 +0000</bug_when>
    <thetext>*** Bug 10355 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>