Commit Graph

46476 Commits

Author SHA1 Message Date
Oliver Tappe
c915f7bafa Fix haiku_cross_devel package(s).
* those packages need to be installed on any system that wants to build
  for the respective target architecture, so they need to have the
  package architecture 'any'
* adjust to not require 'haiku', as that isn't needed and wouldn't be
  available either
* use concatenation by macro to inject the target architecture into the
  provides definition
2013-06-04 17:16:01 +02:00
Oliver Tappe
eeddc9fd26 Fix paths in haiku_cross_devel packages.
* since this is now meant to be installed into an architecture-specific
  (sysroot-)folder, we need to drop the architecture-specific subpaths
2013-06-04 14:25:34 +02:00
Oliver Tappe
02783d54bd Add new package haiku_cross_devel_wrapper.
* this package wraps the haiku_cross_devel package (i.e. it contains
  that package in /develop/cross)
* the wrapper package is meant to be installed into the system 
  hierarchy, from where haikuporter will fetch the contained package
  when needed
2013-06-04 00:27:00 +02:00
Oliver Tappe
59e2e2f3a7 Adjust handling of package infos.
* add HAIKU_PACKAGING_ARCH, which is set to the target packaging 
  architecture
* introduce support for generic package infos, which are package infos
  that are the same for all architectures, except for the declaration
  of the package architecture itself
* move package info files underneath architecture-specific or generic
  folder
2013-06-04 00:24:37 +02:00
Ingo Weinhold
6c36ad168e Installer: Restrict entry filter to files from the BFS volume
We generally want to skip the contents of the packagefs volumes (save
for the shine-through directories). That makes Installer usable again.
In what direction we want to develop it (e.g. integrate some PM support,
so that a subset of packages can be selected) needs further discussion.
2013-06-02 19:11:39 +02:00
Ingo Weinhold
f4953ba541 Installer: WorkerThread::EntryFilter: Use path map
... instead of implicit comparisons.
2013-06-02 16:30:58 +02:00
Ingo Weinhold
ba6f7c8c42 Installer: CopyEngine: Pass relative path to EntryFilter
... instead of the file name.
2013-06-02 16:16:45 +02:00
Ingo Weinhold
348d9eac3b Installer: WorkerThread: Remove InstallerWindow dependency
* Move message constants to InstallerDefs.h.
* Determine the source and target partition ID already in
  InstallerWindow and pass those to WorkerThread instead of fiddling
  with menu items in _PerformInstall(). And instead of the window object
  pass a messenger to the constructor.
2013-06-02 15:44:35 +02:00
Ingo Weinhold
e8eb6ae212 Installer: WorkerThread::_PerformInstall(): get rid of goto 2013-06-02 15:22:20 +02:00
Ingo Weinhold
c2be967eb9 Installer: CopyEngine: Externalize decision making
* Add interface EntryFilter, an instance of which can be passed to the
  CopyEngine. The object is asked whether to copy entries/clobber
  directories.
* Move the _ShouldCopyEntry()/_ShouldClobberFolder() code to new
  WorkerThread::EntryFilter.
2013-06-02 15:16:26 +02:00
Ingo Weinhold
a601eaa9e1 Installer: Remove "/boot/var" directory check
The PM Haiku Installer doesn't need support installing ancient Haiku
versions.
2013-06-02 14:43:02 +02:00
Ingo Weinhold
fb5f0bb1c7 Installer: Move path string constants to new InstallerDefs.h/cpp 2013-06-02 14:40:52 +02:00
Ingo Weinhold
28fd71c586 Installer: CopyEngine: Remove some debug/uncommented code 2013-06-01 22:18:53 +02:00
Ingo Weinhold
b23d504796 packagefs: UnpackingAttributeCookie: Open package
... when reading non-inline attribute data. Generally the package should
already have been opened by the PackageNode owning the attribute (in
InitVFS()), but that isn't the case for queries, which can read
attributes from entirely unsuspecting nodes.

Together with the QueryParser fix that should fix queries involving
non-indexed attributes.
2013-06-01 04:04:25 +02:00
Ingo Weinhold
10e9f49914 QueryParser: Equation::Match(): Fix generic attribute case
Init size to the buffer size before passing it to
QueryPolicy::NodeGetAttribute(). Since size was 0 by default, we would
only read 0 length data.
2013-06-01 03:58:11 +02:00
Ingo Weinhold
d055934e36 QueryParser: Fix some debug macros 2013-06-01 02:40:08 +02:00
Ingo Weinhold
118028674c Fix reading attributes of directories
When reading an attribute of a directory there was no guarantee that the
underlying package would be open. When it wasn't reading an attribute
would fail, unless the attribute data were already cached. The reasons
for this are:
* UnpackingDirectory didn't forward the {Init,Uninit}VFS() calls to the
  underlying PackageDirectory.
* Only PackageFile was actually opening the package in InitVFS().

Now we forward the {Init,Uninit}VFS() calls in all cases -- even in
{Add,Remove}PackageNode(), when the active package node changes -- and
opening/closing the package is now done in
PackageNode::{Init,Uninit}VFS().
2013-06-01 00:32:07 +02:00
Ingo Weinhold
fa962e6008 build_haiku_package: Print some progress info
Remove the output in extractFile(), though. The extracted packages are
so small that it doesn't matter anymore.
2013-06-01 00:32:07 +02:00
Ingo Weinhold
ba96552b6a Support extracting archives to the packages we build
* BuildHaikuPackage rule: Create the script that contains the extraction
  commands.
* build_haiku_package: Add extractFile() function (stripped down version
  from build_haiku_image).

In build_haiku_image the functionality was mainly used to extract the
optional packages, which is no longer done. We still need it e.g. for
the Wifi firmware packages that want to be extracted.
2013-06-01 00:32:07 +02:00
Ingo Weinhold
7b2016c8af Update libsolv package 2013-05-30 23:51:30 +02:00
Oliver Tappe
7ea6bb1305 Add c++-libs to haiku_cross_devel.hpkg 2013-05-30 00:22:06 +02:00
Oliver Tappe
30c2352188 Adjust buildscript for gcc4 to configure with a sysroot. 2013-05-30 00:22:06 +02:00
Ingo Weinhold
e63bdfec75 Rename post_install dir to post-install 2013-05-29 02:24:54 +02:00
Ingo Weinhold
b361d03f93 haiku.hpkg package info: zlib is a separate package 2013-05-28 03:30:49 +02:00
Ingo Weinhold
56b43eca03 BPackageInfoContentHandler: Handle new attributes
Also add respective *Data constructors to BUser, BUserSettingsFileInfo,
and BGlobalSettingsFileInfo.
2013-05-28 02:44:13 +02:00
Ingo Weinhold
badd403c5e Update grep package 2013-05-27 04:27:26 +02:00
Ingo Weinhold
75c10de291 libroot_build _kern_read_dir(): reset errno before readdir()
Since we're checking errno when readdir() didn't return an entry, we
need to reset it before, or we might see a spurious error value.
2013-05-27 01:05:58 +02:00
Matt Madia
a196160c9a On FreeBSD, "<malloc.h> has been replaced by <stdlib.h>" 2013-05-25 19:41:18 +02:00
Ingo Weinhold
3da422ad05 libroot_build: Fix issues with attribute FD for symlink
AttributeDescriptor: Don't use dup() directly. Check, if the given FD is
one we track and clone it respectively. This allows use with symlink FDs
which we have to fake on Linux (since symlinks cannot be opened). Fixes
extraction of packages containing symlinks with attributes.
2013-05-25 02:38:52 +02:00
Ingo Weinhold
e2f30519ab hpkg format: user big endian for chunk sizes 2013-05-25 01:55:36 +02:00
Ingo Weinhold
a98dd49a6b package info parser: allow escaping of new lines
So we can break long lines without changing the semantics.
2013-05-25 01:12:38 +02:00
Ingo Weinhold
38a0419a72 package info parser: improve parse error column numbers
Assume 4 column tab stops and compute the column numbers accordingly.
2013-05-25 01:12:38 +02:00
Ingo Weinhold
a3e070a7ff WriterImplBase: Add _AddStringAttributeList()
... and simplify some code by using it.
2013-05-25 01:12:38 +02:00
Ingo Weinhold
a11b0003ec packagefs: CachingPackageReader: Don't delete cached heap reader
... in destructor. After we create it, it belongs to the super class and
is destroyed by it.
2013-05-25 01:12:38 +02:00
Ingo Weinhold
c0ab140961 hpkg format: Add attribute for declaring post install scripts 2013-05-25 01:12:37 +02:00
Ingo Weinhold
927e070869 WriterImplBase: Some simplifications
... using the recently introduced _AddStringAttribute[IfNotEmpty]().
2013-05-25 01:12:37 +02:00
Ingo Weinhold
0f4e11e75c hpkg format: Add attributes for declaring users and groups 2013-05-25 01:12:37 +02:00
Ingo Weinhold
c82776b2fa BString: Add Split() 2013-05-25 01:12:36 +02:00
Ingo Weinhold
8698ee4521 BStringList: Declare Join() const 2013-05-25 01:12:36 +02:00
Ingo Weinhold
bf88057b26 ReaderImplBase: Fix copy and paste oversight 2013-05-25 01:12:36 +02:00
Ingo Weinhold
daa10fc3a5 Move package info string builder to its own header 2013-05-25 01:12:36 +02:00
Ingo Weinhold
6da0ce6ff2 Move package info parser to its own file 2013-05-25 01:12:35 +02:00
Ingo Weinhold
79d5ddb77b 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.
2013-05-25 01:12:35 +02:00
Ingo Weinhold
a8de2761c7 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.
2013-05-25 01:12:35 +02:00
Ingo Weinhold
fe707a23fc 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.
2013-05-25 01:12:34 +02:00
Ingo Weinhold
5497f08e5e hpkg attribute tags: use 7 bits for attribute ID
ATM the 6 bits suffice, but there isn't that much headroom.
2013-05-25 01:12:34 +02:00
Ingo Weinhold
4ffb923413 PackageFileHeapWriter::RemoveDataRanges(): Fix empty heap check 2013-05-25 01:12:34 +02:00
Ingo Weinhold
bac0bb2e8f RepositoryWriterImpl: Write the heap fields in the header 2013-05-25 01:12:34 +02:00
Ingo Weinhold
47039b852e 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.
2013-05-25 01:12:33 +02:00
Ingo Weinhold
5dae1541d6 Add "source" package architecture 2013-05-25 01:12:33 +02:00