[csw-maintainers] Issue with checkpkg

Yann Rouillard yann at pleiades.fr.eu.org
Fri Jul 13 00:34:02 CEST 2012


Hi,

I am still running into a checkpkg unicode problem while building gnomevfs2:

Traceback (most recent call last):########
                                                                           |
  File "/home/yann/opencsw/.buildsys/v2/gar//bin/checkpkg", line 197, in
<module>
    main()
  File "/home/yann/opencsw/.buildsys/v2/gar//bin/checkpkg", line 158, in
main
    exit_code, screen_report, tags_report = check_manager.Run()
  File "/home/yann/opencsw/.buildsys/v2/lib/python/checkpkg_lib.py", line
827, in Run
    return super(CheckpkgManager2, self).Run()
  File "/home/yann/opencsw/.buildsys/v2/lib/python/checkpkg_lib.py", line
250, in Run
    tag_info=unicode(tag_info, "utf-8")
TypeError: decoding Unicode is not supported


It seems tag_info can also already be unicode.

When I use checkpkg on gnomevfs, it fails when processing the following
error:
    CheckpkgTag('CSWgnomevfs2', 'missing-dependency', u'CSWlibsmbclient0')

u'CSWlibsmbclient0' is already unicode, hence the error.

I commited a quick fix to be able to continue to work and to potentially
unblock other maintainers:
http://sourceforge.net/apps/trac/gar/changeset/18716/csw/mgar/gar/v2/lib/python

Maciej could you have a look to tell if there is a better way to fix this ?
Should all tag_info be str instead of unicode ?

Thanks in advance,

Yann


2012/7/10 Dagobert Michelsen <dam at opencsw.org>

> Hi Maciej,
>
> Am 10.07.2012 um 13:27 schrieb Maciej (Matchek) Bliziński:
>
> 2012/7/10 Dagobert Michelsen <dam at opencsw.org>
>
>> This looks like an artifact from the previous change to allow utf8. Any
>> ideas?
>
>
> Yes, it's a breakage caused by a change intended to fix the other issue.
> Something that would work for all cases. We first prepare a variable that
> is either unicode or None:
>
> tag_info = e.tag_info
> if tag_info is not None:
>   tag_info = unicode(tag_info, "utf-8")
>
> And then we store that variable in the database:
>
> (...) tag_info=tag_info)
>
> Dago, I'll let you figure out the details. If the fix works, please commit.
>
>
> Harhar, still trying to make a Python programmer out of me? ;-)
>   https://sourceforge.net/apps/trac/gar/changeset/18696
>
>
> Best regards
>
>   -- Dago
>
>
>  --
> "You don't become great by trying to be great, you become great by wanting
> to do something,
> and then doing it so hard that you become great in the process." - xkcd
> #896
>
>
> _______________________________________________
> maintainers mailing list
> maintainers at lists.opencsw.org
> https://lists.opencsw.org/mailman/listinfo/maintainers
> .:: This mailing list's archive is public. ::.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20120713/3857fa88/attachment.html>


More information about the maintainers mailing list