Changes between Version 3 and Version 4 of Obsolete/MovedToTree/PackageManagement/OldIdeas


Ignore:
Timestamp:
Aug 4, 2009, 10:24:13 PM (15 years ago)
Author:
brecht
Comment:

first draft: requirements and implementation

Legend:

Unmodified
Added
Removed
Modified
  • Obsolete/MovedToTree/PackageManagement/OldIdeas

    v3 v4  
    99=== Bundles ===
    1010
    11 There seems to be a general preference for a [http://en.wikipedia.org/wiki/Application_Bundle bundles-based] approach. Such a bundle is a single file that contains the application. This makes self-contained and easy to handle. The application can be run by double-clicking the bundle icon. Obvious exceptions to this rule are drivers and libraries. These have to be installed to be of any use. The contents of a bundle can be inspected by opening the bundle by means of a context-menu option.
     11There seems to be a general preference for a [http://en.wikipedia.org/wiki/Application_Bundle bundles]-based approach. Such a bundle is a single file that contains the application. This makes self-contained and easy to handle. The application can be run by double-clicking the bundle icon. Obvious exceptions to this rule are drivers and libraries. These have to be installed to be of any use. The contents of a bundle can be inspected by opening the bundle by means of a context-menu option.
    1212
    1313Optionally, a bundle can be '''installed''' by moving it to {{{/boot/apps}}} (system-wide) or in {{{/boot/home/<user>/apps}}} (user-local). Another option is to right-click the icon and select "install for everyone" (only admins) or "install only for me". Any initial configuration (accepting a license) can be performed the first time a bundle is being run.
     
    1717{{{
    1818#!div style="background-color: #EEEEEE; border: 1px solid; margin: 20pt; padding: 5pt;"
    19 Large games might prove to be problematic with the don't-have-to-install policy. The bundles should at least be copied to a hard drive in order to run smooth.
    20 
    2119'''brecht''': I don't like Waldemar's idea of having bundles spread all around the filesystem, hence the clear distinction between installed and non-installed bundles. This might be a necessity for multi-user too.
    2220}}}
     
    2826A user's application '''settings''' are kept when a bundle is uninstalled or deleted. The system however provides a comprehensive listing of applications for which user settings exist. The user can choose to delete settings for each of the bundles.
    2927
    30 Application folders ({{{/boot/apps}}} and {{{/boot/home/<user>/apps}}}) display the list of installed bundles including information (description, availability of updates, security risk warning), just like the mail folder in BeOS displays mails.
     28Application folders ({{{/boot/apps}}} and {{{/boot/home/<user>/apps}}}) display the list of installed bundles including information (description, availability of updates, security risk warning), just like the mail folder in BeOS displays emails.
    3129
    3230=== Dependencies ===
     
    4442=== Bundles ===
    4543
    46 On Haiku, a bundle will be a plain zip archive that contains:
    47  * application executable & data
     44A bundle is a plain zip archive that contains:
     45 * application executable(s) & data
    4846 * metadata
    4947    * name
     
    5957    * right-clicking bundle could offer the option of opening a help document about the application
    6058
    61 === Dependency Handling ===
     59=== Run from Anywhere ===
    6260
    63     * dependencies
    64        * minimum/maximum version
    65        * preferred version/revision
    66        * build options (USE flags)
    67        * online feedback by users
    68     * recipe?
    69           o no shell commands (security)
     61On running a bundle, the archive's contents have to be accessed somehow. Either they can be extracted to a directory hidden from the user. While this can work well for smaller applications, larger applications (think commerial games) will occupy almost twice the size.
    7062
     63Another option is to read the individual contents from the zip archive as they are needed. Even if this is technically feasible, performance will suffer, especially if bundles are compressed heavily.
     64
     65Some ports will need to know the absolute path to their data. Methods to solve this:
     66 * pkgfs (3)
     67 * assignfs (4)
     68
     69With pkgfs, all ports are mounted under {{{/boot/common}}}.
     70
     71With assignfs, each port is mounted in its own directory: {{{/boot/apps/<port>-<version>-<revision>}}}
     72
     73=== Dependency Hell ===
     74
     75[http://en.wikipedia.org/wiki/Dependency_hell Dependency hell] is a problem mostly for ports. That does not mean it can be ignored. At least in the early years of Haiku, ports will be an important source of software.
     76
     77==== Avoiding ====
     78
     79Bundles are always fat bundles. All required libraries are included in the bundle. Problem solved! But, it feels like quitting. :)
     80
     81==== Tackling ====
     82
     83In order to solve conflicting dependencies, it is necessary to be able to have multiple versions of a library installed. Even worse, some libraries can be built with different options.
     84
     85To make this work, it is obvious that a central bundle repository is required: HaikuBits. Alongside offering a browsable directory of software like BeBits, it stores information about dependencies. Dependency information (problems arising from certain combinations of bundles) is updated by the community.
     86
     87An example. When ABC-1.0 is released, its dependency libfoo is at version 1.2.10. Bundle ABC-1.0 specifies "libfoo >= 1.2.10" as a dependency. Later, when libfoo 1.2.12 is released, it appears that this breaks ABC-1.0. HaikuBits is updated to indicate this: "libfoo >= 1.2.10 && != 1.2.12". When ABC-1.0 is now downloaded from HaikuBits, the bundle contains the updated information. A software updating tool can also check HaikuBits to see whether dependencies are still OK.
     88
     89Because the act of porting can introduce additional incompatibilities, each port should be tagged with a revision number to uniquely identify it. Revisions can also be used to differentiate between ports with different build options. Specifying build options in the dependency information seems overkill anyway, as we should strive to have as few port revisions as possible (developers should have dependencies installed as bundles before porting).
     90
     91The bundle metadata needs to be extended to include information about the dependencies:
     92 * minimum/maximum version
     93 * preferred version/revision
     94 * non-working versions/revisions
     95
     96While bundles will not be available for download for retail software, it still makes sense to record dependency information about it on HaikuBits.
     97
     98Having an application use a particular library version can be done by manipulating LD_LIBRARY_PATH or by virtually placing the library in the applications directory by means of assignfs or pkgfs.
    7199
    72100=== libalpm ===