Commit Graph

40991 Commits

Author SHA1 Message Date
Ingo Weinhold
0fbcad54be Add helper is_unknown_or_system_descriptor() 2011-11-25 06:18:40 +01:00
Ingo Weinhold
640b4ed97d _kern_read_link() ignored the path 2011-11-25 06:18:40 +01:00
Ingo Weinhold
c29492a252 Fix gcc 2 build by making Parser a friend 2011-11-25 06:18:39 +01:00
Ingo Weinhold
e6466c9a34 package extract: Delay setting node permissions
In HandleEntry() create the file/directory with sufficient permissions
for the user and set the archived permissions in HandleEntryDone(). This
makes sure child attributes and entries can be created.
2011-11-25 06:18:38 +01:00
Ingo Weinhold
f2db3c439d .OPD -> .PackageInfo conversion tool 2011-11-25 06:18:38 +01:00
Ingo Weinhold
4ebd3de828 Support package info [source] URL attributes 2011-11-25 06:18:37 +01:00
Ingo Weinhold
4b6a3a9c5f Change source URL package info attribute name
Use "-" instead of "_".
2011-11-25 06:18:36 +01:00
Ingo Weinhold
029f6d0d05 Simplify BPackageInfo::Parser::_Parse() further
* Match the attribute in a loop, use an attribute ID switch, do the
  "seen" checks without the switch.
* Explicitly handle the case when encountering an unknown attribute.
2011-11-25 06:18:36 +01:00
Ingo Weinhold
208b212c56 Simplify BPackageInfo::Parser::_Parse()
This also fixes the memory leak due to the previously used on-stack
BObjectLists not having been defined owning the elements.
2011-11-25 06:18:35 +01:00
Ingo Weinhold
3a802b3d7f Add URL/source URL hpkg package attributes 2011-11-25 06:18:35 +01:00
Ingo Weinhold
eb7e89518a Add url and sourceURL properties to BPackageInfo
Also extend the parser to accept "url" and "source-url" attributes.
2011-11-25 06:18:34 +01:00
Ingo Weinhold
1338e7b6ae Make .PackageInfo more driver-settings-ish
* Use braces instead of brackets for lists.
* Semicolons and newlines separate items now. Remove handling for comma.
* Allow '\'' as quotation character.
* Remove assignment after variable name.

This should make the .PackageInfo format driver settings compatible, but
not vice versa. It is still stricter.
2011-11-25 06:18:33 +01:00
Ingo Weinhold
baa3cc3ca3 Extract architecture from package file 2011-11-25 06:18:33 +01:00
Ingo Weinhold
0da8142d99 Add architecture property to Package 2011-11-25 06:18:32 +01:00
Ingo Weinhold
bc7e181374 Small cleanup 2011-11-25 06:18:32 +01:00
Ingo Weinhold
c53e9146c2 Allow single-element string/flag lists without []
As syntactic sugar string and flag lists no longer need to be enclosed
in brackets when they have exactly one element.
2011-11-25 06:18:31 +01:00
Ingo Weinhold
2df5441165 Remove "copyright" and "license" keywords
There's "copyrights" and "licenses" which can be used.
2011-11-25 06:18:30 +01:00
Ingo Weinhold
53da7df201 Small cleanup 2011-11-25 06:18:30 +01:00
Ingo Weinhold
c5909fb0d2 Add compatible version support to packagefs 2011-11-25 06:18:29 +01:00
Ingo Weinhold
5c42c97abb Print the resolvables' compatible version 2011-11-25 06:18:29 +01:00
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