Commit Graph

41371 Commits

Author SHA1 Message Date
Ingo Weinhold
c719d46563 Support for reading compatible version attribute 2011-11-25 06:18:28 +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
Ingo Weinhold
dd2ab027fe Support for parsing the compatible version
In the .PackageInfo the compatible version for a resolvable can
optionally be given after the resolvable version via
"'compat[ible]' '>=' <version>".
2011-11-25 06:18:27 +01:00
Ingo Weinhold
622ca02bc1 Add package attribute for compatible version 2011-11-25 06:18:26 +01:00
Ingo Weinhold
4438ef7a2c BPackageResolvable: Add compatibleVersion property 2011-11-25 06:18:25 +01:00
Ingo Weinhold
ea754ce710 BPackageResolvableData: Compatible version field
Add fields haveCompatibleVersion and compatibleVersion. This allows us
to have a minimum version a resolvable is backwards compatible with.
2011-11-25 06:18:25 +01:00
Ingo Weinhold
8730aba210 Coding style: Fix indentation 2011-11-25 06:18:24 +01:00
Ingo Weinhold
8f314372a8 Introduce a pre-release version component
* The version string pattern is now:
  <major>[.<minor>[.<micro>]][-<pre>][-<release>]
* Introduce B_HPKG_ATTRIBUTE_ID_PACKAGE_VERSION_PRE_RELEASE package
  attribute.
* Add "preRelease" field to BPackageVersionData.
* Add "preRelease" property to BPackageVersion and packagefs's Version.
* Adjust package reader and writer code accordingly.
2011-11-25 06:18:24 +01:00
Ingo Weinhold
934980dcb1 Fix copy'n'paste error for minor version part 2011-11-25 06:18:23 +01:00
Ingo Weinhold
ca852d815b Fix printf() format string warnings 2011-11-25 06:18:23 +01:00
Ingo Weinhold
c4c9e06c88 Support for auto-generated package node attributes
* Add utility class AutoPackageAttributes and AttributeCookie subclass
  AutoPackageAttributeCookie.
* UnpackingAttributeCookie::Open() does now try to create a
  AutoPackageAttributeCookie, when it doesn't find the attribute in the
  PackageNode.
* Adjust UnpackingAttributeDirectoryCookie to also list auto-generated
  attributes.

Currently the only supported attribute is "SYS:PACKAGE", which is the
file name of the package containing the node.
2011-11-25 06:18:22 +01:00
Ingo Weinhold
fdde6105e9 Added default cookie Close() implementation
Added trivial implementation for AttributeCookie::Close() and
AttributeDirectoryCookie::Close() and removed the identical Close()
implementations in derived classes.
2011-11-25 06:18:21 +01:00
Ingo Weinhold
1708e56993 Cleanup 2011-11-25 06:18:21 +01:00
Ingo Weinhold
9d918f950d Paranoia: Handle unknown mount type 2011-11-25 06:18:20 +01:00
Ingo Weinhold
7403a215d4 Volume:Mount(): Better failure output
Also use the FATAL() instead of the ERROR() macro, so something is
printed also with debugging disabled.
2011-11-25 06:18:20 +01:00
Ingo Weinhold
5e6d2a9990 Allow symlinks in the packages directory 2011-11-25 06:18:19 +01:00
Ingo Weinhold
dfd15a9eb0 Optional dependency resolution tracing 2011-11-25 06:18:18 +01:00
Ingo Weinhold
6618f2d8ef Fix dependency resolution on resolvable removable
ResolvableFamily::RemoveResolvable(): Move the resolvable's dependencies
to the update list.
2011-11-25 06:18:18 +01:00
Ingo Weinhold
5b206a827f Fix adding order dependent dependency resolution
PackageFSRoot::_AddPackage(): When adding a resolvable which isn't known
yet, make sure all already added matching dependencies are resolved.
2011-11-25 06:18:17 +01:00
Ingo Weinhold
1ea19f343c Notify when removing a package link directory 2011-11-25 06:18:17 +01:00
Ingo Weinhold
7c81c34e68 Add dependency package links
The links appear, but the dependency resolution doesn't seem to work
correctly yet.
2011-11-25 06:18:16 +01:00
Ingo Weinhold
c6dd220780 Move PackageLinkDirectory::Link to own file
And rename it to PackageLinkSymlink.
2011-11-25 06:18:16 +01:00
Ingo Weinhold
106c8c6153 Resolve dependencies to resolvables 2011-11-25 06:18:15 +01:00
Ingo Weinhold
9c494559f3 ResolvableFamily: Add ResolveDependency() 2011-11-25 06:18:14 +01:00
Ingo Weinhold
e92a5f2197 Resolvable: Add Version() getter 2011-11-25 06:18:14 +01:00
Ingo Weinhold
e71dd015a5 Add Dependency::ResolvableVersionMatches() 2011-11-25 06:18:13 +01:00
Ingo Weinhold
032ef7b25b Dependency: Add Package() getter 2011-11-25 06:18:13 +01:00
Ingo Weinhold
7d2fa6f0f8 WIP towards dependency package links
* Add ResolvableFamily and DependencyFamily classes for grouping equally
  named resolvables/dependencies.
* Add hash tables to PackageFSRoot to track resolvables and
  dependencies. That is done in {Add,Remove}Package.
* Resolvable does now have a list of Dependency objects, the ones it
  satisfies.
2011-11-25 06:18:12 +01:00
Ingo Weinhold
3068366ed1 Add TODOs regarding broken add/remove behavior 2011-11-25 06:18:11 +01:00
Ingo Weinhold
d8ea0a8a31 Fix package link updates/node monitoring
* PackageLinksListener: Rename methods from *Directory*() to *Node*()
  and change parameter to Node*. Also add a *Changed() method.
* PackageLinkDirectory: Update only when necessary and what is necessary
  (currently only the self link).
2011-11-25 06:18:11 +01:00
Ingo Weinhold
265b7e0dfc Missing locking when adding/removing package nodes 2011-11-25 06:18:10 +01:00
Ingo Weinhold
214d8aec13 Add node monitoring for package link directories 2011-11-25 06:18:10 +01:00
Ingo Weinhold
452b059b3d Reordered methods to match declaration order 2011-11-25 06:18:09 +01:00
Ingo Weinhold
be1578363c Volume: Remove all package contents on destruction 2011-11-25 06:18:07 +01:00
Ingo Weinhold
8c5a05b653 Init fSelfLink 2011-11-25 06:18:07 +01:00
Ingo Weinhold
f985352ef1 Fix Volume::_RemovePackageLinksNode()
Don't use _RemoveNode() as it also removes the node from its parent.
2011-11-25 06:18:06 +01:00
Ingo Weinhold
73d93cd717 Fix NODE_FLAG_OWNS_NAME value 2011-11-25 06:18:06 +01:00
Ingo Weinhold
f9d2e7b39b If none is given pick volume name by mount type 2011-11-25 06:18:05 +01:00
Ingo Weinhold
fcdac38641 Add Node::Init() flags parameter
* Add Node::Init() flags:
  - NODE_FLAG_KEEP_NAME: Take over ownership of the name.
  - NODE_FLAG_CONST_NAME: Don't copy the name -- it's a constant that
    lives at least as long as the object.
* Remove Init() implementations in derived classes that just call the
  base class version.
2011-11-25 06:18:04 +01:00
Ingo Weinhold
d78a784b4b Create self package link 2011-11-25 06:18:04 +01:00
Ingo Weinhold
cc92b95487 PackageLinksDirectory::AddPackage(): Fix check 2011-11-25 06:18:03 +01:00
Ingo Weinhold
f2235ed5bf Empty Node::VFS{Init(),Uninit}() implementations 2011-11-25 06:18:03 +01:00
Ingo Weinhold
fe49869e03 Add package link directories to system volume
* Add PackageLinksListener interface. It is used by
  PackageLink[s]Directory to notify a listener about changes.
* Volume does now implement PackageLinksListener and recursively adds/
  removes package link directories.

This makes the package link directories appear at least. They are still
empty.
2011-11-25 06:18:02 +01:00
Ingo Weinhold
b5baaa8428 WIP: Create empty package links directories
* Rename PackageFamily to PackageLinkDirectory and derive from
  Directory.
* PackageLinksDirectory: Add the PackageLinkDirectory objects as
  children and remove the no longer needed hash table (we use the
  Directory's child hash table).
2011-11-25 06:18:01 +01:00
Ingo Weinhold
e0b81fa38e Add support function get_real_time() 2011-11-25 06:18:01 +01:00
Ingo Weinhold
d175681861 Move EmptyAttributeDirectoryCookie to own files 2011-11-25 06:18:00 +01:00
Ingo Weinhold
ad9c25bfea Move PackageFamily table to PackageLinksDirectory 2011-11-25 06:18:00 +01:00
Ingo Weinhold
63875d1702 Add yet empty package-links directory
* Add PackageLinksDirectory Directory subclass. Currently not doing
  anything.
* PackageFSRoot: Create a PackageLinksDirectory.
* Volume: Add/remove the package links directory for the system volume.
2011-11-25 06:17:59 +01:00
Ingo Weinhold
9e31aaa934 Node: Add setters for ID and parent 2011-11-25 06:17:58 +01:00
Ingo Weinhold
f33a6b765a UnpackingDirectory: Remove unnessary methods
Remove Read() and ReadSymlink() methods which are already implemented in
Directory.
2011-11-25 06:17:58 +01:00