History log of /haiku-fatelf/src/bin/package/command_extract.cpp
Revision Date Author Comments
# d06e885a 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Print relative paths in error messages


# 37d971d3 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support for extracting only specified entries


# 006056b7 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add package extract -i option

Allows to specify an alternate location for the .PackageInfo.


# 93fc03aa 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove debug output


# e6466c9a 29-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 16ca035b 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Nicer error output


# cdf4afaa 16-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use fs_close_attr()/write_pos() instead of close()/pwrite().

This makes it easier to reuse the code on non-Haiku platforms.


# d662b834 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* moved BlockBufferCacheNoLock into package kit

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40489 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33bc4425 12-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# 0d68f6af 09-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# 6f0278cd 04-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# ae53f552 31-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

Fixed an oversight of yesterday's restructuring:
* FDCloser is private, so it should live in BPackageKit::BHPKG::BPrivate
* adjusted 'package' binary to no longer use FDCloser (trivial)
* minor cleanup in command_extract.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40329 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5fb1c6ff 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# 0d6b3b20 27-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# 4e2cd771 18-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added new interface BufferCache -- basically a memory allocator with the
option to cache a freed buffer -- and implementations
BlockBufferCache{NoLock,Kernel}.
* ZlibPackageDataReader does now dynamically get its read and uncompress
buffers from a provided BufferCache when needed.
* Allocating the buffers once and keeping them over the whole life time was a
bit too memory heavy, since we create a reader for every file for which a
vnode is created. A FS module global factory provides a buffer cache.
* Added a mutex to PackageFile::DataAccessor which guards the access to the
data reader which isn't thread safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34115 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6dccfe13 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added interface ErrorOutput and implementation StandardErrorOutput and used
them in the PackageReader instead of fprintf().
* Got rid of unconditional printf().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34084 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 03423585 15-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Incorrectly used errno instead of error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34054 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 050aa61b 13-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented a tool ("package") that implements creation and extraction of
packages of the newly invented Haiku Package format
(http://dev.haiku-os.org/wiki/PackageFormat). It basically works, but it's
still work in progress (e.g. compression is not implemented yet), as is the
format itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34018 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d06e885aafc6885b2c5a3a36862fcf2466a4ea4d 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Print relative paths in error messages


# 37d971d3cc8b8b2e4796385000781183f12f1924 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support for extracting only specified entries


# 006056b7ee7e8a2c448bfe6dc9dd49c2eadc6437 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add package extract -i option

Allows to specify an alternate location for the .PackageInfo.


# 93fc03aa5245432dbab0a8129f403c481c1fd14a 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove debug output


# e6466c9a347a96e75691e19e1373a5c9fc907e5f 29-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 16ca035b2b1ea3d2c1d63e1ce6637a3f8681d024 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Nicer error output


# cdf4afaaf4341293880c4d8225be60776e6dcc58 16-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use fs_close_attr()/write_pos() instead of close()/pwrite().

This makes it easier to reuse the code on non-Haiku platforms.


# d662b8345fd6dc21911a4abf97ae3c03b7debae5 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* moved BlockBufferCacheNoLock into package kit

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40489 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33bc4425be0b545ed3d0b7e7a9a873d31e5a0330 12-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# 0d68f6afb34d8e01421123b216e34771d1c7fbfe 09-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# 6f0278cdc9a22a1e22c3ac3f480beffd6bb5fcff 04-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# ae53f5526b44af7cfa8fd0b327af540c1cf56e63 31-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

Fixed an oversight of yesterday's restructuring:
* FDCloser is private, so it should live in BPackageKit::BHPKG::BPrivate
* adjusted 'package' binary to no longer use FDCloser (trivial)
* minor cleanup in command_extract.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40329 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5fb1c6ff1f55fe4094a761b653041b3a0b9abf1d 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# 0d6b3b20e15fe2cbeb5e81749f888c26ca289338 27-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

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


# 4e2cd77109c257aa0be1e475ddcd379f9e9286df 18-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added new interface BufferCache -- basically a memory allocator with the
option to cache a freed buffer -- and implementations
BlockBufferCache{NoLock,Kernel}.
* ZlibPackageDataReader does now dynamically get its read and uncompress
buffers from a provided BufferCache when needed.
* Allocating the buffers once and keeping them over the whole life time was a
bit too memory heavy, since we create a reader for every file for which a
vnode is created. A FS module global factory provides a buffer cache.
* Added a mutex to PackageFile::DataAccessor which guards the access to the
data reader which isn't thread safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34115 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6dccfe13177dc5bd78931b94dab25425e625487d 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added interface ErrorOutput and implementation StandardErrorOutput and used
them in the PackageReader instead of fprintf().
* Got rid of unconditional printf().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34084 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 03423585a40e6e23b8852055d71ca58172498855 15-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Incorrectly used errno instead of error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34054 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 050aa61bd63287302e92e90154489a6d353ca743 13-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented a tool ("package") that implements creation and extraction of
packages of the newly invented Haiku Package format
(http://dev.haiku-os.org/wiki/PackageFormat). It basically works, but it's
still work in progress (e.g. compression is not implemented yet), as is the
format itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34018 a95241bf-73f2-0310-859d-f6bbb57e9c96