Commit Graph

41007 Commits

Author SHA1 Message Date
Ingo Weinhold
2fce201893 BLowLevelPackageContentHandler interface extension
HandleAttributeDone(): Add parentToken parameter.
2011-11-25 06:18:50 +01:00
Ingo Weinhold
37880dd0a7 Remove debug output 2011-11-25 06:18:49 +01:00
Ingo Weinhold
d06e885aaf Print relative paths in error messages 2011-11-25 06:18:48 +01:00
Ingo Weinhold
37d971d3cc Support for extracting only specified entries 2011-11-25 06:18:48 +01:00
Ingo Weinhold
376bc55c27 Missing include 2011-11-25 06:18:47 +01:00
Ingo Weinhold
006056b7ee Add package extract -i option
Allows to specify an alternate location for the .PackageInfo.
2011-11-25 06:18:47 +01:00
Ingo Weinhold
93fc03aa52 Remove debug output 2011-11-25 06:18:46 +01:00
Ingo Weinhold
7395bf8a76 Add create -i option for specifying a package info 2011-11-25 06:18:45 +01:00
Ingo Weinhold
0f9a98a419 Add optional FD parameter to AddEntry()
If a FD is specified, instead of using the file with the given the FD is
used. Allows for adding entries without first copying them into the
directory structure.
2011-11-25 06:18:45 +01:00
Ingo Weinhold
cd8f03a8cc BPackageInfo::ReadFromConfigFile() BFile& version 2011-11-25 06:18:44 +01:00
Ingo Weinhold
d046296e85 Improve FileDescriptorCloser
* Add SetTo()/Unset() methods and no-argument constructor.
* Detach() returns the FD now.
2011-11-25 06:18:44 +01:00
Ingo Weinhold
efb6462777 Cleanup 2011-11-25 06:18:43 +01:00
Ingo Weinhold
b07fd63144 Add missing "cache" shine-through directory 2011-11-25 06:18:43 +01:00
Ingo Weinhold
85e13d1ef8 Remove the build platform work-arounds 2011-11-25 06:18:42 +01:00
Ingo Weinhold
02982802e6 Disable function remapping via macros
STL fstream::open() is used, so the macros break the build.
2011-11-25 06:18:41 +01:00
Ingo Weinhold
55bc371993 Wrap POSIX FD functions in libroot_build
This makes opening symlinks work universally in the build system tools.
Two mechanisms have been implemented, both of which don't always work.
The first is remapping via preprocessor macros. This fails where equally
named methods are used (e.g. STL fstream::open()). The other is using
hidden functions in the new libroot_build_function_remapper.a that is
linked into everything that is linked against libroot_build.so. This one
fails for functions that are defined inline in headers (Linux/glibc does
that). Together they seem to cover our build system needs ATM.
2011-11-25 06:18:41 +01:00
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