mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
6405ecb259
I've tracked this back toe223366
and it looks like this just forces KiB because back then humanize_size didn't exist, but the size was just divided by 1024 to keep it somewhat readable. When humanize_size got introduced in3c8a448
this was just carried over. The unit detected for "Download Size" is reused for "Installed Size" to make it easier to read. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
31 lines
916 B
Python
31 lines
916 B
Python
self.description = "Query info on a package (overflow long values)"
|
|
|
|
p = pmpkg("overflow")
|
|
p.desc = "Overflow size and date values if possible"
|
|
p.url = "http://www.archlinux.org"
|
|
p.license = "GPL2"
|
|
p.arch = "i686"
|
|
p.packager = "Arch Linux"
|
|
# size is greater than 4294967295, aka UINT_MAX
|
|
p.size = "10000000000"
|
|
# build date is greater than 2147483647, aka INT_MAX
|
|
p.builddate = "3000000000"
|
|
# install date is greater than UINT_MAX
|
|
p.installdate = "10000000000"
|
|
|
|
self.addpkg2db("local", p)
|
|
|
|
self.args = "-Qi %s" % p.name
|
|
|
|
self.addrule("PACMAN_RETCODE=0")
|
|
self.addrule("PACMAN_OUTPUT=^Name.*%s" % p.name)
|
|
self.addrule("PACMAN_OUTPUT=^Description.*%s" % p.desc)
|
|
self.addrule("PACMAN_OUTPUT=^Installed Size.*9.31 GiB")
|
|
self.addrule("PACMAN_OUTPUT=^Build Date.* 2065")
|
|
self.addrule("PACMAN_OUTPUT=^Install Date.* 2286")
|
|
|
|
# expect failure on 32bit systems
|
|
import sys
|
|
if sys.maxsize <= 2**32:
|
|
self.expectfailure = True
|