[BUG] pwclient broken for patch ID #197533

Yann E. MORIN yann.morin.1998 at free.fr
Mon Nov 12 05:07:40 EST 2012


Hello All!

On Friday 09 November 2012 Yann E. MORIN wrote:
> When I try to retrieve the patch #197533 with pwclient, I get a traceback:
> 
> ---8<---
> $ pwclient view 197533
> Traceback (most recent call last):
>   File "/home/ymorin/bin/pwclient", line 481, in <module>
>     main()
>   File "/home/ymorin/bin/pwclient", line 435, in main
>     s = rpc.patch_get_mbox(patch_id)
>   File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
>     return self.__send(self.__name, args)
>   File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
>     verbose=self.__verbose
>   File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
>     return self._parse_response(h.getfile(), sock)
>   File "/usr/lib/python2.6/xmlrpclib.py", line 1387, in _parse_response
>     p.feed(response)
>   File "/usr/lib/python2.6/xmlrpclib.py", line 601, in feed
>     self._parser.Parse(data, 0)
> xml.parsers.expat.ExpatError: not well-formed (invalid token): line 51, column 2
> ---8<---

Patchwork URL:
     http://patchwork.ozlabs.org/patch/197533/

After a more in-depth inspection of the patch, the line that causes issues
(line 51, column 2) is followed by a form-feed (ascii 0x0C). Here's the
corresponding hunk (yes, the patch #197533 adds a patch file):

  29  diff -r 51587db99510 -r ba9b356542d2 patches/binutils/2.22/500-fix-struct-stat.patch
  30  --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
  31  +++ b/patches/binutils/2.22/500-fix-struct-stat.patch   Tue Nov 06 17:42:39 2012 +0100
  32  @@ -0,0 +1,42 @@
  33  +diff -ur binutils-2.22.org/bfd/bfd-in2.h binutils-2.22/bfd/bfd-in2.h
  34  +--- binutils-2.22.org/bfd/bfd-in2.h    2011-09-16 03:15:18.000000000 +0200
  35  ++++ binutils-2.22/bfd/bfd-in2.h        2012-11-03 18:25:20.365668349 +0100
  36  +@@ -32,6 +32,8 @@
  37  + #ifndef __BFD_H_SEEN__
  38  + #define __BFD_H_SEEN__
  39  + 
  40  ++#include <sys/stat.h>
  41  ++
  42  + #ifdef __cplusplus
  43  + extern \"C\" {
  44  + #endif
  46  +@@ -308,8 +310,6 @@
  47  +    && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE             \
  48  +    && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
  49  + 
  50  +-/* Forward define.  */
  51  +-struct stat;
  52  + \f
  53  + typedef enum bfd_print_symbol
  54  + {

Notice the '\f' on line 52. The original source code _does_ have a form-feed
just in this place:

 308     && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE               \
 309     && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
 310  
 311  /* Forward define.  */
 312  struct stat;
 313  ^L
 314  typedef enum bfd_print_symbol
 315  {

Could that form-feed (ascii 0x0C) be the culprit for this error?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the Patchwork mailing list