Commit Graph

31 Commits

Author SHA1 Message Date
Oliver Tappe 07b37bb0a0 * fix value of all enumeration types that are stored as part of a
package or repository file

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-15 18:33:19 +00:00
Oliver Tappe c9acc4f8cd * implemented reading of package-infos in BRepositoryCache
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-15 15:47:20 +00:00
Oliver Tappe 2b6e6760b6 * add listing of repository attributes to 'package_repo list'
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-15 12:48:02 +00: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 c2388992ec * added embedding of license texts that need approval into repository
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-14 17:24:50 +00:00
Oliver Tappe d662b8345f * moved BlockBufferCacheNoLock into package kit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-14 17:22:31 +00:00
Oliver Tappe c823de957b * minor whitespace cleanup, no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-14 17:20:14 +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 45d9aa68ff Fix header guard (in comment)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-10 19:09:14 +00:00
Oliver Tappe 84d9977244 * add support to storing names and texts of licenses that require
approval to repository-info

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-10 19:07:21 +00:00
Oliver Tappe 4dcc52327b 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
2011-02-10 19:05:35 +00:00
Oliver Tappe 0d68f6afb3 Implemented repository writing:
* fleshed out RepositoryWriterImpl
* renamed BRepositoryHeader to BRepositoryInfo (in accordance with
  BPackageInfo)
* adjusted BRepositoryInfo to be able to parse itself from a
  driver_settings file
* added package_repo binary (only 'create' works as of yet)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 19:11:23 +00:00
Oliver Tappe 8b94d2ff6a * add stubbed RepositoryWriter to build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 20:15:50 +00:00
Oliver Tappe d77c6cd26a * implemented checking of licenses, such that it is no longer possible
to create a package that refers to a license that is not a system
  license or contained in the package
* added package-info flags (currently only approve_license and 
  system_package)
* adjusted package-reader/writer and pkgman accordingly

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 19:50:36 +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
Oliver Tappe aaf05784d4 * some rearrangements and renames with respect to public/private
types and defines of HPKG
* added header, magic and version for haiku repository format

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-07 13:04:00 +00:00
Oliver Tappe ceb993ab40 * rename AsString() methods to ToString() as suggested by Ingo
(following the naming used by other classes)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-04 17:53:54 +00:00
Oliver Tappe 6f0278cdc9 Implemented reading of package info attributes from hpkg file
* added kernel-compatible datatypes for reading package info attribute 
  values (PackageInfoAttributeValue.h) - these will be used at a later
  stage by the package-fs to transport those attributes to userland
  when asked to do so (by ioctl)
* implemented parsing of package info attributes in PackageReaderImpl
* added support for compressed package attribute section to 
  PackageReaderImpl
* completed the writing of package info attributes in PackageWriterImpl
  and fixed a couple of bugs exposed by parsing
* adjusted 'package list' to show the package info attributes as they
  are found


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-04 17:43:07 +00:00
Oliver Tappe 531d191219 * made resolvable expression operator an enum instead of a string
* fixed a couple of copy'n'paste bugs during parsing of resolvable
  expression lists (they were all added as 'requires')


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-04 17:34:19 +00:00
Oliver Tappe 2f7778f375 * added some missing method implementations in BPackageResolvable
and BPackageResolvableExpression
* switched GetAsString() to a AsString() as that's much more convenient
  and nothing can go wrong anyway


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-01 22:01:17 +00:00
Oliver Tappe 7fd711ef99 * refactored PackageWriter(Impl) to no longer print anything itself,
but publish that info through a BPackageWriterListener
* adjusted 'package create' to print a package summary by default and 
  more verbose info upon request.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-31 15:43:33 +00:00
Oliver Tappe 95d84e4176 * attributed copyright in all public HPKG headers to Haiku, Inc.
* added my own copyright to a couple of files that I changed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-30 15:15:33 +00:00
Oliver Tappe 5fb1c6ff1f Refactored hpkg implementation to provide some separation between
public and private API (still far from ideal, but a start):
* moved several HPKG-classes into the public namespace BPackageKit::HPKG
* added fImpl-wrappers around PackageReader and PackageWriter to hide
  most of the gory details
* adjusted 'package'-binary and packagefs accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-30 15:05:38 +00:00
Oliver Tappe 3aeae97f65 * added type-support to BPackageResolvable
* split BPackageResolvable, BPackageResolvableExpression
  and BPackageVersion into separate files


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-29 17:59:58 +00:00
Oliver Tappe 30222ff141 Completed PackageInfo-parser and fleshed out BPackageVersion, BPackageProvision and BPackageRequirement.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-28 23:36:08 +00:00
Oliver Tappe 0d6b3b20e1 More work on package kit:
* added class BPackageInfo, which contains packaging attributes of
  a package (the values relevant for package management) 
* implemented parser (mostly) for reading a BPackageInfo from a config
  file (.PackageInfo) in order to pass them on to the PackageWriter 
  when creating a package
* pulled hpkg-related stuff from bin/package into the package kit
* adjusted packagefs-Volume to skip .PackageInfo files when populating
  the mountpoint, as those files shouldn't appear as part of an
  activated package


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-27 23:17:03 +00:00
Oliver Tappe 733c783dc9 more work on package kit:
* rip BRepositoryHeader out of BRepositoryConfig and add support
  for it to BRepositoryCache
* implement repository removal
* some minor cleanups


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-25 19:36:09 +00:00
Oliver Tappe 7d7ed9bf4b Mostly style-related changes to package kit:
* drop 'Haiku' namespace
* rename 'Package' namespace to 'BPackageKit'
* renamed all public classes to begin with a 'B'
* renamed BPackageKit::Roster to BPackageKit::BPackageRoster to not
  clash with the BRoster from the application kit.
* fix some instances of public headers including private ones

Some functional changes, too:
* JobQueue now removes and deletes dependants of failed jobs 
  automatically
* JobQueue supports waiting for jobs to become runnable
* added a couple of InitCheck() methods where they make sense
  and invoke those in users of these classes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-25 17:07:27 +00:00
Oliver Tappe 35edda8f0b * more work on the package kit, repositories can now be added and
refreshed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-24 20:48:03 +00:00
Oliver Tappe 11a4ecfd82 * added support for interactive decisions to package kit and pkgman
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-22 19:30:21 +00:00
Oliver Tappe 500bb6305c * WIP-commit of the first parts of the package kit and the pkgman
(console-)tool


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-21 22:18:58 +00:00