Attached is a draft of a glep for formalizing multiple-repository support

This is far from ideal in many ways, but i'm too tired and I drank too much caffine to be sane.

Also, i have no clue how to use docutils so i just tried my best.
(** is my way of doing another level of bullets, please let me know how to properly do this)
Comments, objections, anything consructive is welcome.

Thanks,

Andrew Muraco

GLEP: XX
Title: Multiple Repository Support in Portage
Version: $Revision: 1.0 $
Author: Andrew Muraco <[EMAIL PROTECTED]>
Last-Modified: $Date: 2005/12/17 03:13:10 $
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 17-Dec-2005
Post-History: 17-Dec-2005

Abstract
========
To implement a functional and expandable method for Portage to support multiple 
repositories.

Motivation
==========
Multiple Repository support is needed, this GLEP is to address this need.

Specification
=============

Portage will make use of two (2) ways to address repositories:
*       A User-defined name, which is likely to be used as a convinance in most 
situations - this will be referred to as REPO_NAME in this GLEP
*       A hard-coded repository-id which will be found in the repository tree 
at: metadata/repo_id - this will be referred to as REPO_ID in this GLEP
Both names will contain no spaces, and only standard characters [TODO: 
references]

Repositories
------------

Each repository will contain:
*       the repo name in metadata/repo_id
*       repo information such as maintainer of the repo, notes on who hosts it, 
etc will be contained metadata/repo_info
*       unique packages.mask which will only apply to ebuilds within that 
specific repo.

The REPO_ID must match the name that will be used for rsync
Therefore, rsync://MyServer.tdl/REPO_ID/

/etc/portage/*
-------------

In order to provide users with the current set of options and extend them so 
they can be customized to each repository, the structure of /etc/portage will 
remain similar with these changes:
*       /etc/portage/REPO_NAME/* will be the location of repository-specific 
portage files.
*       /etc/portage/ will continue to function over all repos
** ex) =sys-devel/gcc-4 -* in /etc/portage/package.keywords would use the 
latest gcc-4 regardless of what tree it comes from.

The following new files will be added to /etc/portage:
*       /etc/portage/repositories.perfer - will contain each REPO_NAME in order 
of preferance, higher is more perfered. (Each REPO_NAME will be on a seperate 
line)
**      In the absence of this file portage should use repositories in 
alphabetical order.
*       /etc/portage/REPO_NAME/repository.id - contains the specific REPO_ID 
which REPO_NAME applies to.
*/etc/portage/REPO_NAME/repository.conf - will contain any repository-specific 
options, which can include, but is not limited to, FEATURES="" C[XX]FLAGS="".
**      This will also include a new variable; OPTIONS="" of which is similar 
to FEATURES, but modifies the way portage will handle that specific repository. 
A few examples of options which could be useful: 
***     EXCLUDESYNC - Prevents portage from doing a sync on this repo.
***     EXCLUDEUPDATE - Prevents portage from using ebuilds in this repo as 
updates for packages which currently reside in a different repo.
***     EXCLUSIVEUPDATE - forces any update to any package which is from this 
repository to a newer version which resides inside of this repo. 
***     et al.

All of the repository rsync URIs will be stored in /etc/make.conf
SYNC="rsync://myfavoriterepo.org/myportage \ 
rsync://rsync.namerica.gentoo.org/gentoo-portage" 

The Tree: /usr/portage -> /var/repositories/REPO_ID/
----------------------
The repository tree will need to be moved, each repository will have its own 
folder: /var/repositories/REPO_ID/.

For compatibility reasons, /usr/portage will be treated as 
/var/repositories/gentoo-portage


Ebuilds
-------

Ebuilds will now be able to have dependencies based on packages from specific 
repositories.

*       DEP Atoms now support the following format: 
=REPO_ID:SLOTNUM:CAT/EBUILD-X.Y.Z
**      Ex1) >=MyRepo:2:sys-devel/gcc-4.0
**      Ex2) <gentoo-portage::kde-base/kdelibs-3.5
**      Ex3 ::foo/bar
Dependency atoms that lack the new format (::) or do not have a REPO_ID will 
then just use any ebuild which fulfills the requirements.

/var/db/pkg/
------------

Along with other information about the building of packages, the specific repo 
which provided the ebuild will be recorded.
/var/db/pkg/cat/package/REPOSITORY will contain REPO_ID

If no REPOSITORY file is found, then gentoo-portage is assumed.

Backwards Compatibility
=======================
/usr/portage will be treated as /var/repositories/gentoo-portage so it would be 
possible to function with no changes after the upgrade.


Packages in /var/db that lack REPOSITORY will be assumed to be gentoo-portage.
References
==========

[TODO]

Copyright
=========

This document has been placed in the public domain.


Reply via email to