Commit Graph

6293 Commits

Author SHA1 Message Date
Jérôme Duval 245df7abd3 added exFAT partition type
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 20:30:00 +00:00
Oliver Tappe 0d68f6afb3 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
2011-02-09 19:11:23 +00:00
Clemens Zeidler 1af4fa4ba6 Major restructuring of the mail server:
Accounts are now stored in a separate file. Previously they where somehow magically assembled from the chain ids. Now its possible to remove a account temporary by removing the account file form the account folder.

Each account could have an inbound protocol, an outbound protocol and some filters.

Mails are now associated with an account and not with a chain. This required to replace the chain id attribute by an account attribute.

Replace BMailFilter and BMailChain by a less general approach. Basically the chain had a list of filters and call the ProcessMailMessage for each filter. This made it sometime difficult to understand what is going on, e.g. sometimes a filter used information gathered by another filters. The new MailProtocol and MailFilter classes are calling more dedicated hook functions, e.g. HeaderFetched or MessageReadyToSend.

As before all MailProtocol's (plus their filters) are running in their own thread.

Cleaned up the error and status window a bit. Abstracted the interface to these windows. Should be easy to write a BNotification api back-end now.

Parsing of mail headers is much faster now. Fetching the headers of a large mailbox takes ~min and not ~hour now! Initial checkout time is in the same order like Opera. The problem was the massive use of fgets in parse_header (mail_util.cpp) now the complete header is read in one go. Furthermore, only interesting fields are extracted.

Remove some unused files, BeOS relicts... Feel free to translate the mail server and remove the own language system (headers/private/mail/MDRLanguage.h).

Sorry for the remaining old (and new) coding style issues, sometime just ignore them, to many :(



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 01:49:01 +00:00
Oliver Tappe 8b94d2ff6a * add stubbed RepositoryWriter to build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 20:15:50 +00:00
Oliver Tappe d77c6cd26a * 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
2011-02-08 19:50:36 +00:00
Oliver Tappe 79f15e1918 * minor cleanup: respect 80 chars limit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 15:19:26 +00:00
Oliver Tappe 4ee7d007d6 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
2011-02-08 10:59:38 +00:00
Clemens Zeidler 8286779101 Make kp_solve interface work again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 09:01:11 +00:00
Oliver Tappe f202217364 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
2011-02-07 22:25:16 +00:00
Stephan Aßmus 2b52661315 Added another GetInfo() variant with which one can retrieve the count and
fixed size flag at once. Not sure if this can be merged into one of the
existing GetInfo() variants without breaking binary compatibility.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-07 20:10:14 +00:00
Oliver Tappe aaf05784d4 * 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
2011-02-07 13:04:00 +00:00
Oliver Tappe 884a0b23cb * 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
2011-02-04 22:42:56 +00:00
Oliver Tappe fd9c0b3361 * 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
2011-02-04 22:40:10 +00:00
Oliver Tappe ceb993ab40 * 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
2011-02-04 17:53:54 +00:00
Oliver Tappe 6f0278cdc9 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
2011-02-04 17:43:07 +00:00
Oliver Tappe 531d191219 * 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
2011-02-04 17:34:19 +00:00
Oliver Tappe 68dc1eb6ad * implemented writing of package attributes to hpkg file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-01 22:01:44 +00:00
Oliver Tappe 2f7778f375 * 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
2011-02-01 22:01:17 +00:00
Oliver Tappe bc1bd8bac0 * updated copyright section for NaturalCompare according to commit
logs (the OpenTracker license doesn't apply since NaturalCompare
  was never part of OpenTracker).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-01 11:25:36 +00:00
Oliver Tappe 7fd711ef99 * 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
2011-01-31 15:43:33 +00:00
Oliver Tappe 15a5c3f7d9 * 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
2011-01-31 09:40:37 +00:00
Oliver Tappe ae53f5526b Fixed an oversight of yesterday's restructuring:
* FDCloser is private, so it should live in BPackageKit::BHPKG::BPrivate
* adjusted 'package' binary to no longer use FDCloser (trivial)
* minor cleanup in command_extract.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-31 08:50:37 +00:00
Oliver Tappe 95d84e4176 * 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
2011-01-30 15:15:33 +00:00
Oliver Tappe 5fb1c6ff1f 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
2011-01-30 15:05:38 +00:00
Brecht Machiels 2f4d9fdbab * added support for the Atom IGD, based on the X driver sources (fixes #6202)
* fixes G4x PLL limits


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-29 21:20:00 +00:00
Oliver Tappe 3aeae97f65 * 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
2011-01-29 17:59:58 +00:00
Oliver Tappe 30222ff141 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
2011-01-28 23:36:08 +00:00
Oliver Tappe 9daff3323b * moved NaturalCompare() from libtracker.so to libshared.a, in order
to make it available elsewhere


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-28 11:05:26 +00:00
Ryan Leavengood 91f0846f8a Add a default right click context menu to BTextView.
This fixes #7022 and is mostly based on the patch attached to that ticket, with
these changes:
- The patch was adding this to the private _TextInput_ class, not BTextView.
- The patch had a Clear menu item too. I removed that due to the different
semantics between Clear in a BTextView and in a TextInput. The former just
clears the selection where the latter clears the whole view.

We could later add a virtual callback for adding menu items to this context
menu which could be used to add Clear with the two semantics in each class
(this is mainly needed for the enabling logic...each class could handle a clear
message in its own way.) This callback could also obviously be used for other
things, like a spell-check menu or whatever an application would want to add.
Since BTextView has 10 free virtual slots it seems reasonable to add.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-28 05:09:52 +00:00
Oliver Tappe 0d6b3b20e1 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
2011-01-27 23:17:03 +00:00
Clemens Zeidler a0ad88e002 Fix min/ max calculation by removing all soft constraints before doing so. Smaller fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-26 22:06:02 +00:00
Oliver Tappe 733c783dc9 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
2011-01-25 19:36:09 +00:00
Oliver Tappe 7d7ed9bf4b 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
2011-01-25 17:07:27 +00:00
Clemens Zeidler 7583db5a1e Add an alternative solver to lp_solve. The solver based on Ingo's active set solver but is able to handle arbitrary hard and soft constraints. The advantage to lp_solve is that the active set solver can optimize variable in respect to a quadratic objective function. This makes it possible to minimise the quadratic derivation to a desired value e.g. \Sum_i(x_i - x_{i,pref})^2 -> min.
The solver part has been refactored in this way that both solver can be used with the same layout specifications. The active set solver is default now; the performance is not as good as lp_solve, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-25 04:59:40 +00:00
Oliver Tappe 35edda8f0b * 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
2011-01-24 20:48:03 +00:00
Oliver Tappe 77a8a5cce3 * added B_COMMON_CACHE_DIRECTORY to find_directory()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-24 20:42:48 +00:00
Oliver Tappe 11a4ecfd82 * 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
2011-01-22 19:30:21 +00:00
Oliver Tappe 500bb6305c * 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
2011-01-21 22:18:58 +00:00
Oliver Tappe 8e407ca0e8 * err, 40255 was missing the essential part, actually
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-20 20:55:45 +00:00
Oliver Tappe 84f05bd08b * fix build problem on Haiku hosts caused by recent move of
ObjectList.h into public header space


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40255 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-20 18:52:21 +00:00
Oliver Tappe 915a7b8c24 Make BObjectList<> publically available:
* cleaned up ObjectList.h
* switched several uses of new() to new(std::nothrow)
* moved ugly AsBList() hack into BObjectList<>::Private class and
  adjusted all callers accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-20 12:09:16 +00:00
Oliver Tappe 137c5fe2ba * add implementation of bindfs, which can be used to bind-mount
a folder to some other place in the filesystem hierarchy
* add helper function to VFS that encapsulates the "conversion" of a
  vnode-pointer to a fs_vnode-pointer (used by bindfs)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-16 16:33:11 +00:00
Axel Dörfler 51d7642503 * Added a new B_GET_DEVICE_NAME ioctl - this should be implemented by all
drivers in the future, such that NetworkStatus and similar software can show
  nice names for the devices. The device manager should implement this and
  return the B_DEVICE_PRETTY_NAME of the device (and in turn, new style drivers
  should actually set this).
* Implemented handling of this ioctl in the scsi_periph to return the vendor/
  product strings.
* Implemented this in the ATA bus manager to return the model from the info
  block.
* KDiskDevice now fills in the partition_data::name if the B_GET_DEVICE_NAME
  succeeds.
* As a side effect, at least BootManager now shows the drive name; maybe
  DriveSetup does as well for the raw device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-13 19:41:01 +00:00
François Revol 8dfd99a91c Build fix for r40196. Should now be back to previous state (breaks at vm stuff).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-13 12:29:15 +00:00
Philippe Houdoin 67938b0d59 Switched boot splash compression to use boot_zlib (which was already
used by tarfs anyway) instead of RLE.
While this should allows larger logo/icons, it doesn't remove the
current 300000 bytes size limits for haiku_loader, so #6710 is not yet fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-12 15:43:14 +00:00
Ingo Weinhold 4535495d80 Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
  respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
  private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-10 21:54:38 +00:00
Axel Dörfler 24a77ea0be * Added ItemAt() method that accepts column and row.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-08 16:14:13 +00:00
Jérôme Duval bee827e203 changed dirfd() to its POSIX signature, without const (see #4947).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-06 21:34:06 +00:00
Jérôme Duval 23281fb2c1 Moved Easter holidays methods to a Holiday class, an hopefully better place.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-05 18:00:31 +00:00
Jérôme Duval daf3c50529 * changed some methods to static as that's what they are in the end.
* added some methods to find out easter sunday, ascension and pentecost days.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-04 19:43:23 +00:00