[Bug 1030278] Re: Quantal failed to install: ubiquity crashed in apt/progress/text.py in pulse: OverflowError: Python int too large to convert to C long

Barry Warsaw 1030278 at bugs.launchpad.net
Mon Oct 1 21:59:52 UTC 2012


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
Foundations Bugs, which is subscribed to python-apt in 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

Status in Python-APT:
  New
Status in “python-apt” package in Ubuntu:
  Triaged
Status in “python-apt” source package in Quantal:
  Triaged

Bug description:
  install problem of ubuntu12.10 quantal quetzal

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: ubiquity 2.11.18
  ProcVersionSignature: Ubuntu 3.5.0-6.6-generic 3.5.0
  Uname: Linux 3.5.0-6-generic i686
  ApportVersion: 2.4-0ubuntu5
  Architecture: i386
  CasperVersion: 1.320
  Date: Sat Jul 28 20:45:15 2012
  InstallCmdLine: noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash -- maybe-ubiquity
  LiveMediaBuild: Ubuntu 12.10 "Quantal Quetzal" - Alpha i386 (20120724.2)
  ProcEnviron:
   LANGUAGE=ko_KR.UTF-8
   TERM=linux
   PATH=(custom, no user)
   LANG=ko_KR.UTF-8
  SourcePackage: ubiquity
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-apt/+bug/1030278/+subscriptions




More information about the foundations-bugs mailing list