HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog
wiki:HaikuPorterForPM/Repository

Context Navigation

  • ← Previous Version
  • View Latest Version
  • Next Version →


Version 3 (modified by zooey, 2 years ago) (diff)

--

Repository

The main purpose of HaikuPorter is to build a concrete set of packages (i.e. using specific port versions) in a controlled environment, such that the building process is repeatable. The concrete set of package versions and their resulting packages corresponds to the online package repository from which users can download packages.

To implement the concept of a package repository, HaikuPorter makes use of two specific folders in the ports tree.

The repository Folder

As build recipe files may exist for many different versions of a port, the active version(s) need to be selected from them. As this is a somewhat expensive process, HaikuPorter caches the set of package versions that are to-be-built in a particular ports tree in the repository-folder of that ports tree.

This is done in the following way: Whenever HaikuPorter starts and doesn't find the repository-folder, it will collect all existing build recipe files and, for each port, sort the build recipes by version and then, working its way down from the highest version to the lowest, try to parse the build recipe. When HaikuPorter finds a parsable build recipe that has been marked as stable on the current architecture, the version of the port described by this recipe will be noted as the active one and HaikuPorter will continue with the next port. When all ports have been handled, HaikuPorter will put  .PackageInfo-files into the repository-folder, representing the set of to-be-build packages of the ports tree. Only these package versions will be built by default (see below) and only this set of active package-infos will be considered during dependency resolution.

When HaikuPorter is started with an existing repository-folder, it will look for any changed, new or missing build recipes and adjust the repository accordingly. Whenever you change the architecture or just want to start afresh, you can safely remove the repository-folder and HaikuPorter will recreate it from the current set of build recipe files.

Note
Currently, HaikuPorter only supports a single active version of a port, but that is likely to be changed in the future).

The packages Folder

Built packages are being collected into the packages-folder of the ports tree. The packages in this folder are meant to be uploaded into the corresponding package repository (from where packages will be downloaded by the user). Because of that, it is important that the set of packages in the repository folder is consistent with respect to declaration of provides, requires, conflicts, etc. This does not have to be the case when you are working on new recipes, but it should be the case again, before you push your changes.

Packages for non-active versions of a port can be built, but only if their dependencies can be resolved by the other package versions currently available in the repository-folder. If that is not the case and you really need to build a specific version of a package, you can do so by using git to checkout a revision of the ports tree where that particular package version was the active one.

Note
HaikuPorter will put the packages resulting from builds of non-repository versions of a port into the .obsolete-subfolder of the packages-directory. This is just a safety measure to avoid non-active packages confusing the dependecy resolution mechanism..

Download in other formats:

  • Plain Text

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/