Okay, this is clearly a problem in StrSizeToStr() and I think both bugs are related to this. First, StrSizeToStr() never checks whether an exception occurs during conversion, so that's likely the problem of the bogus traceback. Second, StrSizeToStr() needs to PyLong_Check() *before* it PyInt_Check()s because in Python 3, the latter is aliased to the former, however, if the object is an *actual* PyLong, it will be convertable to a double (as per PyLong_AsDouble()) for more values than it will be convertable to a long (as per PyInt_AsLong(), a.k.a. in Python 3, PyLong_asLong()).
The attached diff should fix both problems. I've tested it with various values in an i386 chroot and it seems to work correctly now. Just don't try to convert 21474836480000000000000000000. I guess SizeToStr() can't handle anything over thousands of yottabytes. Darn, I might have to return my new hard drive. This patch doesn't do much about that. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1030278 Title: Quantal failed to install: ubiquity crashed in apt/progress/text.py in pulse: OverflowError: Python int too large to convert to C long To manage notifications about this bug go to: https://bugs.launchpad.net/python-apt/+bug/1030278/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
