[Bug 610820] Re: Download size discrepancies

Loïc Minier lool at dooz.org
Thu May 26 17:25:10 UTC 2011


I tested this debdiff in a maverick non-virtual PPA (linaro-
maintainers/tools) on armel and it allowed the test case to pass.

** Description changed:

- I'm using 10.10 and when using the Update manager, the download sizes
- are off. The ones shown in the main window are lower than those that are
- shown in the downloading packages window. Some testing showed that the
- percent they are off by is 2.4 (I.E. 980k shown in the main window, but
- 1,004k shown in the downloads window.) Will attach a screen shot if
- needed.
+ python-apt returns incorrect values for some API functions on ARM due to
+ broken signed/unsigned and long/int integer conversions.
+ 
+ Impact:
+ bogus values (e.g. read from stack) for some function calls such as size of a package in cache; this causes user visible issues such as update-manager download sizes, or breaks linaro-image-tools when creating Linaro images (maverick host)
+ 
+ Fix:
+ This was fixed by using MkPyNumber(...) instead of Py_BuildValue("i", ...) or Py_BuildValue("k", ...)
+ 
+ TEST CASE:
+ run lp610820.py attached to this bug; if the output is a single entry in the size -> number of packages in cache hash, then python-apt is broken:
+         0 => 33936
+ 
+ instead, it should look like a long distribution of values in the form of:
+       922 =>     4
+      1798 =>     6
+      1800 =>     4
+      1802 =>     5
+      1828 =>     6
+      1830 =>    10
+      1832 =>     7
+ 
+ Regression potential:
+ Could break the patches functions or could regress applications which relied on the bogus behavior; the builtin testsuite which is run during package build will help a bit with catching the first class of issues, and we'd likely want to fix the other issues by themselves.  Testsuite coverage is likely not 100% perfect though

** Changed in: python-apt (Ubuntu Maverick)
     Assignee: (unassigned) => Loïc Minier (lool)

** Changed in: python-apt (Ubuntu Natty)
     Assignee: (unassigned) => Loïc Minier (lool)

** Patch added: "python-apt_0.7.96.1ubuntu11.2.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/610820/+attachment/2143839/+files/python-apt_0.7.96.1ubuntu11.2.debdiff

-- 
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/610820

Title:
  Download size discrepancies

Status in Update Manager:
  Invalid
Status in “python-apt” package in Ubuntu:
  Fix Released
Status in “python-apt” source package in Maverick:
  Triaged
Status in “python-apt” source package in Natty:
  Triaged

Bug description:
  python-apt returns incorrect values for some API functions on ARM due
  to broken signed/unsigned and long/int integer conversions.

  Impact:
  bogus values (e.g. read from stack) for some function calls such as size of a package in cache; this causes user visible issues such as update-manager download sizes, or breaks linaro-image-tools when creating Linaro images (maverick host)

  Fix:
  This was fixed by using MkPyNumber(...) instead of Py_BuildValue("i", ...) or Py_BuildValue("k", ...)

  TEST CASE:
  run lp610820.py attached to this bug; if the output is a single entry in the size -> number of packages in cache hash, then python-apt is broken:
          0 => 33936

  instead, it should look like a long distribution of values in the form of:
        922 =>     4
       1798 =>     6
       1800 =>     4
       1802 =>     5
       1828 =>     6
       1830 =>    10
       1832 =>     7

  Regression potential:
  Could break the patches functions or could regress applications which relied on the bogus behavior; the builtin testsuite which is run during package build will help a bit with catching the first class of issues, and we'd likely want to fix the other issues by themselves.  Testsuite coverage is likely not 100% perfect though




More information about the foundations-bugs mailing list