bugs: smart on fc5

Gustavo Niemeyer gustavo at niemeyer.net
Wed Apr 12 11:19:41 PDT 2006


> [atrpms]
> type = rpm-md
> name = atrpms
> baseurl = http://dl.atrpms.net/fc5-i386/atrpms/stable
(...)
> Channels: atrpms
> Summary: A RSS News Feed Plugin for MythTV.
> Description:
> Traceback (most recent call last):
>   File "/usr/bin/smart", line 194, in ?
>     main(sys.argv[1:])
>   File "/usr/bin/smart", line 167, in main
>     exitcode = iface.run(opts.command, opts.argv)
>   File "/usr/lib/python2.4/site-packages/smart/interface.py", line 53, 
> in run
>     result = _command.main(self._ctrl, opts)
>   File "/usr/lib/python2.4/site-packages/smart/commands/info.py", line 
> 128, in main
>     for line in info.getDescription().splitlines():
> AttributeError: 'NoneType' object has no attribute 'splitlines'

Cool!  With that information we can see that the "metadata" loader
is generating unexpected data.

Now, there's something very strange here. Look at how the description
get's into the PackageInfo.getDescription() result, in the code I
have:

    class RPMMetaDataPackageInfo(PackageInfo):
        ...
        def getDescription(self):
            return self._info.get("description", "")

...
        if elem.text:
            info["description"] = elem.text


In other words, no matter what happens, getDescription() should
*never* return None.

Can you please make a tarball with the code of smart that you're
running and mail me?

It'd be nice if you could do some additional tests as well, if
you have some Python experience.

(...)
> probably all the problems are coming from strange entries in the meta 
> descriptions. but this is hard to prevent. smart should survive all the 
> garbage packagers are putting in the rpms.

Agreed.

> thanks for your effort! you are doing a really great job.

Thanks!

-- 
Gustavo Niemeyer
http://niemeyer.net



More information about the Smart mailing list