NP, see diff below.
--- cache.py.org 2009-04-02 21:38:51.000000000 +0200
+++ cache.py 2009-04-02 21:39:16.000000000 +0200
@@ -211,23 +211,23 @@
raise Error, _("Invalid MD5 (expected %s, got %s)") % \
(filemd5, lfilemd5)
else:
- filesha256 = self.getInfo(uncompprefix+"sha256")
- if filesha256:
- try:
- from hashlib import sha256
- digest = sha256()
- file = open(localpath)
- data = file.read(BLOCKSIZE)
- while data:
- digest.update(data)
- data = file.read(BLOCKSIZE)
- lfilesha256 = digest.hexdigest()
- if lfilesha256 != filesha256:
- raise Error, _("Invalid SHA256 (expected %s, got
%s)") % \
- (filesha256, lfilesha256)
- return
- except ImportError:
- pass
+# filesha256 = self.getInfo(uncompprefix+"sha256")
+# if filesha256:
+# try:
+# from hashlib import sha256
+# digest = sha256()
+# file = open(localpath)
+# data = file.read(BLOCKSIZE)
+# while data:
+# digest.update(data)
+# data = file.read(BLOCKSIZE)
+# lfilesha256 = digest.hexdigest()
+# if lfilesha256 != filesha256:
+# raise Error, _("Invalid SHA256 (expected %s,
got %s)") % \
+# (filesha256, lfilesha256)
+# return
+# except ImportError:
+# pass
filesha = self.getSHA(url)
if filesha:
try:
--------------------------------------------------
From: "john bray" <[email protected]>
Sent: Thursday, April 02, 2009 8:02 PM
To: "Mark Wormgoor" <[email protected]>
Cc: <[email protected]>
Subject: Re: [ATrpms-users] Smart: NameError: global name 'item' is not
defined
> hey mark!
>
> you are my hero! i just have spent the past 2 hours trying to remotely
> help a friend with exactly that problem.
>
> is it possible you could post the specific code that you took out? heh.
> i need to be very very specific with what i tell him to do. :-)
>
> john
>
> On Thu, 2009-04-02 at 09:58 +0200, Mark Wormgoor wrote:
>> Hi,
>>
>> I'm trying to upgrade my CentOS to 5.3 (just using smart upgrade), but I
>> get
>> the traceback below when trying to commit. I'm running the latest smart
>> (smart-1.2-60.el5.x86_64).
>>
>> Confirm changes? (Y/n):
>>
>> Traceback (most recent call last):
>> File "/usr/bin/smart", line 195, in ?
>> main(sys.argv[1:])
>> File "/usr/bin/smart", line 168, in main
>> exitcode = iface.run(opts.command, opts.argv)
>> File
>> "/usr/lib64/python2.4/site-packages/smart/interfaces/text/interactive.py",
>> line 46, in run
>> Interpreter(self._ctrl).cmdloop()
>> File "/usr/lib64/python2.4/cmd.py", line 142, in cmdloop
>> stop = self.onecmd(line)
>> File
>> "/usr/lib64/python2.4/site-packages/smart/interfaces/text/interactive.py",
>> line 195, in onecmd
>> return Cmd.onecmd(self, line)
>> File "/usr/lib64/python2.4/cmd.py", line 219, in onecmd
>> return func(arg)
>> File
>> "/usr/lib64/python2.4/site-packages/smart/interfaces/text/interactive.py",
>> line 516, in do_commit
>> if self._ctrl.commitTransaction(transaction):
>> File "/usr/lib64/python2.4/site-packages/smart/control.py", line 505,
>> in
>> commitTransaction
>> return self.commitChangeSet(trans.getChangeSet(), caching, confirm)
>> File "/usr/lib64/python2.4/site-packages/smart/control.py", line 553,
>> in
>> commitChangeSet
>> caching)
>> File "/usr/lib64/python2.4/site-packages/smart/control.py", line 667,
>> in
>> fetchPackages
>> fetcher.run(what=_("packages"))
>> File "/usr/lib64/python2.4/site-packages/smart/fetcher.py", line 191,
>> in
>> run
>> self.runLocal()
>> File "/usr/lib64/python2.4/site-packages/smart/fetcher.py", line 180,
>> in
>> runLocal
>> handler.runLocal()
>> File "/usr/lib64/python2.4/site-packages/smart/fetcher.py", line 744,
>> in
>> runLocal
>> withreason=True)
>> File "/usr/lib64/python2.4/site-packages/smart/fetcher.py", line 356,
>> in
>> validate
>> localpath, withreason=True)
>> File "/usr/lib64/python2.4/site-packages/smart/cache.py", line 214, in
>> validate
>> filesha256 = item.getInfo(uncompprefix+"sha256")
>> NameError: global name 'item' is not defined
>>
>> I've checked with the current smart code
>> (http://bazaar.launchpad.net/~smartpm/smart/trunk/annotate/head:/smart/cache.py)
>> and it doesn't contain the filesha256 block at all. I've commented out
>> lines
>> 214-230 in cache.py and it's fine now.
>>
>> Kind regards,
>>
>> Mark Wormgoor
>>
>>
>> _______________________________________________
>> atrpms-users mailing list
>> [email protected]
>> http://lists.atrpms.net/mailman/listinfo/atrpms-users
> --
> cleverly disguised as a responsible adult.
>
>
_______________________________________________
atrpms-users mailing list
[email protected]
http://lists.atrpms.net/mailman/listinfo/atrpms-users