Skip to content

1.4

Compare
Choose a tag to compare
@gapan gapan released this 21 Jan 09:42
· 40 commits to master since this release

Parse packages sizes >=1GB

Some packages have now become too big. The kernel-source package is 1.1GB installed. When installed with pkgtools, its size is now stated as "1.1G" in the UNCOMPRESSED SIZE field in the respective /var/lib/pkgtools/packages file.

There's also another issue that this change doesn't handle. In some languages the decimal point is a "," instead of a "." and that's what the numfmt tool, which is used by pkgtools, uses. So the size is stated as "1,1G" instead. The C sscanf function we're using here doesn't parse that correctly, leaving the decimal part out. So a package of size "1,9G" would end up showing as 1024M. Same issue with packages of size >1MB and <10MB, they would show up as "1,1M" for example. This doesn't create any actual problems with installing/removing/upgrading packages through. The discrepancy is only showed when running spkg --list. I'll leave it like this for now.