On Tue, 25 Oct 2005, Ken Schneider wrote:

> Trying to use smart on a 9.3 system. When running smart update the cache
> will only build to 91% then the apt crashes with the following:
> 
> smart update suse-93-security-apt
> Traceback (most recent call last):##################################
> ( 91%)
>   File "/usr/bin/smart", line 193, in ?
>     main(sys.argv[1:])
>   File "/usr/bin/smart", line 166, 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/update.py", line
> 77, in main
>     ctrl.reloadChannels()
>   File "/usr/lib/python2.4/site-packages/smart/control.py", line 375, in
> reloadChannels
>     self._cache.load()
>   File "/usr/lib/python2.4/site-packages/smart/backends/rpm/header.py",
> line 253, in load
>     reqdict[(f[i]&7744 and PreReq or Req,
> TypeError: unsubscriptable object
> 
> Any clues on how to fix this?

--- smart/backends/rpm/header.py
+++ smart/backends/rpm/header.py
@@ -246,6 +250,8 @@
                             # RPMSENSE_SCRIPT_PREUN |
                             # RPMSENSE_SCRIPT_POST |
                             # RPMSENSE_SCRIPT_POSTUN == 7744
+                            if type(f) != list:
+                              f = [f]
                             reqdict[(f[i]&7744 and PreReq or Req,
                                      intern(ni), r, vi)] = True
                 reqargs = reqdict.keys()


Regards
        Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to