Changes between Version 14 and Version 15 of Obsolete/MovedToTree/PackageManagement/OldIdeas


Ignore:
Timestamp:
Aug 20, 2009, 10:20:29 PM (15 years ago)
Author:
brecht
Comment:

more design issues

Legend:

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

    v14 v15  
    11[[PageOutline(2-3, Contents)]]
    22= Package Management Ideas =
    3 This page is a place to hash out ideas regarding Haiku's package management (and creation). The following is a draft specification for the package management system to be included in R1. It is based on (1), (2) and the discussion in (5).
     3This page is a place to hash out ideas regarding Haiku's package management (and creation). The following is a draft specification for the package management system to be included in R1. It is based on (1), (2) and the discussion in (5). The draft does not yet cover everything from (1), however.
    44
    55== Requirements ==
     
    77This section describes the intended user experience.
    88
     9=== HaikuBits ===
     10
     11HaikuBits is a complete directory of software for the Haiku platform. It is the one place a user needs when looking for Haiku software. While it does not host all software binaries, it does list 99.9% of all software available for Haiku.
     12
     13Software is classified into a number of categories. For each software, HaikuBits provides a short description, one or more screenshots, a link to the author's homepage and a download link. Additionally, a software's page has a community rating and important information such as security notices.
     14
    915=== Bundles ===
    1016
    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.
    12 
    13 Optionally, 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.
    14 
    15 When a bundle has been installed, shortcuts to the application appear in the Deskbar menu. Applications in the Deskbar menu are subdivided into a number of a predefined categories (games, graphics, internet, ...).
     17A [http://en.wikipedia.org/wiki/Application_Bundle bundle] is a single file that contains the binaries, data files and documentation. This makes software self-contained and easy to handle. An 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 which opens the bundle in Tracker just like a directory.
     18
     19Optionally, an '''application''' 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.
     20
     21'''Libaries''' can be installed the same way. The user normally does not have to install libraries manually, as the package manager will do so when it is needed, asking the user for permission.
     22
     23When an application bundle has been installed, shortcuts to the application appear in the Deskbar menu. This menu is subdivided into a number of a predefined categories (games, graphics, internet, ...) that match those on HaikuBits.
     24
     25'''Drivers''' ... ?
    1626
    1727{{{
     
    2434=== Management ===
    2535
    26 '''Uninstallation''' is performed by simply removing the bundle.
     36'''Uninstallation''' is performed by simply removing the bundle from {{{/boot/apps}}} or {{{/boot/home/<user>/apps}}}.
    2737
    2838A 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.
     
    3242=== Dependencies ===
    3343
    34 The user does not have to worry about dependencies. If a bundle depends on other bundles, the system should make sure they are fulfilled (on run). If a dependency is not fulfilled, the system will ask the user for confirmation and automatically install any required bundles.
     44The user does not have to worry about dependencies. If a bundle depends on other bundles, the package manager should make sure they are fulfilled (on run). If a dependency is not fulfilled, the system will ask the user for confirmation and automatically install any required bundles. This requires an internet connection.
     45
     46Alternatively, a user can download a '''fat bundle''' that includes the dependencies as well.
    3547
    3648=== Updates ===
    3749
    38 All '''installed''' software can be checked for new versions. For each of the installed applications, the changes with respect to the installed version can be displayed. Updates can be flagged as 'strongly recommended' when security problems are known. The user can select which applications he/she would like to update and have the system perform the updates.
     50All ''installed software'' can be checked for new versions. For each of the installed applications, the changes with respect to the installed version can be displayed. Updates are flagged as 'strongly recommended' when security problems are known. The user can select which applications he/she would like to update and have the system perform the updates.
     51
     52By default, the updater tool does not show libraries in order to keep the list of updates as short as possible and understandable by the non-technical user. Libaries should only be updated when there are known problems with them.
    3953
    4054== Implementation ==
     
    4458=== Bundles ===
    4559
    46 A bundle is a plain zip archive that contains:
     60A bundle is a compressed disk image that contains:
    4761 * application executable(s) & data
    4862 * metadata
     
    5064    * version
    5165    * (revision?)
    52     * (hash?)
     66    * hash (integrity-check)
    5367    * author
    5468    * homepage
     
    5973    * right-clicking bundle could offer the option of opening a help document about the application
    6074
    61 === Run from Anywhere ===
    62 
    63 On 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.
    64 
    65 Another 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.
    66 
    67 Some ports will need to know the absolute path to their data. Methods to solve this:
    68  * pkgfs (3)
    69  * assignfs (4)
    70 
    71 With pkgfs, all ports are mounted under {{{/boot/common}}}.
    72 
    73 With assignfs, each port is mounted in its own directory: {{{/boot/apps/<port>-<version>-<revision>}}}
     75There are a number of different bundle types:
     76 * application
     77 * library
     78 * driver
     79 * font
     80 * ...
     81
     82Library, driver and font bundles have to be installed.
     83
     84=== Install or not? ===
     85
     86As bundles have to be compressed for distribution, they will need to be uncompressed at some point. There are two options:
     87 * Before using a bundle, it is decompressed. This is very similar to installing, which many wanted to avoid.
     88 * The bundle's contents are decompressed on access. This is less efficient as decompression needs to be performed on each access, as opposed to only one time during installation. Performance of large applications and heavy games in particular will suffer.
     89
     90It is possible to split application bundles into two sub-types; those that have to be installed, and those that can be run as-is.
     91
     92{{{
     93#!div style="background-color: #EEEEEE; border: 1px solid; margin: 20pt; padding: 5pt;"
     94'''brecht''': While I initially liked the idea of not having to install software, I now feel that it is not suited for all types of applications and games. While we can make a differentiate between 'large' and 'small' applications and require installation of large apps (or suffer from poor performance), this feels like a bit of a kludge. Is is really that bad to 'install' software once? Installing can be reduced to decompressing and should not bother the user much. If the user knows he has to install '''all''' bundles, there can be no confusion.
     95}}}
     96
     97== File System Organisation ===
     98
     99Native Haiku applications are contained in their own directory as before. Organization of ports is more complicated.
     100
     101=== Merged ===
     102
     103By means of a union pkgfs (3). All ports are mounted under {{{/boot/common}}}.
     104
     105It is not clear how multiple versions of libraries and applications can be handled in this scheme.
     106
     107=== Self-contained ===
     108
     109By means of assignfs (4). Each port receives its own unique assign: {{{/boot/apps/<port>-<version>-<revision>}}}
    74110
    75111{{{
     
    77113'''axeld''': I think the best solution would be a unionfs approach: the package file system would just blend in the packages where needed. User packages would be merged with the contents of config/, while system wide ones would be merged with the contents of /boot/common/.
    78114}}}
     115
     116
     117=== Settings ===
     118
     119global settings/user settings
     120
     121==== Multiple Application Version ====
     122
     123how to handle
    79124
    80125=== Dependency Hell ===