Commit Graph

7 Commits

Author SHA1 Message Date
Ingo Weinhold 00bc8e9cbd Add support for adding/updating package entries
Add flags parameter to BPackageWriter::Init() (and the private
implementation classes) to indicate that an existing package file shall
be updated instead of created. Currently that always happens in-place.
2011-11-25 06:18:58 +01:00
Ingo Weinhold 9e93bb4bfc Write resolvable compatible version to the package
To avoid a clash with the regular version or an extra attribute level we
use the "package:provides.compatible" package attribute instead of
"package:version.major".
2011-11-25 06:18:27 +01:00
Oliver Tappe 34d56c1bf5 * implemented repository reader and fixed some bugs in writer that
have been exposed during testing of reader

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-14 20:25:10 +00:00
Oliver Tappe 33bc4425be Largish adjustments to PackagerReaderImpl and package attribute
handling:
* package attributes are now compatible with the low level attribute
  handling of other HPKG attributes (such that 'package dump' now shows 
  package attributes, too)
* dropped type names from hpkg format, the attributes were identified
  by IDs already and this simplifies the code considerably. Type names
  are now handled in BLowLevelPackageHandler only.
* instead of rolling their own mechanism, high-level package attributes 
  handling is now implemented via a corresonding set of 
  AttributeHandler-subclasses
* adjusted package writer to only write package attributes that are
  needed (empty ones are left out)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-12 19:21:37 +00:00
Oliver Tappe 79f15e1918 * minor cleanup: respect 80 chars limit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 15:19:26 +00:00
Oliver Tappe 4ee7d007d6 Cleanup:
* PackageWriterImpl no longer accesses members of WriterImplBase 
  directly, but uses getters/setters instead
* package attribute registration has been moved from PackageWriterImpl
  to WriterImplBase, as it will be used in the same manner by the
  RepositoryWriter


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 10:59:38 +00:00
Oliver Tappe f202217364 Refactoring step towards implementation of RepositoryWriter:
* pulled commonly useful parts out of PackageWriterImpl into 
  WriterImplBase
* moved CachedStringTable and related methods into a separate class,
  StringCache, in order to support having more than one string cache
  per package file
* made package attribute section use a string cache, too, as that's
  going to be very useful for repositories
* instead of writing package attributes directly, we now collect
  corresponding PackageAttributes and write those later
* adjusted package reader accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-07 22:25:16 +00:00