repository writer: fix use of incorrect header size

The header size of the package file header was used, which resulted in
broken repository files.