OGPM - Package Directories and Repositories

Package directories and repositories are used to locate and provide packges. For example, when installing a package a dependent package is often needed. A package directory on the Internet could be queried for the URL of the package. The package could then be downloaded and installed. A package repository would be similar to a directory, except that the packages would also be hosted by the directory.

Package Directory Database

The package directory database is simply a text file (.\project\OGAB\_db\directories.txt). It should have one package directory URL per line. The package directories should be searched in the order that they are located in the database; however the local repository (.\project\OGPM\_repository) is always checked first, for a package that was, perhaps, previously installed.

Directory Server

A package directory server might be use cgi query based protocol. For example, the command:

http://OpenG.org/pkg-directory.cgi?pkg=ogtkstring-2.3-1

will return a web page that is formatted to include information about the package and its location. For example

<html>
<head>
<title>ogtkstring-2.3-1 info</title>
</head>
<body>
package: ogtkstring-2.3-1
URL: http://www.openg.org/repository/ogtkstring-2.3-1.lvi
</body>
</html>

This would be programatically parsed and the package would be downloaded from its location on the web.

Mirror Sites

The OpenG.org package directory and repository should be mirrored, so that, in the event or a server failure, the service will remain up. The local directory database should contian a list of OpenG.org directory/repository mirrors.

Local Repositories

A local repository is merely a directory that contains packages. The packages are all named and therefore a listing of a local repository directories contents will provide a listing of the available packages.