History log of /haiku/src/kits/package/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
ca7a630e 03-Jan-2019 Alexander von Gluck IV <kallisti5@unixzen.com>

kits/package: Break LibsolvSolver add-on out

* BSolver is implemented by solver add-ons
* We may want to (unlikely) leverage another
package solver in the future.
* We may want to (likely) implement a dummy
solver when libsolv is unavailable on new
architectures without bootstrap.
* This also makes solving missing libsolv a little
more graceful vs the "include "libsolv.h" not
found.

Change-Id: Iedd9d0f022fb743c4c7606bd33a4b6dbef0576f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/819
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

991d1a20 18-Jun-2020 Andrew Lindesay <apl@lindesay.co.nz>

PackageKit: HPKR BMessage Format Fix

Some older repositories are having problems because
they are configured with a `url` (identifier) form
that is not actually a well-formed URL. This caused
problems when it was then interpreted as the
base-url because it did not start with "http". I
have changed this so that the base-url is not
derived from the url and can be missing.

Resolves #16149

Change-Id: I10acd8db65082ff6c72fcff1550eb63475e86133
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2931
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

9ab0dec5 09-Jun-2020 waddlesplash <waddlesplash@gmail.com>

Revert "PackageKit: HPKR BMessage Format Fix"

This reverts commit 82f985c036aaae979bd6f5a6b1a29bed03fa3fa0.

Reason for revert: Broke the build with this message:
/packages/groff-1.22.3-1-x86_64.hpkg: Scheme missing.

Change-Id: I9dea4986238cedfdc33c84739e69a331add09cdf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2896
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

82f985c0 06-Jun-2020 Andrew Lindesay <apl@lindesay.co.nz>

PackageKit: HPKR BMessage Format Fix

Some older repositories are having problems because
they are configured with a `url` (identifier) form
that is not actually a well-formed URL. This caused
problems when it was then interpreted as the
base-url because it did not start with "http". I
have changed this so that the base-url is not
derived from the url and can be missing.

Resolves #16149

Change-Id: Ic972fde43f99466db9d5ea2325c0e77cf7d4aad5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2886
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

9d8d1144 14-May-2020 Andrew Lindesay <apl@lindesay.co.nz>

Packages: Local Repo Config Formats

The local storage of the various repositories' config
needs to cater for different generations of storage
formats and also needs to be able to swap out legacy
repository identifiers.

Change-Id: Ib4b3857254b7b703858eff6815e2d6c54d69da3c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1963
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

aa272ca3 01-May-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

Package Kit: reduce identifer/base-url confusion

For historical reasons, the package kit has an "url" field that is not
actually meant to be used as an URL. Rename it in the API and user
facing output as "identifier" to make it clear what the file is used
for. This change preserves the "url" key in on-disk and online storage
(hpkr files, stored settings, etc) in an attempt to not break anything.

Fix one remaining misuse of the "url" field as an URL in
get_package_dependencies.

Add an unit test showing that BUrl does parse "tab" URIs properly (there
is just a protocol and a path segment).

Change-Id: I339ce526e5798d42d78ae650855d7e988dbb4a1a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2542
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

765a734a 03-May-2020 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Add signature to libmedia.so.

Also remove superflous data from libpackage.rdef

This should fix #15958

Change-Id: I76991030541dca12a2dfdd9282f02274a461ed2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2561
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

4b918abd 07-Mar-2020 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Package Kit: internationalize strings that may be displayed to the user

This fixes #14525.

Change-Id: I25810a4e12caed7aa47717e278591b1716b6198c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2329
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>

b3de8bea 04-Feb-2020 X512 <danger_mail@list.ru>

Package Kit: convert HTTP error code only on BHttpRequest

Other request types exists such as BFileRequest.

Fixes #15675.

Change-Id: Ib2e07fad4dd9f682d2b9fc0cdbf0ca60ecd3adfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2200
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: François Revol <revol@free.fr>

0ef0921d 03-Feb-2020 François Revol <revol@free.fr>

Package Kit: Return proper errors in FetchFileJob

This should give more meaningful errors in pkgman
(not so sure, feel free to tweak the mapping),
and also avoid running the next job if fetching failed.

Change-Id: If76968f705ff25f7ecf1a5f91d88a02040d24665
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2186
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>

31d70c10 13-Aug-2019 Alexander G. M. Smith <agmsmith@ncf.ca>

package kit: Skip over future package attributes.

Ignore unknown fields (also called attributes) which are from a package
file with a different minor version number. Previously it would halt
with an error when encountering such a field, even though it can safely
be skipped over (if it was unsafe, we would have incremented the major
version number).

The use case is a future package attribute for pre-uninstall scripts.
If they're not run, that just leaves some debris after uninstalling
(like symbolic link desktop icons).

* Use the B_NOT_SUPPORTED error code when reading unknown package
attributes. Don't treat it as an error if the package is a
different minor version, just skip it.
* Print unknown package attribute index numbers rather than stopping,
since they may be from future package file formats and can be safely
skipped otherwise. Mention the relevant enum so you can find it in
the source code. It's a pity that the previous abstraction layer
isn't present, since it tells us what data type the attribute is
(string, number, etc), so we could have printed its value too.

First step of two for enhancement #13427

See https://review.haiku-os.org/c/haiku/+/1504 to generate packages
with a different minor version number (second step of the enhancement).

Change-Id: I6db1897824a1713b3d5fab6fdfb990ee5923cd52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

f5953f61 09-Aug-2019 Ryan Leavengood <leavengood@gmail.com>

Package Kit: Purposely ignore an error getting package cache

Fixes #15230.

The comment pretty much explains it. I think needing this means this code could
be redesigned, but I don't know enough yet to make that fix.

It also feels like this whole job system and Command pattern is overly
complicated when good old functions would be fine, certainly for pkgman. But
maybe this is used more heavily in HaikuDepot.

b711002d 07-Aug-2019 Ryan Leavengood <leavengood@gmail.com>

HaikuDepot: Set package state when loading single package

Without this, even installed packages still get an "Install" button.

Fixes #14821.

This was implemented by adding BPackageRoster::IsPackageActive. I decided to
have this take a location since GetActivePackages also did, but as noted in my
TODO comment, I think this is awkward.

It would also be nice to show the user they have a different version of a
particular package, but that would require some changes to IsPackageActive.

Change-Id: Iab0d35eb6b671a17711b0214b15164d296927e5a
Reviewed-on: https://review.haiku-os.org/c/1694
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>

dfbf1c8a 02-Aug-2019 Augustin Cavalier <waddlesplash@gmail.com>

Package Kit: Avoid discarding potential error values.

Spotted by Clang and the [[nodiscard]] patch.

72bfb144 17-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V1028: cast result of operation instead of operands

If an overflow occurs before the cast, we can't fix it. If we cast
first, we can rely on integer promotion to make the result use the
appropriate size.

Change-Id: I7462e28422456c07f179f94d39c10c408d9bec36
Reviewed-on: https://review.haiku-os.org/c/1623
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

4a1d8b1a 16-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V575: strange values passed to well known functions

Change-Id: Id6008d93777f860d0b341bcd012fe6f86c99cf35
Reviewed-on: https://review.haiku-os.org/c/1610
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>

e2c7bb90 01-Mar-2019 CodeforEvolution <secundaja@gmail.com>

Add Reboot Check to BPackageRoster

A bit of an explanation for these weirdly named functions:
LatestActivePackageInfos() returns the packages on the system that are
both installed and fully set up. When packages are in the middle of being
installed, LatestInactivePackageInfos() shows the packages in the process
of being installed. Once the installation process is done,
LatestInactivePackageInfos() returns nothing. If there are packages that
can't be fully activated without a reboot, CurrentlyActivePackageInfos()
will return the same information as LatestActivePackageInfos(), or if
everything has been installed and activated, it will return no packages.

Change-Id: Ia1814a5abda6d815c46e0b46dc812b4e7af81de3
Reviewed-on: https://review.haiku-os.org/c/1129
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

a6a6e3a8 19-Feb-2019 Adrien Destugues <pulkomandy@gmail.com>

Package kit: add likely-useful architectures

Required for bootstrapping them.

Change-Id: I179d8c73b08688946049bf18ff9151ef047e449b
Reviewed-on: https://review.haiku-os.org/c/1071
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

df4074fb 24-Nov-2018 Augustin Cavalier <waddlesplash@gmail.com>

Remove a lot of unused constants.

Spotted by Clang. No functional change intended.

4a3dae2b 07-Oct-2018 François Revol <revol@free.fr>

package kit: add a NULL check on requests

This avoid crashing on malformed repository URL (like missing http://).

106ae4ec 17-Aug-2018 CodeforEvolution <themysterymail555@gmail.com>

Remove Curl, Switch to NetApi in Package Kit

Change-Id: I92213ab60dc987175c323d1d9ed11ac8b3517f2f
Reviewed-on: https://review.haiku-os.org/475
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

81375d4f 11-Jul-2018 Jérôme Duval <jerome.duval@gmail.com>

Package Kit: add Zstd compression.

Change-Id: Idbdb7cf1bde659046a88ea69a76e3b5fc4cd7013
Reviewed-on: https://review.haiku-os.org/323
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

07792948 04-Aug-2018 Augustin Cavalier <waddlesplash@gmail.com>

Package Kit: Fix logic reversal in PackageInfoStringBuilder.

This function is used when serializing a BPackageInfo object, which is not
done very often, and flags are used even less often. But both of these things
are done for the system packages, as they have the "system_package" flag
set, and are processed by "update_package_requires", and so this meant
that the "system_package" flag was turned into the "approve_license" flag.

55557aa1 27-Jul-2018 JackBurton79 <stefano.ceccherini@gmail.com>

CURLOPT_XFERINFOFUNCTION is available since libcurl 7.32.0 only.
Since it's just cosmetic, allow compiling with older libcurl, too.
fixes build on RedHat/CentOS 7

Change-Id: I169ad84d15e61012d1d38a9b41af7eef81683bf7

3b17d8dd 27-Jun-2018 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot / PackageKit: Repositories 'Identifier' URL

Repositories are identified with a 'url' in the
remote 'repo.info' file. There is also a
'base url' which is the URL locally with which
the system is able to access the repository
data on. There is some confusion between these
two terms in the source. This change aims to
separate the two out and consistently name them.
The settings for the repository locally also was
not storing these values and that has been fixed.
Debug info about the repositories also did not
display the two urls consistently and will now
also do so. Finally, HaikuDepot now correlates
locally configured repositories with the data in
HaikuDepotServer using the identifier URL; this
makes the use of mirrors with HaikuDepot possible.

Fixes #13888
Change-Id: I66dfe589b05c24e1ab123a6945352e0f24b60bf1

cd6365c7 17-May-2018 Jérôme Duval <jerome.duval@gmail.com>

style fixes

b08627f3 04-May-2018 Murai Takashi <tmurai01@gmail.com>

Fix catching polymorphic type by value

Replace catching polymorphic type std::bad_alloc 'by value'
with 'by reference'.
Pointed by gcc8

b1f1332e 05-Apr-2018 Jérôme Duval <jerome.duval@gmail.com>

PackageKit: use the correct kernel headers.

The debug build of the packagefs kernel addon failed because user_memcpy had no type.
Using the correct headers for user_memcpy and IS_USER_ADDRESS fixed the issue.

8c44fc0f 08-Jan-2018 Jérôme Duval <jerome.duval@gmail.com>

PackageKit: tweak classes used by packagefs to write to user buffers.

when compiled in kernel mode, BMemoryIO::WriteAt() and BBufferDataReader::ReadData()
now check the buffer to write to, and eventually call user_memcpy() instead of memcpy().

47bedf16 02-Dec-2017 Augustin Cavalier <waddlesplash@gmail.com>

PackageDataInlineReader: Do not use fData before it has been set.

Spotted by Clang.

a00bd28a 07-Oct-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Package Kit: map some curl errors to Be error codes

Trying to get something more useful than "aborted: no error" in case of
network errors in pkgman.

6aff37d1 01-Oct-2017 Augustin Cavalier <waddlesplash@gmail.com>

Move SHA256 class to libroot instead of linking libshared into libroot.

Discussed with PulkoMandy and on the haiku-commits mailing list.

Thanks to @jessicah for compile-testing and fixing 2 small issues I missed.

0b18b79c 02-Aug-2017 Jérôme Duval <jerome.duval@gmail.com>

libpackage Jamfile: DoCatalogs rule needs to find sources.

SubInclude should stay at the end.

8119ed92 02-Aug-2017 Murai Takashi <tmurai01@gmail.com>

libpackage Jamfile: Add missing ':'

Signed-off-by: Humdinger <humdingerb@gmail.com>

99e5e3fd 08-Jul-2017 Humdinger <humdingerb@gmail.com>

Package daemon notifications

* Sentence casing
* Localize notification texts in the package kit
* Have "Package daemon" as group name and "Warning" as title
* Use ::BPrivate in Bitmap.h to solve an ambiguity (as pointed out
by PulkoMandy). Though not needed for my changes any more, since
a the icon of the notifying app is now shown by default.

Fixes #13590.

ab8f11bf 20-Mar-2017 Brian Hill <supernova@warpmail.net>

SoftwareUpdater updates

Bug fix- show correct version on package uninstall list item tooltip
Correct if else formatting
Use the BPackageManager FullSync() function instead of Update
Change warning strings in BPackageManager to sentence casing
Show list item tooltip on a mouse down (helps with touch devices)

cf0ba058 06-Feb-2017 Humdinger <humdingerb@gmail.com>

Add localization to package daemon and solver

Thanks to Adrien and Rene for reviewing and guidance.
Fixes #13282.

fda0bf77 09-Dec-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Revert "repo rework: Re-add compatibility url field"
Revert "repo rework: Remove stubs; Breaks repo compat."
Revert "repo rework: Remove need for repos to be self-aware"

This reverts commit a2b2f4d6427914cdcdb59943dd8e4a0bfdcd53ee.
This reverts commit 602076ef82647a48fd10f4d1ec830bb4242f9eb6.
This reverts commit 5ffaf72c8a74a7eb6827e4d2b1f47c9360ddaefe.

These changes break the build on Haiku and the ability to create repo
mirrors, for the lack of a replacement for the URL (an UUID was evoked
on the mailing lists, but not implemented).

We are due for a release soon, please don't break the build.

a2b2f4d6 08-Dec-2016 Alexander von Gluck IV <kallisti5@unixzen.com>

repo rework: Re-add compatibility url field

* We saw 3rd party repos break as well oddly.
* Reintroduces the url field in a little bit cleaner
way.
* Should solve "Failed to open repository file" errors
* Once everyone updates beyond hrev50723 this is
no longer needed.

602076ef 07-Dec-2016 Alexander von Gluck IV <kallisti5@unixzen.com>

repo rework: Remove stubs; Breaks repo compat.

* These stubbs satisfied older Haiku releases that
required the URL
* Users running nightly images will need to upgrade
to hrev50723 - hrev50744 before upgrading further
* Getting this out of the way now before the beta
comes out.
* New installations shouldn't suffer any problems.

5ffaf72c 01-Dec-2016 Alexander von Gluck IV <kallisti5@unixzen.com>

repo rework: Remove need for repos to be self-aware

* See #12917 for details.
* Squashed to one commit to make revert easy if we
run into any issues.
* pkgman is now pre-attached to the 'current' repo
version within nightly images so they can be updated
by default.
* This shouldn't impact us keeping older sets of package
versions by commit hash for building older hrevs.
* There are XXX stubs with "Kill me". These will need
to be dropped after users are given sufficent time to
upgrade. We're dropping a previously required field (url)
so making this a slowish roll out.
* Makes the repos a lot less restrictive which should
help PM package building automation be a bit easier.
* Once this stuff smooths out, we'll add UUID's to the
repo definitions for duplicate repo detection.

36a9daf6 21-Aug-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Package kit: more style fixes.

Pointed out by Axel this time. Thanks!

a22f114f 21-Aug-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

chroot support in package kit: style fixes

- Catching an exception in the normal flow is not a good thing, instead,
test before calling the function (I've been doing too much python
lately)
- Avoid using uninitialized nodeRef if there is no system root and also
no specified root in the message.

Thanks to Ingo or the code review.

6262ccbb 18-Aug-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fix use of findpaths from inside chroot

The package kit needs to provide the package daemon with the node_ref of
the root directory, so the package daemon gives the correct results when
the request comes from inside a chroot.

Moreover, the package kit must be able to handle a root with a system
but no home package dir, as is the case inside the chroot environment
created by haikuporter.

Fixes #12602.

fa2dd9c4 09-Apr-2016 Andrew Lindesay <apl@lindesay.co.nz>

BPackageInfo::Parser: Validate URL strings.

Fixes #12710.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
I fixed the modifications to the Jamfiles in src/bin, they were all wrong
in the patch.

8028ede7 15-Jan-2016 Rene Gollent <rene@gollent.com>

Build: Add architecture rule for libshared.a.

- As suggested by Ingo, add libshared.a to the architecture name map.
This allows it to be linked by its short name like other frequently
used libraries.
- Adjust all Jamfiles referencing the lib accordingly.

af585d03 20-Nov-2015 Jérôme Duval <jerome.duval@gmail.com>

pkgman search: Add --requirements option

e711e6e4 18-May-2015 Axel Dörfler <axeld@pinc-software.de>

Moved BJob, and JobQueue into the support kit.

* Put it in the BSupportKit namespace, following the style introduced
with the package kit for now.
* The BSupportKit::BJob class no longer knows about the package kit's
Context class. However, the BPackageKit::BJob class does.
* Due to the namespace juggling, a lot of files had to be touched.
* The JobQueue class remains private.
* Due to the way Haiku is built on itself, you cannot build this change
under Haiku with an older release.

3c08e456 05-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

Fix package download progress computation.

The download progress and total used to be doubles, but now they are
off_t. This resulted in the division being done in integers, and always
getting 0 as the result.

Fixes #11940.

1aaa0c21 24-Jan-2015 Axel Dörfler <axeld@pinc-software.de>

Package Kit: FetchFileJob now contains package size.

* So that you know how much already was, and still has to be downloaded.
* Automatic whitespace cleanup.
* The link in FetchFileJob.h did not fetch the correct header under
Haiku anymore (since the addition of the private headers to the
image).

d228f29f 25-Oct-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add SetDebugLevel()

Sets the debug level of the solver.

74b582a4 25-Oct-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver: Add SetDebugLevel()

In LibsolvSolver set the debug level of the pool.

9002c943 25-Oct-2014 Stephan Aßmus <superstippi@gmx.de>

Package Kit: Always allocate local repository

Consequently always register it with the solver in Init(). This solves the
problem that it made a difference at which time Init() is called. Init() is
called at the beginning of Install() and Uninstall(), but HaikuDepot was
calling it before that for other reasons. A second call to Init() will exit
early. If local package files were added to the PackageManager instance,
the local repository was created lazily, but because Init() did not run a
second time, the local repository was not registered with the solver. Now
it already is, since it is no longer created on demand, but always.

bb9112df 10-Oct-2014 Michael Lotz <mmlr@mlotz.ch>

Cleanup: Remove doubled semicolon and a trailing whitespace.

d98a3e02 09-Oct-2014 Michael Lotz <mmlr@mlotz.ch>

package kit: Fix corruption of last package chunk on update.

PackageFileHeapWriter::_UnwriteLastPartialChunk() used ReadData() to
extract the last partial chunk into the pending buffer. This indirectly
calls PackageFileHeapWriter::ReadAndDecompressChunk(), which assumes
data past the last full chunk to come from the pending data buffer.

Since the pending data buffer is not filled in at that point, the call
to ReadAndDecompressChunk() simply did nothing, leaving the object with
a correctly sized but completely nulled pending data buffer. The last
partial chunk of a package would therefore always get corrupted when
updating a package.

Fixes #11306 that provided a reduced test case that happened to corrupt
the only chunk of a package, nulling the .PackageInfo and therefore
making the error more obvious as subsequent parsing of the info failed.

220d0402 31-Jul-2014 Oliver Tappe <zooey@hirschkaefer.de>

Use libstdc++, libsupc++ and libgcc from gcc_syslibs.

* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
necessary since we're only using libgcc-as-single-object for libroot
with x86_gcc2, where the filtered object file doesn't exist. Should
the objects that used to be filtered cause any problems as part of
libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
x86_gcc2, we still build libstdc++.so from the sources in the Haiku
source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.

42c73714 25-Jul-2014 Oliver Tappe <zooey@hirschkaefer.de>

Let Package-Kit's FetchFileJob handle redirects.

* additionally, drop duplicate setting of CURLOPT_PROGRESSFUNCTION.

e1e6c124 13-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageWriter::Recompress(): Change param to BPositionIO*

Besides that this is a nicer interface, it allows us to get a the HPKG
header as a side effect of initializing the reader, thus preventing
seeking backward in the file. This makes "package recompress - <file>"
work.

43a6b92c 13-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageReaderImpl: Delay reading sections until ParseContent()

44c47711 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageWriter: Add BPositionIO support

8f5130ed 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: Actually add support for B_HPKG_COMPRESSION_NONE

Until now we always declared in the HPKG header that the package file is
zlib compressed. For uncompressed files we would just store all
individual chunks uncompressed. Now we handle completely uncompressed
files slightly differently: We don't write the redundant chunk size
table anymore. The size savings are minor, but it makes the uncompressed
format read-streamable which may be handy.

e527b796 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch package file accessor classes to use BPositionIO

* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
their implementation and super classes do now internally use a
BPositionIO instead of a FD to access the package file. This provides
more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
BPositionIO* parameter.

cdfeba5a 08-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageWriter: Add Recompress()

Allows rewriting an existing package file with a different compression.

2fc2aebc 07-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl: Move _Finish() impl to match order in header

f5a20d5f 07-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: PackageFileHeapReader::Init(): Sanity checks

Make sure the compressed/uncompressed heap size and the chunk size
table look plausible, so we can rely on the values later. Fixes
potential crashes for corrupt packages.

b3263ad3 30-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch package kit to BZlibCompressionAlgorithm

... and remove the Zlib{Compressor,Decompressor} API.

6a89a36a 24-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Move package kit Zlib* classes to support kit

Also move to B* namespace and no longer expose the zlib dependency in
the headers.

0dab9e5c 29-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: ReaderImplBase: Remove superfluous scratch buffer

f1a12bcf 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ReadSection(): Small simplification

84297881 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove BPackageKit::[...]::AbstractDataWriter and friends

* FDDataWriter and ZlibDataWriter weren't used anymore.
* AbstractDataWriter was implemented only by PackageFileHeapWriter,
which was only used by WriterImplBase.
* Add a PackageFileHeapWriter::AddDataThrows() which has semantics
equivalent to the previously inherited WriteDataThrows().

32832cbe 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove BPackageKit::BDataOutput

Use BDataIO instead.

d2d1af83 18-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Revert "Move ZlibDecompressor to libshared"

This reverts commit 9af2105d36856be60528c361edf14a263f242338.

Conflicts:
src/kits/package/Jamfile

4c235c74 18-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Revert "Fix more issues detected by gcc4 compiler:"

This reverts commit 19f3bae0716c4eb7dd2a5716778560580be68071.

d5660e67 18-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Revert "build fix follow up on status_t/ssize_t changes."

This reverts commit 7202cfb455cae89faa6e2fa3d9a9d28c3068fa6b.

cc66d3a0 18-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Revert "Style fixes, no functional changes"

This reverts commit 916382a10f471ca31087dd71b8d3ece5de9cd421.

5c9672ed 17-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Add watching support for installation location package changes

Can be requested/stopped via BPackageRoster::{Start,Stop}Watching().
The notification message has the what code B_PACKAGE_UPDATE and contains
fields "event", "location", and "change count".

820dbc01 16-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BTransactionIssue: String improvements

0b57c633 15-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BTransactionIssue::ToString(): Fix some strings

f2f19f11 15-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Support installing/updating local package files

* The Install() and Update() versions that take a const char* array
now check whether a string looks like a path to a local package file.
If so, they use that file instead of interpreting the string as a
search string.
* Extend the repository hierarchy. There's now a LocalRepository base
class from which InstalledRepository and the new MiscLocalRepository
derive. The latter is instantiated once and collects all package files
specified by path.

eee42275 14-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Make BCommitTransactionResult available

* BFatalErrorException: Add commitTransactionResult property and
respective constructor. In case committing the transaction failed,
BPackageManager throws a BFatalErrorException with the result.
* BFatalErrorException::UserInteractionHandler: Pass
BCommitTransactionResult to ProgressTransactionCommitted().

0de3219e 14-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Rework error and issue propagation to client

* BDaemonClient: Move inner class BCommitTransactionResult to top level
and make it public.
* BCommitTransactionResult:
- Add a whole bunch of specific error code enum values. Such an error
code is now the primary error, as opposed to before where we would
mix status_t and enum value errors. There's a systemError property
of type status_t which may provide additional information, though
(depending on the primary error type).
- Remove the errorMessage property. Due to mapping all errors to the
specific error codes this is no longer necessary. Mixing such a
message with another error description is also not very helpful when
it comes to localization (still not supported, though).
- Add several properties (paths, strings, error codes) that serve as
arguments to the primary error and are used by FullErrorMessage().
- Add issues property, a list of instances of new class
BTransactionIssue. Those describe non-critical issues (e.g. failed
update of a settings file) that occurred in the process of
committing the transaction. Those issues should be presented to the
user by the package management program.
* Exception: Adjust to transport the BCommitTransactionResult
properties.
* CommitTransactionHandler, FsTransactions, Root, Volume: Adjust to
BCommitTransactionResult/Exception changes.
* CommitTransactionHandler: Now requires a BCommitTransactionResult to
which it adds the issues it encounters. The reply BMessage is no
longer needed, though.
* Volume: Refactor common code from the three methods that use
CommitTransactionHandler into new method _CommitTransaction.

e9eb4df7 05-May-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BDaemonClient: Handle options message fields correctly

4284b6c9 02-May-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BInstallationLocationInfo: Provide more info

* If the active state is not the latest state, also provide a package
set for it.
* If an old state has been booted, provide its name.

5a1c6a70 01-May-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

InstallationLocation: Rename [in]activePackages properties

Add prefix "Latest".

79895eed 23-Apr-2014 Murai Takashi <tmurai01@gmail.com>

Fix gcc 4.9.0 build

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>

84e7206b 08-Mar-2014 Rene Gollent <rene@gollent.com>

Style fix.

b7282c5f 08-Mar-2014 Rene Gollent <rene@gollent.com>

Fix #10610.

Added missing initializer for fContext in PackageInfoErrorListener whose
absence was leading to crashes when generating the error string.

916382a1 12-Feb-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Style fixes, no functional changes

* Pointed out by Axel and Ingo.

7202cfb4 11-Feb-2014 Jérôme Duval <jerome.duval@gmail.com>

build fix follow up on status_t/ssize_t changes.

* added a TODO in packagefs.

19f3bae0 11-Feb-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fix more issues detected by gcc4 compiler:

More ssize_t/status_t mixup.

9af2105d 10-Feb-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Move ZlibDecompressor to libshared

* This will be used to implement compressed http streams
* Remove the custom BDataOutput class, and use BDataIO instead, for
easier integration with existing code.

32cae724 06-Feb-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Handle location info request in app thread

* ... instead of queuing it for the job thread. The advantage is that
the request will be handled immediately and clients won't have to wait
for transactions (which may even require user feedback) to finish. It
complicates Volume a bit, since there are now two threads that may
access it. The shared data have been moved to a State object which is
protected by a lock.
* For commit transaction requests check whether another package request
is already pending/in progress before queuing a job. Fail immediately,
if there is.

Fixes bug #10039.

d5ed97cd 03-Feb-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

LibsolvSolver::GetResult(): Fix package update cases

* The transaction_type(.., ..., SOLVER_TRANSACTION_RPM_ONLY)
categorization of the transaction steps is incorrect since rpm
automatically replaces an older package version when a new one is
installed and thus such package removals would be omitted. Use a
simpler check instead.
* Omit the unnecessary explicit check whether a package really has to be
installed.

Thanks to Michael Schroeder @ SUSE for his help figuring this out.

800d5376 26-Jan-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

package kit: Disable curl requirement on bootstrap build

* As per the mailing list.
* Introduce HAIKU_BOOTSTRAP_BUILD define to sources
to let them know they are taking part in a bootstrap

6ef57ae2 25-Jan-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Add full-sync command

* BSolver/LibsolvSolver: Add FullSync() method. It uses libsolv's
SOLVER_DISTUPGRADE mode.
* BPackageManager: Add FullSync() using the new solver mode.
* pkgman: Add full-sync command.

The new command is similar to the update command without arguments, just
more aggressive, allowing downgrading or even removal of packages, to
match the state of the repositories. Just like "update" it doesn't work
properly yet.

6a2d12cb 17-Dec-2013 Jonathan Schleifer <js@webkeks.org>

PackageInfoParser.cpp: Add missing include for strtoll.

01adde85 27-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: Add ArchitectureName()

ecd7a82e 27-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverPackage: Add Version()

fc198cc3 21-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriteImpl: Report error when failing to read .PackageInfo

Fixes #10228.

676481a5 21-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathFinder: Fix resolvable expression support

We need to use the package's .self symlink, since that does point to
the package's installation location. The containing directory lives in
/boot/system/package-links and would therefore always resolve to the
system installation location.

62b164bd 21-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathFinder: Add BPackageResolvableExpression initialization

Add a constructor and a SetTo() method with a
BPackageResolvableExpression parameter instead of a path. The path of
the package satisfying the expression is used.

The new functionality lives in libpackage as it uses the package kit.

ee8e9158 20-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager::UserInteractionHandler: Make non-abstract

Most of the hooks don't strictly need a non-empty implementation. The
defaults now simply throw exceptions in those that do. This allows the
class to be instantiated, which is useful when a BPackageManager is only
used for finding packages.

6722e1ae 20-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add mandatory constructor parameters

Require the installation interface and the user interaction handle to
be passed to the constructor. Formerly, derived classes set them
manually in their constructors. This makes using the class without
having to subclass it possible.

88706cfa 20-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: Add API for parsing resolvable expression strings

* Add BPackageInfo::ParseResolvableExpressionString().
* Add BPackageResolvableExpression constructor and SetTo() taking an
expression string.

a4bdd98c 29-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo::Parser: Fix parsing the requires operator

For entries without operator (and version) an invalid enum value would
be used for the resulting BPackageResolvableExpression. Now it's
B_PACKAGE_RESOLVABLE_OP_ENUM_COUNT in that case.

690bccd4 29-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo::StringBuilder: Fix writing non-string lists

Even a list with only one element needs to be enclosed in {...}.

79d29839 29-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo::StringBuilder: Fix string escaping

3f40dcb6 25-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl::_AttributeRemoved(): Update string cache

When removing a string attribute, decrement the referenced string's
usage count in the string cache. This fixes the potentially incorrect
usage counts in update mode. Not a serious problem, but it could lead
to only singly (or no longer) used strings to be written to the string
subsection instead of encoding them inline and thus to slightly greater
file sizes.

c9ed1ea2 25-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl: Fix package file heap leak on update

_Init(): In update mode remove the package attributes section and the
TOC section from the package file's heap. We write the updated sections
in Finish(); previously the space for the old sections would be leaked.
This was also the reason why updating haiku_loader would result in a
non-bootable image.

df266f1c 21-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BDaemonClient::CommitTransaction(): Align with documentation

The method is supposed to return B_OK as long as the _result object has
been initialized, even if committing the transaction failed. Fixes the
unhelpful error messages of pkgman when committing the transaction
failed for some reason.

4b7e2196 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
I'm sure some occurrence still remain. They can be adjusted when the
remaining B_COMMON_*_DIRECTORY constants are removed.

8bf87f93 30-Sep-2013 François Revol <revol@free.fr>

Actually fix the build

Looks like I was too quick on previous commit.

It seems -pthread is actually not that much needed on Linux though...
although the manpage says "compile and link with -pthread". Go figure.

Now dlopen() uses RTLD_LAZY | RTLD_LOCAL for Linux, which seems
to work here.

57405de5 29-Sep-2013 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Always use dlopen and dlsym to load libsolv

Previous implementation used weak symbols on all platforms except Haiku. Mac OS X also does not support this use of weak symbols. In the discussion of #10028 it was decided that probably more platforms will have problems with this approach, so instead use the approach that always works.

493d13f0 28-Sep-2013 Rene Gollent <anevilyak@gmail.com>

libpackage: Add missing build dependency.

9345049a 28-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Package Kit: Implement progress notifications.

- BJobStateListener: Add progress state and corresponding hook.
- FetchFileJob: Notify job progress hook on libcurl notifications.
- UserInteractionHandler: Add hooks for download progress and checksum
validation progress.
- PackageManager: inherit from JobStateListener and watch for job
notifications for internally generated jobs. Forward to corresponding
UserInteractionHandler hooks as needed.
- Adapt pkgman, HaikuDepot and package_daemon to above changes.
Neither HaikuDepot nor package_daemon's progress hooks are wired up to
do anything yet though.

fe39d2eb 27-Sep-2013 Rene Gollent <anevilyak@gmail.com>

BPackageManager: Eliminate RequestHandler.

- Pull functionality back into package manager itself since the extra
indirection doesn't really buy us anything in this case, as neither
request that it handles requires a decision provider.
- Adjust pkgman and HaikuDepot accordingly.

672795a3 27-Sep-2013 Rene Gollent <anevilyak@gmail.com>

BDecisionProvider: Make YesNoDecisionNeeded() non-abstract.

- A subset of jobs that require a BContext don't in fact make use of the
decision provider. As such, make the default implementation usable for
those cases so one doesn't need to always create a dummy derived class.

a7a7aaaf 26-Sep-2013 Rene Gollent <anevilyak@gmail.com>

libpackage: Add global init/terminate routines.

- Currently only used to call libcurl's global initialization and
cleanup routines.

cd76e090 24-Sep-2013 Rene Gollent <anevilyak@gmail.com>

libpackage: Use libcurl directly for downloads.

- Initial step towards allowing listening for download progress.

624ba548 29-Sep-2013 François Revol <revol@free.fr>

Add missing architectures for packages

The list in packagefs wasn't in sync anyway.

81a828b6 29-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Auto-refresh if repository cache is missing

This makes the initial "pkgman refresh" superfluous, that was necessary
for "install"/"search" to work.

6eb7e259 28-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

libpackage_build: undefined weak symbols are unsupported

... also for gcc 4 (#8288), so we have to use the dlopen() method
always when building on Haiku. Fixes the build on gcc 4 Haiku.

86cdd3f8 27-Sep-2013 Axel Dörfler <axeld@pinc-software.de>

PackageWriterImpl: improve error output.

0a345af7 18-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Separate notification from deletion in repository-handlers.

* Add NotifyDone() to all repository-attribute handlers and invoke that
to notify any listeners.
* Unify deletion to a single implementation of Delete() in the base
class. Before, the root handler for a repository didn't do that, but
just triggered the notification.

93cb796e 18-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Context: Add more uniqueness to temp directory names.

- If a single thread attempted to establish multiple package kit
contexts, it would fail due to a collision between their respective
temporary directories. As such, use both the thread ID and
system_time() as a random elements in the directory name to ensure
this doesn't occur.

50ae264d 17-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add support for adding a package-info to BRepositoryWriter.

c159d0cf 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BActivationTransaction: Fix unarchiving constructor

99f9333a 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager::_CommitPackageChanges(): Fix error handling

The error returned by CommitTransaction() is just indicates whether
transactionResult has been initialized.

d3c96ad8 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Support pre-added packages

... as needed for the package daemon. _PreparePackageChanges() doesn't
try to clone them in this case.

36204024 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add InstalledRepository::EnablePackage()

018173a2 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add ResultComputed() callback

c032903a 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add VerifyInstallation()

7e0d2c4f 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add alternate Install()/Uninstall()/Update()

5a5d1465 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Make _InstallationRepository() protected

56b13760 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BActivationTransaction: Make BArchivable

9b2fd341 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BSolverPackageSpecifierList::AppendSpecifiers()

43bd5a49 01-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

<package/Request.h>: Don't leak JobQueue into public namespace

cf3bb0d7 31-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Abstract installed repository initialization

* Rename TransactionHandler -> InstallationInterface and
DaemonClientTransactionHandler -> ClientInstallationInterface.
* Add InstallationInterface::InitInstalledRepository(). Use in
_AddInstalledRepository() to get the repository packages instead of
using the package roster. The ClientInstallationInterface
implementation does it that way.

c138f1f2 31-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BRepositoryBuilder: Add constructor for pre-init'ed repository

83462cc2 31-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Refactor reusable pkgman code into libpackage

* Move RepositoryBuilder class to libpackage and add B* prefix to name.
* Pull BPackageManager class out of PackageManager and move to
libpackage. The base class is customizable via three handler objects
responsible for transaction handling, request execution, respectively
user interaction.
* Reorganize _ApplyPackageChanges(): Now we first prepare the
transactions for all affected installation locations (downloading
files etc.) and then commit them.

6692db5c 29-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: Add fileName property

The property is archived and unarchived, but otherwise not yet stored.
If not set, FileName() returns CanonicalFileName(). Can be used for
packages like haiku.hpkg etc. that don't have a properly qualified file
name (yet).

7af664c9 29-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

LibsolvSolver: change handling of fInstalledRepository

We update/set it in _AddRepositories() instead of in AddRepository(). In
code needing it earlier _InstalledRepository() can be used.

This change allows calling to SetInstalled() on a repository that has
already been added to the solver.

1e6177c2 29-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix broken build of package kit (due to warnings) for x86_64.

89cb0015 27-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver::VerifyInstallation(): Add flags parameter

Only flag ATM is B_VERIFY_ALLOW_UNINSTALL. It tells to solver to suggest
uninstalling packages when necessary instead of considering such a case
a problem.

75d15eb4 27-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver: Extend FindPackages() functionality

* Add flag B_FIND_INSTALLED_ONLY to only return installed packages.
* Add FindPackages() version that finds packages like Install() or
Uninstall() do.

220b5e1f 27-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverRepository: Add {Remove,Delete}Package()

2ada08d2 27-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

LibsolvSolver: Automatic whitespace cleanup

bc0491ae 27-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: Add Matches()

Checks whether the package satisfies the given
BPackageResolvableExpression.

48e17c15 27-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageResolvableExpression: Add Matches()

Checks if the given BPackageResolvable respectively the BPackageVersion
pair satisfies the expression.

c33daf26 25-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: fix JobQueue::_RemoveDependantJobsOf()

* Delete the right job (the removed dependant job).
* Sever the depencency link between the jobs or the next iteration of
the loop would process the same job again.

ab9a1179 25-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: JobQueue::Pop() fix invalid iterator access

c591ff14 05-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Support building libpackage-add-on-libsolv.so for secondary arch

7bd562ab 04-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

lib{network,package,shared,agg,icon}: secondary arch support

03d70b4e 13-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add package architecture constant for x86-64

0e9ec703 09-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package info parser: improve string parsing

* Instead of two string token types (TOKEN_WORD, TOKEN_QUOTED_STRING),
there's now only one (TOKEN_STRING). Whether the string meets the
criteria is checked where needed. In most cases the check was already
done or not necessary anyway.
* Strings can now consist of an arbitrary sequence of quoted and
unquoted strings and escaping is also supported in unquoted string
segments.
* Among other things this fixes incorrect restrictions for resolvable
names and should also make quoting paths superfluous (unless they
contain separator characters).

276c321b 09-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo::Parser::_ParseFlags(): fix indentation

014eed80 06-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Change repository directory layout

* Under the base URL there are supposed to be the repository files and a
subdirectory "packages".
* Fix the repository URL related confusion introduced earlier. The URL
in
the repository info (and thus in the repository file) is supposed to
be the base URL for the repository. It is not a (potentially)
different base URL for the package files. Package and repository
files were supposed to live in the same directory. Now, by requiring
the package files to live in a subdirectory -- which can also be a
symlink -- we gain some flexibility.
The URL in the repository config is usually the same as the in the
repository info, unless it refers to a mirror site. This allows for
mirrors to copy the original repository verbatim.
* Remove the PackageURL rule and introduce a DownloadPackage rule
instead. The URL for a package file cannot be computed in the jam
parsing phase anymore, as it contains the hash value of the package
list.
* BRepositoryConfig: Add PackagesURL() for convenience.

ee64a0a6 05-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BRepositoryConfig::SetTo(): fix use after deallocation

The strings retrieved from the driver settings were used after
unload_driver_settings(). Use BDriverSettings which also simplifies
things quite a bit.

a28a0ac6 05-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo::_ExtractUsers(): fix no group case

41741912 05-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: fix range check in c'tor

4dd0ed48 05-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver: fix for gcc 2

Missed one #if, so sCreateSolver was never initialized.

bd915d9f 05-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver: fix build host build for gcc 2

gcc 2 doesn't support the weakref attribute. Rather use the regular
(target) method to initialize sCreateSolver instead (pthread once,
dlopen()). Since we know that we're on Haiku, that doesn't add any
dependencies that aren't available anyway.

98c6dfa4 05-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch build system from optional package to repositories

* Build libsolv and the dependency solver part of the package kit for
the build platform.
* Add build tool get_package_dependencies. Given a list of package files
and a list of repository files it determines the additional packages
that need to be retrieved from the repositories and prints their URLs.
* Add rules to work with external repositories in the build system
(build/jam/RepositoryRules):
- PackageRepository declares an external repository with all its
packages. The URL of the repository file isn't specified. It is
computed from a given base URL and the SHA256 hash of the list of
package files.
- GeneratedRepositoryPackageList generates a file containing the file
names of all packages in a repository.
- IsPackageAvailable returns whether a package is available in any
repository.
- PackageURL returns the URL for a package.
* Declare the HaikuPorts repository for x86_gcc2
(build/jam/repositories/HaikuPorts/x86_gcc2).
* Add rule AddHaikuImagePackages to add a package to the image and rule
IsHaikuImagePackageAdded to determine whether a package has been
added.
* OptionalPackages: Remove all entries that just downloaded and
installed an external package. AddHaikuImagePackages can be used
instead and is used in the remaining entries. Also move the remaining
optional package dependency declarations from
OptionalPackageDependencies here.
* ExtractBuildFeatureArchives: Instead of the URL parameter a package
name must be specified now. This allows to simplify BuildFeatures
significantly, since there's no dealing with URLs anymore. "if" out
the entries that aren't supported yet.
* build_haiku_image: For the packages installed in system and common
resolve their dependencies and download and install them as well.

001e9064 05-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

LibsolvSolver: missing include

e8533402 04-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Repository file format: group attributes of a package

* Introduce new package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE (valid
only in a repository file) to group the attributes belonging to a
package.
* BRepositoryContentHandler:
- No longer derive from BPackageContentHandler.
- Add hooks HandlePackage() and HandlePackageDone() that bracket the
attributes for a package. This is more explicit and robust than
handlers having to guess when one package ended and the next began.
* BRepositoryCache: Make use of BPackageInfoContentHandler. No need to
duplicate the code for reading a package info from package info
attributes.

383cd08d 04-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverRepository: add SetTo(const BRepositoryCache&)

6a7e3406 04-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverRepository: fix gcc 4 build

c8928835 04-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BRepositoryCache: use BStandardErrorOutput

69f67e6d 04-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BRepositoryInfo: make sure fInitStatus is always set correctly

695a1b24 04-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

repository writer: fix use of incorrect header size

The header size of the package file header was used, which resulted in
broken repository files.

3c3dd841 03-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

RepositoryWriterImpl::_AddPackage(): more info in error messages

fd28164d 03-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Also allow source packages in a repository for any architecture

a20eb7f4 13-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Update libsolv package

Also make use of new build feature rules.

7b6d45c9 11-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

LibsolvSolver: Use Solvable only where necessary

repo_internalize() apparently reorganizes the storage for Solvable
objects so that our fSolvablePackages and fPackageSolvables maps could
contain invalid pointers. Now the maps use the solvables' ID instead.
Also use the IDs instead of the Solvable objects in most other places,
which in some cases even simplifies the code a bit.

a266b57a 05-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Handle new ...IS_WRITABLE_DIRECTORY attribute

4489c88b 05-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Generalize user/global settings file attributes

* For all identifiers: Rename global settings file to global writable
file. We want to use the respective attribute also for other writable
files, not only settings files.
* User settings file/global writable file info/attribute: Add
isDirectory property/child attribute. This allows declaring global/
user settings directories associated with the package.

56b43eca 27-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfoContentHandler: Handle new attributes

Also add respective *Data constructors to BUser, BUserSettingsFileInfo,
and BGlobalSettingsFileInfo.

e2f30519 24-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: user big endian for chunk sizes

a98dd49a 24-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package info parser: allow escaping of new lines

So we can break long lines without changing the semantics.

38a0419a 24-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package info parser: improve parse error column numbers

Assume 4 column tab stops and compute the column numbers accordingly.

a3e070a7 24-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

WriterImplBase: Add _AddStringAttributeList()

... and simplify some code by using it.

c0ab1409 24-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attribute for declaring post install scripts

927e0708 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

WriterImplBase: Some simplifications

... using the recently introduced _AddStringAttribute[IfNotEmpty]().

0f4e11e7 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attributes for declaring users and groups

bf88057b 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Fix copy and paste oversight

daa10fc3 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Move package info string builder to its own header

6da0ce6f 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Move package info parser to its own file

79d5ddb7 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Verify that the attribute type matches

... the one expected for the respective attribute. Before it was
possible that e.g. a uint was read and then interpreted as a
const char*, if a string was expected for that attribute.

a8de2761 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Move package attribute ID definitions to a separate file

... <package/hpkg/PackageAttributes.h>, which also defines other
properties (name and type) for each attribute. It does so via a macro
that the caller can define to generate whatever code is desired.

fe707a23 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attributes for declaring settings files

Global and user settings files can be declared. For global ones an
update policy can be specified. If not specified, the settings file is
not included in the package, but created by the program (or user) later.
If an update type is specified, it defines what to do with the settings
file when updating the package to a newer version.

User settings files are never included in the package; they are always
created by the program or the user. If the package contains a template/
default settings file, it can be declared, but for informative purposes
only.

4ffb9234 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageFileHeapWriter::RemoveDataRanges(): Fix empty heap check

bac0bb2e 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

RepositoryWriterImpl: Write the heap fields in the header

47039b85 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Package/repository file format: Add a minor version header field

* Add minor_version to hpkg_header and hpkg_repo_header and make
heap_compression uint16.
* If the minor version of a package/repository file is greater than the
current one unknown attributes are ignored without error. This allows
introducing new harmless attributes without making the resulting files
unreadable for older package kit versions.

5dae1541 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add "source" package architecture

bc306e21 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Declare some string constants actually const

46122852 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

packagefs: Add caching for the package file heap reader

* ReaderImplBase:
- Add virtual CreateCachedHeapReader() which can create a cached
reader based on the given heap reader.
- Rename HeapReader() to RawHeapReader() and add HeapReader() for the
cached heap reader.
- Add DetachHeapReader() to allow a clients to remove the heap
reader(s) after deleting the ReaderImplBase object.
* packagefs:
- Add CachedDataReader class, which wraps a given
BAbstractBufferedDataReader and provides caching for it using a
VMCache. The implementation is based on the IOCache implementation.
- Use CachedDataReader to wrap the heap reader. For file data that
means they are cached twice -- in the heap reader cache and in the
file cache -- but due to the heap reader using a VMCache as well,
the pages will be recycled automatically anyway. For attribute data
the cache should be very helpful, since they weren't cached at all
before.

c3bd329f 20-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageFileHeapAccessorBase: Fix error output

d59e0feb 20-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package: Suppress version mismatch errors where V1 is supported

* Add flags parameter to Init() of BPackageReader and friends.
* Introduce flag B_HPKG_READER_DONT_PRINT_VERSION_MISMATCH_MESSAGE and
don't print a version mismatch error when given.
* package extract/list: Use the new flag.

1559102f 20-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Fix strings subsection validity check

A strings section with 0 strings is still 1 byte long. Also improve the
error output in the error case.

88adb4a8 19-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageFileHeapWriter: Add error message

... in case compression fails unexpectedly.

d03ac965 19-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Fix gcc 4 build

b05413ed 18-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageFileHeapWriter: Fix update case

* Pull _UnwriteLastPartialChunk() out of Reinit() for reuse.
* _UnwriteLastPartialChunk(): fPendingDataSize wasn't set.
* _PushChunks(): Some simplifications for clarity.
* ChunkBuffer/RemoveDataRanges(): Use data reading and decompression
methods provided by our base class instead of duplicating the
implementation.
* RemoveDataRanges():
- _FlushPendingData() before starting, so we don't ignore the pending
data and _UnwriteLastPartialChunk() when done, so a partial chunk
is read back into the pending data buffer.
- fUncompressedHeapSize wasn't reset before the main processing loop,
thus resulting in an erroneous size later on.

520a7a76 18-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageFileHeapAccessorBase: small refactoring

* Pull method DecompressChunkData() out of ReadAndDecompressChunkData()
for potential reuse.
* Also fix/improve some error output strings.

172f25fd 18-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl: Fix reading the package-info in update mode

96af1d28 18-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageFileHeapWriter: Small style fix

796343ed 18-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Allow specifying the compression level for package creation

* Introduce BPackageWriterParameters which comprises all parameters
for package creation, currently flags and compression level. Such an
object can be passed to BPackageWriter::Init() and is passed on to
PackageWriterImpl and WriterImplBase.
* PackageFileHeapWriter: Add compressionLevel property and pass the
value on to ZlibCompressor.
* package add/create: Add options -0 ... -9 to specify the compression
level to be used.

18b19ba4 18-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ZlibCompressor: Allow setting the compression level

1f633814 17-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: compress the whole heap

Instead of handling compression for individual file/attribute data we
do now compress the whole heap where they are stored. This
significantly improves compression ratios. We still divide the
uncompressed data into 64 KiB chunks and use a chunk offset array for
the compressed chunks to allow for quick random access without too much
overhead. The tradeoff is a limited possible compression ratio -- i.e.
we won't be as good as tar.gz (though surprisingly with my test
archives we did better than zip).

The other package file sections (package attributes and TOC) are no
longer compressed individually. Their uncompressed data are simply
pushed onto the heap where the usual compression strategy applies. To
simplify things the repository format has been changed in the same
manner although it doesn't otherwise use the heap, since it only stores
meta data.

Due to the data compression having been exposed in public and private
API, this change touches a lot of package kit using code, including
packagefs and the boot loader packagefs support. The latter two haven't
been tested yet. Moreover packagefs needs a new kind of cache so we
avoid re-reading the same heap chunk for two different data items it
contains.

16e5e5e4 17-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Some *DataReader improvements

* BFDDataReader: Add SetFD().
* BBufferDataReader: Derive from BAbstractBufferedDataReader.

21ee6d5c 14-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Some comment updates

0ee16518 14-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Rename BBlockBufferCache and friends to *Pool*

Also move BBlockBufferPoolNoLock into BHPKG namespace with the other
classes. Not sure why it wasn't there before.

7adfd76b 13-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add "base package" package attribute

df295396 13-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove resolvable provides type

* Remove BPackageResolvableType and respective property from
BPackageResolvable.
* Remove package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE_PROVIDES_TYPE.

2c32402d 12-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: internalize BPackageDataReader

It is no longer public (or even private) API. BPackageDataReaderFactory
returns a BAbstractBufferedDataReader instead. The advantage is that
the latter doesn't have hpkg format specific dependencies.

175ff8ec 12-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: Add BAbstractBufferedDataReader

It doesn't do much in terms of buffering, but defines an interface
buffered readers can implement, namely the additional
ReadDataToOutput() which currently BPackageDataReader specifies.

b5786b0f 12-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageDataReader: Remove unused Size(), BlockSize()

dd0b33cb 12-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: Support reading both HPKG format versions

7575abbc 12-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Clone read support functionality for HPKG format version 1

It uses sub-namespace BPackage::BHPKG::V1. Unlike the one for the
current format version, the V1 version of BPackageInfoContentHandler
lives in BHPKG(::V1) sub-namespace and is private.

171fd58c 12-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: some fixes for multi-version support

* Use enums/constants/functions instead of preprocessor macros.
* Missing include in PackageInfoAttributeValue.h.
* PackageReaderImpl::Init(): Check version before header size and
return B_MISMATCHED_VALUES instead of B_BAD_DATA, if the version
doesn't match. This allows callers to determine the condition and
try a reader for a different version. A more flexible interface for
that case would be nice, but since we want to support the old package
version only temporarily, the current solution should be good enough.

7c6bff17 05-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Complete outsourcing of zlib

* Add optional packages Zlib and Zlib-devel.
* Simplify the build feature section for zlib and also extract the
source package.
* Replace all remaining references to the zlib instance in the tree and
remove it.

25a7b01d 05-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge branch 'master' into package-management

Additional changes:
* Add src/system/kernel/lib/zlib, which builds a kernel version of zlib,
needed by packagefs.
* BuildFeatures: Add a build feature "gcc2" to allow for easier checks.
* Referenceable.cpp: Include <OS.h> instead of <debugger.h>. The latter
is not needed and prevents building for the build platform.
* zlib/zutil.h: Fix gcc 2 build. We really should use the external
package instead.

Conflicts:
.gitignore
build/jam/BuildSetup
build/jam/FileRules
build/jam/FloppyBootImage
build/jam/HaikuImage
build/jam/ImageRules
build/jam/KernelRules
build/jam/NetBootArchive
build/jam/OptionalBuildFeatures
build/jam/OptionalLibPackages
build/jam/OptionalPackageDependencies
build/jam/OptionalPackages
build/scripts/build_haiku_image
configure
data/bin/installoptionalpackage
data/system/boot/Bootscript
headers/os/app/Message.h
headers/os/package/PackageInfo.h
headers/os/package/PackageInfoAttributes.h
headers/os/package/PackageInfoSet.h
headers/os/package/PackageRoster.h
headers/os/package/PackageVersion.h
headers/os/package/hpkg/PackageInfoAttributeValue.h
headers/os/storage/FindDirectory.h
headers/os/storage/Node.h
headers/os/support/StringList.h
headers/private/system/directories.h
src/add-ons/kernel/drivers/audio/ac97/es1370/Jamfile
src/add-ons/kernel/file_systems/packagefs/AttributeIndex.cpp
src/add-ons/kernel/file_systems/packagefs/Jamfile
src/add-ons/kernel/file_systems/packagefs/Package.cpp
src/add-ons/kernel/file_systems/packagefs/Package.h
src/add-ons/kernel/file_systems/packagefs/PackageDomain.cpp
src/add-ons/kernel/file_systems/packagefs/PackageDomain.h
src/add-ons/kernel/file_systems/packagefs/PackageFSRoot.cpp
src/add-ons/kernel/file_systems/packagefs/PackageLinkDirectory.cpp
src/add-ons/kernel/file_systems/packagefs/PackageLinkDirectory.h
src/add-ons/kernel/file_systems/packagefs/PackageLinkSymlink.cpp
src/add-ons/kernel/file_systems/packagefs/PackageLinkSymlink.h
src/add-ons/kernel/file_systems/packagefs/PackageLinksDirectory.cpp
src/add-ons/kernel/file_systems/packagefs/PackageNode.h
src/add-ons/kernel/file_systems/packagefs/ResolvableFamily.cpp
src/add-ons/kernel/file_systems/packagefs/Version.cpp
src/add-ons/kernel/file_systems/packagefs/Version.h
src/add-ons/kernel/file_systems/packagefs/Volume.cpp
src/add-ons/kernel/file_systems/packagefs/Volume.h
src/add-ons/kernel/file_systems/packagefs/kernel_interface.cpp
src/add-ons/kernel/file_systems/userlandfs/shared/driver_settings.c
src/apps/deskbar/BarApp.cpp
src/apps/deskbar/BarMenuBar.cpp
src/apps/deskbar/BarMenuBar.h
src/apps/deskbar/BarView.cpp
src/apps/deskbar/BarView.h
src/apps/deskbar/BarWindow.cpp
src/apps/deskbar/BarWindow.h
src/apps/deskbar/DeskbarMenu.cpp
src/apps/deskbar/DeskbarMenu.h
src/apps/deskbar/DeskbarUtils.cpp
src/apps/deskbar/DeskbarUtils.h
src/apps/deskbar/ExpandoMenuBar.cpp
src/apps/deskbar/ExpandoMenuBar.h
src/apps/deskbar/TeamMenu.cpp
src/apps/processcontroller/ProcessController.cpp
src/apps/remotedesktop/RemoteDesktop.cpp
src/bin/bash/config-top.h
src/bin/finddir.c
src/bin/package/Jamfile
src/bin/package/command_add.cpp
src/bin/package/command_create.cpp
src/bin/package/command_list.cpp
src/bin/package_repo/command_list.cpp
src/bin/pkgman/command_refresh.cpp
src/build/libbe/support/Jamfile
src/build/libpackage/Jamfile
src/build/libroot/Jamfile
src/build/libroot/fs.cpp
src/build/libroot/remapped_functions.h
src/kits/locale/MutableLocaleRoster.cpp
src/kits/opengl/GLRendererRoster.cpp
src/kits/package/PackageInfo.cpp
src/kits/package/PackageInfoSet.cpp
src/kits/package/PackageRoster.cpp
src/kits/package/PackageVersion.cpp
src/kits/package/RepositoryCache.cpp
src/kits/package/hpkg/PackageWriterImpl.cpp
src/kits/package/hpkg/ReaderImplBase.cpp
src/kits/package/hpkg/WriterImplBase.cpp
src/kits/print/PrintTransport.cpp
src/kits/print/Printer.cpp
src/kits/screensaver/ScreenSaverRunner.cpp
src/kits/support/StringList.cpp
src/kits/tracker/ContainerWindow.cpp
src/kits/tracker/DeskWindow.cpp
src/kits/tracker/PoseView.cpp
src/libs/print/libprint/Transport.cpp
src/preferences/printers/AddPrinterDialog.cpp
src/preferences/screensaver/ScreenSaverWindow.cpp
src/servers/debug/DebugServer.cpp
src/servers/input/AddOnManager.cpp
src/servers/media_addon/MediaAddonServer.cpp
src/system/boot/Jamfile
src/system/boot/loader/Jamfile
src/system/boot/loader/loader.cpp
src/system/boot/loader/vfs.cpp
src/system/kernel/fs/vfs.cpp
src/system/kernel/fs/vfs_boot.cpp
src/system/libroot/os/find_directory.cpp
src/system/runtime_loader/runtime_loader.cpp
src/tools/package/Jamfile


0c661892 30-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo::Parser: Fix error output

The "=" operator isn't actually allowed in a resolvable expression. It
has to be "==" instead.

212c636f 21-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver/LibsolvSolver: Add Update()

de62d761 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver/LibsolvSolver: Add Uninstall()

Also fix incorrect check in LibsolvSolver::GetResult().

8e6c3631 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver/LibsolvSolver: Add problem solution selection support

... and re-solving.

6a143071 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BDaemonClient: Add support for creating activation transactions

* BActivationTransaction:
- Remove non-trivial constructor.
- Remove package list parameters from SetTo().
- Add AddPackageTo{Dea,A}ctivate().
* BDaemonClient:
- Add CreateTransaction(). It creates a transaction directory and
initializes a BActivationTransaction. Packages to de-/activate have
to be added afterwards.
- Add BCommitTransactionResult::FullErrorMessage().

69a53ac5 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add DownloadFileRequest

Downloads a file and optionally checks its checksum.

e14b2471 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add StringChecksumAccessor

A ChecksumAccessor implementation for an already known checksum.

be8f5e00 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: Add CanonicalFileName()

The name of the package file is not part of the package-info.
CanonicalFileName() constructs the name the file should have (not
enforced anywhere (yet)).

f71be99b 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BRequest: Add Process()

The method creates the initial jobs for the request and processes the
jobs from the job queue until empty or an error occurs.

85d2badf 19-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Add support for activation change request

* daemon: Handle new request B_MESSAGE_COMMIT_TRANSACTION. It activates
and deactivates given sets of packages. The new packages must be
placed in a directory in the administrative directory. The daemon
moves them to the packages directory and the deactivated packages to
a subdirectory it creates. It also save the old activation state
there.
* Add private BActivationTransaction, describing an activation change
transaction.
* BDaemonClient: Add CommitTransaction(), which sends a given
BActivationTransaction as a B_MESSAGE_COMMIT_TRANSACTION request to
the daemon.

Completely untested yet.

7a27bcd1 19-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: Make use of BMessage::{Add,Find}Strings()

3c6784e9 19-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo::Parser: Be a bit stricter wrt. names after all

Also disallow the operator characters in names.

cba60307 19-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo::Parser: Relax package/resolvable name rules

Now we allow any character but '-', '/', and whitespace.

ea8b5c25 18-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo parser: Allow '.' in micro version component

Otherwise we'd have to encode e.g. "cvs-1.12.13.1" differently.

9d81dc76 18-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackage{Info,Version}: Switch to '~' as pre-release separator

Also allow '.' in the pre-release string (as in "alpha4.1") and in
package and resolvable names.

5e6adff9 18-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageVersion::ToString(): Return empty string, if invalid

defc1f77 18-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackage{Version,Info}: Switch to new pre-release rule

Also add several checks in the package-info parser to enforce the
<alphanum_underscore> requirement of package/resolvable names and
version components.

4210ed01 14-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix BMessage::GetInfo() return value check

Since B_OK is 0, the change doesn't affect the semantics.

202c1daa 15-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageVersion: Rename property release to revision

* ... to avoid confusion with the preRelease property. It's also called
"revision" in the HaikuPorts recipes.
* Update libsolv package. Was necessary due to the BPackageVersion
change, but also includes a few more changes.

bd59e0d0 15-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: Fix Linux build

... including an actual bug (operator "|" instead of "||").

e6216e37 14-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement getting a BInstallationLocationInfo

* Rename PackageDaemonDefs.h to DaemonDefs.h.
* Replace the MESSAGE_GET_PACKAGES by the new
B_MESSAGE_GET_INSTALLATION_LOCATION_INFO, which not only returns the
packages, but also other information about the installation location.
* daemon: Volume: Implement a change count which is bumped whenever
packages are activated/deactivated/added/removed. Cache the reply
for a location info request, using the change count to check whether
it is still up-to-date.
* Add private BDaemonClient for communication with the daemon.
* BRoster:
- Add GetInstallationLocationInfo() using BDaemonClient.
- Reimplement GetActivePackages(), using
GetInstallationLocationInfo().

d7d9497e 14-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BInstallationLocationInfo

b2d96da5 14-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfoSet::Iterator: Fix NULL pointer dereference

Since the BPackageInfoSet's map is created lazily, it can be NULL when
an Iterator is constructed.

8a4ebe2c 14-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Make BPackageInfo archivable

711a2a6e 12-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfoSet: Add copy constructor, assignment operator

* Implement copy-on-write support.
* Add copy constructor and assignment operator.
* Remove Init(). Initialize lazily instead. Since AddInfo() can fail
and we check initialization anyway, there's no point in having an
explicit Init(). Given that there was only one invocation of Init()
in the package kit and its users, it was very likely missing in some
places.
* Fix a few places where we ignored that the PackageMap actually
contains lists of PackageInfo objects.

0d8ed3f2 12-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver::Install(): Add optional unmatched specifier return param

71293f8b 12-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverPackageSpecifier: Fix string constructor

334a5a56 12-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverRepository: Change priority from uint8 to int32

This allows us to specifies priorities below and above the user
definable range.

115eae73 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

LibsolvSolver::Install(): Fix broken B_PACKAGE case

01758ed3 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Rework SolverPackageSpecifier

* It no longer consists of a BPackageResolvableExpression and a
repository. Instead it can now either refer to a package directly or
consist of a search string.
* SolverPackageSpecifierList: Add AppendSpecifier() convenience
versions.
* Adjust LibsolvSolver and pkgman accordingly.

663e351c 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver/pkgman: Support for searching in provides

* BSolver/LibsolvSolver:
* Add B_FIND_IN_NAME and make searching in the names explicit.
* Add B_FIND_IN_PROVIDES to search the packages' provides list.
* pkgman: Also search in provides.

fc57db48 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver/LibsolvSolver: Add FindPackages()

Given a search string it finds all matching packages.

a78a2540 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

LibsolvSolver: Fix the lazy re-/initialization

* _Init() was a bit too enthusiastic, throwing really everything away.
So, after calling it at the beginning of _AddRepositories() there
wouldn't be any repositories anymore.
* Rename _Init() to _InitPool() to make its purpose clearer.
* Pull a _CleanupPool() out of _Cleanup() that only deletes the pool
and anything depending on it.
* RepositoryInfo::HasChanged(): Always consider changed when there's no
libsolv repo yet.

62f7022a 10-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: get active packages list from daemon

* daemon: Implement private message protocol to retrieve the active
packages.
* BPackageRoster::GetActivePackages(): Get the active packages list
from the daemon.

6c6460e1 10-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageInfo: Add GetConfigString() and ToString()

483d4996 10-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

LibsolvSolver: Make repeated use of object possible

* _Solve(): Clean up the old solver before creating a new one.
* _AddRepositories(): Don't do anything, if the repositories haven't
changed.

50888ebd 09-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverRepository: Add a change count

... so we can easily check whether the repository has changed since the
last time we used it.

4b3ca457 09-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverProblemSolution: Fix ToString() template strings

5e01af31 09-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: Add data structures for problem solutions

... and add the problem solutions in LibsolvSolver.

a8b832bf 03-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverRepository::AddPackage(): Add optional return parameter

... returning the added BSolverPackage object.

65502bbe 03-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver: Add VerifyInstallation()

... and implement it in LibsolvSolver.

07a4d4e3 03-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolverRepository: Add SetPriority()

1a4d020d 02-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Flesh out the package kit solver API quite a bit more

* Reorganize things a bit:
- BSolver is now an abstract base class.
- A libsolv based implementation, LibsolvSolver, lives in a new
add-on, which is loaded lazily.
- Get rid of libpackage_solver. Save for LibsolvSolver everything
is moved to libpackage.
- This is a nicer solution for the cyclic dependency caused by
libsolv (libsolvext to be precise) using the package kit for
reading repositories and package files.
* Add a solver result data structure and and an accessor the solver.
* Add problem reporting support to the solver. There aren't data
structures for the problem solutions yet and support for selecting
solutions and re-solving is missing as well.

2d0563f3 02-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix BPackageResolvableExpression::ToString()

The operator was inserted as a number.

a3dd6caf 02-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add public package version parsing API

* BPackageVersion: Add respective constructor and SetTo().
* BPackageInfo: Add static ParseVersionString() utility method. It's
only there because the parser lives in the BPackageInfo
implementation.

dfb5fa8b 01-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add convenience methods BPackageInfo::ReadFromPackageFile()

df65c311 01-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BNoErrorOutput to package kit

0816749e 01-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package_repo: Removes dependency to package

* Move StandardErrorOutput to libpackage and into proper namespace to
avoid "package_repo" having to reuse the "package" source file.
* package_repo: Fix incorrect includes of "package.h".

479ca816 31-Mar-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Beginnings of the PackageKit dependency solver

Not functional (or tested) yet. The libsolv setup for a somewhat
simplified installation case should be more or less complete, though.
The solution conversion to to-be-created Haiku data structures and the
handling of problems is still missing, though.

10efbe6c 29-Mar-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BRepositoryInfo::SetTo(): driver settings unloaded too early

The string pointers retrieved from the driver settings are only valid until
the settings handle is freed. The were also used afterwards, though.

dc95dfe6 15-Dec-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

package kit: Fix independent build

* ZlibCompressionBase.cpp isn't the only
source / header to required zlib
* Just add zlib as a dep for all kit sources

a6a99fce 30-Oct-2012 Jérôme Duval <jerome.duval@gmail.com>

zlib: added an optional build package, integrated to the build

* optional package for zlib 1.2.7
* keep zlib in build for the bootloader tarfs

0e35d5d2 12-Dec-2011 John Scipione <jscipione@gmail.com>

Change instances of wether in comments to whether. No functional change intended.

9213e9d6 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BPackageRoster::GetActivePackages()

The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.

26265b7b 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add class BPackageInfoContentHandler

A BPackageContentHandler subclass that initializes a BPackageInfo from
the read package attributes. Pulled out of RepositoryWriterImpl's
PackageContentHandler.

e35a99be 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Pull class BPackageInfoSet out of BRepositoryCache

f96d3856 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed left-over code

9968845d 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use BStringList in package kit

Replace all instances of BObjectList<BString> by BStringList.

4f5f15f0 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BRepositoryCache: Add iteration, etc.

* Remove InitCheck() and the initializing constructor.
* Rename PackageCount() to CountPackages().
* Use BOpenHashTable instead of HashMap for the internal PackageMap.
* Allow multiple packages with the same name. Equally named packages are
in a singly linked list after the first package with that name.
* Add an Iterator inner class and a GetIterator() method, so one can now
iterate through the packages in the repository.

1524eed1 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Handle the newer package attributes

This unbreaks reading repository cache files using the respective
attributes.

d0b2d58a 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add error output in case of invalid compression ID

84f50b1c 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

GetRepositoryCache/Config(): return valid entry

Always create the common repository cache/config paths so the BEntry
that is returned is valid at least. Fixes BRefreshRepositoryRequest
failing when the common repository cache path didn't exist yet.

ad4fba78 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Initialize BRepositoryInfo::fInitStatus

56fed01d 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Handle the newer package attributes

0a9478a7 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Force package names and versions to lower case

6ae0ecd4 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add a package info "install-path" attribute

The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.

7efa133c 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageWriter: Add SetCheckLicenses()

The default is still "true", but now it is possible to disable the
license check.

e7c648e0 03-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl::_AddEntry(): Fix update logic

* Don't only look up the entry attribute when the entry is implicit.
Look it up, when it is a directory instead. This aligns it the logic
with _UpdateCheckEntryCollisions().
* When the entry attribute exits and the entry is not implicit, add file
attributes, but not stat data. This also aligns the logic with
_UpdateCheckEntryCollisions(), which removes colliding attributes, but
keeps stat data.

420a5c3e 03-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove copy'n'paste left-over

4d639659 03-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix "package add" heap compacting

PackageWriterImpl::_CompactHeap(): Incorrectly used fHeapEnd instead of
the heap size. So the last copied chunk was too large.

f4417e14 03-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl::_MoveHeapChunk(): better output

8ffba2a6 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Write uncompressed package file TOC, if necessary

00bc8e9c 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add support for adding/updating package entries

Add flags parameter to BPackageWriter::Init() (and the private
implementation classes) to indicate that an existing package file shall
be updated instead of created. Currently that always happens in-place.

de9e64b2 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Write uncompressed package attributes if necessary

When compression doesn't save space, using it nonetheless results in a
file that the reader complains about. So we fall back to writing an
uncompressed package attributes section in such a case.

The same still needs to be done for the TOC section.

443be501 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use fHeapOffset instead of sizeof(hpkg_header)

e6ebdaaf 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Move RegisterPackageInfo() to Finish()

78811461 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BLowLevelPackageContentHandler section hooks

* Add hooks HandleSectionStart() and HandleSectionEnd(). They are
invoked to bracket package file section, so the handler can
discriminate which section the attributes belong to.
HandleSectionStart() features a return parameter _handleSection, which
allows to handler to pick which sections it wants to handle.
* "package dump" does now print the section names.

b6d9fe9a 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl::_AddEntry(): Improve output

Print the relative path instead of only the leaf name.

8524dd36 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

SubPathAdder: Check for overflows, omit initial /

2fce2018 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BLowLevelPackageContentHandler interface extension

HandleAttributeDone(): Add parentToken parameter.

37880dd0 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove debug output

0f9a98a4 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

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

BPackageInfo::ReadFromConfigFile() BFile& version

85e13d1e 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove the build platform work-arounds

4ebd3de8 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support package info [source] URL attributes

4b6a3a9c 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Change source URL package info attribute name

Use "-" instead of "_".

029f6d0d 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

208b212c 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

3a802b3d 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add URL/source URL hpkg package attributes

eb7e8951 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add url and sourceURL properties to BPackageInfo

Also extend the parser to accept "url" and "source-url" attributes.

1338e7b6 27-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

c53e9146 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

2df54411 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove "copyright" and "license" keywords

There's "copyrights" and "licenses" which can be used.

53da7df2 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Small cleanup

c719d465 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support for reading compatible version attribute

9e93bb4b 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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".

dd2ab027 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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>".

622ca02b 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add package attribute for compatible version

4438ef7a 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageResolvable: Add compatibleVersion property

8730aba2 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Coding style: Fix indentation

8f314372 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

7ea4dbce 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Hard code "Public Domain" as acceptable license

0f15206a 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ParseStrings(): Avoid new[0]

fab5eddc 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Split package kit DataReader.cpp

Pull AttributeDataReader and FDDataReader implementations out of
DataReader.cpp into own source files. Thus we can avoid dependencies
(e.g. to fs_attr code) we don't need/want.

caa4217e 17-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl: Build platform symlink issues

On a non-Haiku build platform map openat(), fstat(), and
FileDescriptorCloser to _kern_open(), _kern_read_stat(), and
BuildFileDescriptorCloser respectively, so symlinks can be opened and
stat()ed.

7162cff6 17-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

<build>package: attribute iteration, license dir

PackageWriterImpl:
* Iterate through attributes using fs_read_attr_dir() instead of
readdir(). Makes it work correctly on the build platform.
* On the build platform look up the system licenses in their source
directory rather than based on find_directory().

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

Fixed host build issues/warnings

323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.

8c29f587 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BPackageRoster::GetActivePackages()

The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.

10b8f702 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add class BPackageInfoContentHandler

A BPackageContentHandler subclass that initializes a BPackageInfo from
the read package attributes. Pulled out of RepositoryWriterImpl's
PackageContentHandler.

db9a50a2 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Pull class BPackageInfoSet out of BRepositoryCache

f195cdc8 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed left-over code

2021c984 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use BStringList in package kit

Replace all instances of BObjectList<BString> by BStringList.

10e1bc52 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BRepositoryCache: Add iteration, etc.

* Remove InitCheck() and the initializing constructor.
* Rename PackageCount() to CountPackages().
* Use BOpenHashTable instead of HashMap for the internal PackageMap.
* Allow multiple packages with the same name. Equally named packages are
in a singly linked list after the first package with that name.
* Add an Iterator inner class and a GetIterator() method, so one can now
iterate through the packages in the repository.

abf1023d 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Handle the newer package attributes

This unbreaks reading repository cache files using the respective
attributes.

5bc69520 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add error output in case of invalid compression ID

c7107206 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

GetRepositoryCache/Config(): return valid entry

Always create the common repository cache/config paths so the BEntry
that is returned is valid at least. Fixes BRefreshRepositoryRequest
failing when the common repository cache path didn't exist yet.

c3057c3f 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Initialize BRepositoryInfo::fInitStatus

30ab1339 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Handle the newer package attributes

437651ff 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Force package names and versions to lower case

f19957b8 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add a package info "install-path" attribute

The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.

d7227dfa 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageWriter: Add SetCheckLicenses()

The default is still "true", but now it is possible to disable the
license check.

718fba99 03-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl::_AddEntry(): Fix update logic

* Don't only look up the entry attribute when the entry is implicit.
Look it up, when it is a directory instead. This aligns it the logic
with _UpdateCheckEntryCollisions().
* When the entry attribute exits and the entry is not implicit, add file
attributes, but not stat data. This also aligns the logic with
_UpdateCheckEntryCollisions(), which removes colliding attributes, but
keeps stat data.

3095cb1b 03-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove copy'n'paste left-over

f79277d0 03-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix "package add" heap compacting

PackageWriterImpl::_CompactHeap(): Incorrectly used fHeapEnd instead of
the heap size. So the last copied chunk was too large.

cc3f28c0 03-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl::_MoveHeapChunk(): better output

6f785748 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Write uncompressed package file TOC, if necessary

327b38d6 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add support for adding/updating package entries

Add flags parameter to BPackageWriter::Init() (and the private
implementation classes) to indicate that an existing package file shall
be updated instead of created. Currently that always happens in-place.

7b6bcdb1 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Write uncompressed package attributes if necessary

When compression doesn't save space, using it nonetheless results in a
file that the reader complains about. So we fall back to writing an
uncompressed package attributes section in such a case.

The same still needs to be done for the TOC section.

04258e47 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use fHeapOffset instead of sizeof(hpkg_header)

abbeb15a 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Move RegisterPackageInfo() to Finish()

97aabbed 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BLowLevelPackageContentHandler section hooks

* Add hooks HandleSectionStart() and HandleSectionEnd(). They are
invoked to bracket package file section, so the handler can
discriminate which section the attributes belong to.
HandleSectionStart() features a return parameter _handleSection, which
allows to handler to pick which sections it wants to handle.
* "package dump" does now print the section names.

ffa2b210 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl::_AddEntry(): Improve output

Print the relative path instead of only the leaf name.

82af91fb 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

SubPathAdder: Check for overflows, omit initial /

697b9545 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BLowLevelPackageContentHandler interface extension

HandleAttributeDone(): Add parentToken parameter.

285f4a32 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove debug output

4512e8d5 30-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

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

BPackageInfo::ReadFromConfigFile() BFile& version

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

Remove the build platform work-arounds

116852fe 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support package info [source] URL attributes

28268808 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Change source URL package info attribute name

Use "-" instead of "_".

d4701a29 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

122597e0 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

8b684dd3 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add URL/source URL hpkg package attributes

ee453e8b 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add url and sourceURL properties to BPackageInfo

Also extend the parser to accept "url" and "source-url" attributes.

91698de9 27-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

78ceed51 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

acdcba84 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove "copyright" and "license" keywords

There's "copyrights" and "licenses" which can be used.

ba1bc0a4 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Small cleanup

ee9c9351 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support for reading compatible version attribute

b2709d8a 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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".

2db69df1 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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>".

22e1ec0e 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add package attribute for compatible version

c2f56ca0 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageResolvable: Add compatibleVersion property

b85a2681 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Coding style: Fix indentation

ed6d59a9 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.

d00bcc16 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Hard code "Public Domain" as acceptable license

2ef572b8 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ParseStrings(): Avoid new[0]

9a8c1339 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Split package kit DataReader.cpp

Pull AttributeDataReader and FDDataReader implementations out of
DataReader.cpp into own source files. Thus we can avoid dependencies
(e.g. to fs_attr code) we don't need/want.

93211f33 17-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

PackageWriterImpl: Build platform symlink issues

On a non-Haiku build platform map openat(), fstat(), and
FileDescriptorCloser to _kern_open(), _kern_read_stat(), and
BuildFileDescriptorCloser respectively, so symlinks can be opened and
stat()ed.

e272fb5d 17-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

<build>package: attribute iteration, license dir

PackageWriterImpl:
* Iterate through attributes using fs_read_attr_dir() instead of
readdir(). Makes it work correctly on the build platform.
* On the build platform look up the system licenses in their source
directory rather than based on find_directory().

14c34be2 16-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed host build issues/warnings

3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn

f5644b8d 15-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* prefer HashSet and HashMap to respective std-classes where possible

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

c9acc4f8 15-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* implemented reading of package-infos in BRepositoryCache


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

2b6e6760 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

34d56c1b 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

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

* 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

36d702ec 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* read package attributes before reading the TOC, as that allows to
take action in the content-handler that depend on the values of
package attributes

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

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

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

Pulled reusable stuff from PackageReaderImpl into new class ReaderImplBase.

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

05b101b2 12-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup following up on r40466:
* remove commented methods no longer being used


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40471 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

129e6b94 10-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Disallow the use of 'any' as repository architecture

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

84d99772 10-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

4dcc5232 10-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

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

91ebce66 10-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Some cleanup, no functional change
* typedef base classes as 'inherited' and use that instead of the
explicit base class name
* remove superfluous scopes in case blocks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40420 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

8b94d2ff 08-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* add stubbed RepositoryWriter to build

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

d77c6cd2 08-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

4ee7d007 08-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup:
* PackageWriterImpl no longer accesses members of WriterImplBase
directly, but uses getters/setters instead
* package attribute registration has been moved from PackageWriterImpl
to WriterImplBase, as it will be used in the same manner by the
RepositoryWriter


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

f2022173 07-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

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

aaf05784 07-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

884a0b23 04-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* cage the somewhat ugly duality between TOC and package attributes
section access into the SectionInfo structure, of which
PackageReaderImpl now keeps two instances and a pointer to the
current of these two


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

fd9c0b33 04-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* added support for compressing the package attributes section to
PackageWriterImpl
* added my own copyright

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

ceb993ab 04-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

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

531d1912 04-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

68dc1eb6 01-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* implemented writing of package attributes to hpkg file

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

2f7778f3 01-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

cb16f695 01-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* fix incorrect positioning when parsing minor version string

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

7fd711ef 31-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

15a5c3f7 31-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* follow hint by Axel: drop FDCloser and use shared class
FileDescriptorCloser instead


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

95d84e41 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

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

3aeae97f 29-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

30222ff1 28-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

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

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

733c783d 25-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

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

7d7ed9bf 25-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

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

35edda8f 24-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

11a4ecfd 22-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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

500bb630 21-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* 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