[haiku-bugs] Re: [Haiku] #15806: package produce invalid HPKG file when archiving large folder with a lot of files

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sat, 16 May 2020 19:37:28 -0000

#15806: package produce invalid HPKG file when archiving large folder with a 
lot of
files
-------------------------------+----------------------------
  Reporter:  X512              |      Owner:  nobody
      Type:  bug               |     Status:  new
  Priority:  normal            |  Milestone:  Unscheduled
 Component:  Kits/Package Kit  |    Version:  R1/Development
Resolution:                    |   Keywords:
Blocked By:                    |   Blocking:
  Platform:  All               |
-------------------------------+----------------------------

Old description:

This is hrev53967.

When creating HPKG file with `package create -0 -i
/path/to/stub.PackageInfo /path/to/Package.hpkg` from folder with a lot
of small files and total size about 10GB and then extracting with
`package extract /path/to/Package.hpkg`, extraction fails with `Error:
Malformed TOC strings section`.

If HPKG format has some limitation on file count, creation should fail
instead of silently creating invalid HPKG. If there are no limitation,
this is a bug and it should be fixed.

New description:

 This is hrev53967.

 When creating HPKG file with `package create -0 -i
 /path/to/stub.PackageInfo /path/to/Package.hpkg` from folder with a lot of
 small files and total size about 10GB and then extracting with `package
 extract /path/to/Package.hpkg`, extraction fails with `Error: Malformed
 TOC strings section`.

 If HPKG format has some limitation on file count, creation should fail
 instead of silently creating invalid HPKG. If there are no limitation,
 this is a bug and it should be fixed.

--
Comment (by pulkomandy):

 I don't see any limitation in the package format. The sum of length of
 file and directory and attribute names must fit in the "toc" section so
 it's limited to 2^64^ bytes but I doubt that's the limit you hit.

 The data section offsets are encoded using a variable-length integer
 format so it's unlimited.

 So it is more likely a bug in the package tool.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15806#comment:1>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: