Fix problems in repository writer
* actually write the checksum * compress the repository info archive, too (handle it as separate section) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40426 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -36,9 +36,12 @@ public:
|
||||
virtual void OnPackageAdded(
|
||||
const BPackageInfo& packageInfo) = 0;
|
||||
|
||||
virtual void OnPackageAttributesSizeInfo(uint32 stringCount,
|
||||
virtual void OnRepositoryInfoSectionDone(
|
||||
uint32 uncompressedSize) = 0;
|
||||
virtual void OnRepositorySizeInfo(uint32 headerSize,
|
||||
virtual void OnPackageAttributesSectionDone(
|
||||
uint32 stringCount,
|
||||
uint32 uncompressedSize) = 0;
|
||||
virtual void OnRepositoryDone(uint32 headerSize,
|
||||
uint32 repositoryInfoLength,
|
||||
uint32 packageCount,
|
||||
uint32 packageAttributesSize,
|
||||
|
||||
@@ -64,11 +64,11 @@ private:
|
||||
status_t _Finish();
|
||||
|
||||
status_t _RegisterCurrentPackageInfo();
|
||||
status_t _WriteRepositoryInfo(
|
||||
ssize_t& _repositoryInfoLength);
|
||||
status_t _WriteRepositoryInfo(hpkg_repo_header& header,
|
||||
ssize_t& _infoLengthCompressed);
|
||||
off_t _WritePackageAttributes(
|
||||
hpkg_repo_header& header,
|
||||
off_t startOffset);
|
||||
hpkg_repo_header& header, off_t startOffset,
|
||||
ssize_t& _packagesLengthCompressed);
|
||||
|
||||
struct PackageNameSet;
|
||||
|
||||
|
||||
@@ -49,18 +49,19 @@ struct hpkg_repo_header {
|
||||
uint32 magic; // "hpkr"
|
||||
uint16 header_size;
|
||||
uint16 version;
|
||||
uint64 total_size;
|
||||
uint32 total_size;
|
||||
|
||||
// repository header
|
||||
uint32 repository_header_length;
|
||||
// repository info section
|
||||
uint32 info_compression;
|
||||
uint32 info_length_compressed;
|
||||
uint32 info_length_uncompressed;
|
||||
|
||||
// package attributes section
|
||||
uint32 attributes_compression;
|
||||
uint32 attributes_length_compressed;
|
||||
uint32 attributes_length_uncompressed;
|
||||
|
||||
uint64 attributes_strings_length;
|
||||
uint64 attributes_strings_count;
|
||||
uint32 packages_compression;
|
||||
uint32 packages_length_compressed;
|
||||
uint32 packages_length_uncompressed;
|
||||
uint32 packages_strings_length;
|
||||
uint32 packages_strings_count;
|
||||
};
|
||||
|
||||
|
||||
@@ -148,6 +149,7 @@ enum HPKGPackageAttributeID {
|
||||
HPKG_PACKAGE_ATTRIBUTE_FRESHENS,
|
||||
HPKG_PACKAGE_ATTRIBUTE_REPLACES,
|
||||
HPKG_PACKAGE_ATTRIBUTE_RESOLVABLE_OPERATOR,
|
||||
HPKG_PACKAGE_ATTRIBUTE_CHECKSUM,
|
||||
//
|
||||
HPKG_PACKAGE_ATTRIBUTE_ENUM_COUNT,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user