Multi repo: add option to include/exclude packages

Aperta
#2,089 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c
Ambito
cli

Direzione di ricerca

Inizia leggendo la gestione esistente di più repository e il risolutore delle dipendenze/conflitti. Traccia il funzionamento attuale dell’idoneità dei pacchetti del repository e della selezione delle versioni, quindi definisci come includepkgs ed excludepkgs specifici per repository debbano influire su tutte le operazioni. Il lavoro è completato quando le opzioni funzionano per i casi FreeBSD, 3rd-party e repository proprio senza compromettere la risoluzione delle dipendenze.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature

It would be very useful if pkg would provide an option to include or exclude certain packages when using multiple repositories. For example:

FreeBSD: {
  priority: 0,
  excludepkgs: 'apache24,dovecot,haproxy,postfix',
}

3rd-party: {
  priority: 1,
  includepkgs: 'mysqlwsrep57-server,galera26',
}

OwnRepo: {
  priority: 2,
  enabled: yes,
}

This example demonstrates my main use-cases:

  • I want to use the FreeBSD repository for most packages. But some packages must be excluded, because I need them with different build options. Even if the FreeBSD repository provides newer versions of these packages, they must be ignored.
  • I want to use a 3rd-party repo, but only for a small subset of packages. All other packages in this repository must be ignored.
  • And I want to use my own repository for packages that are build with custom build options.

This example is derived from the options currently available in DNF/YUM, see YUM.CONF(5):

 includepkgs

    Include  packages  of  this repository, specified by a name or a glob and separated by a comma, in all
    operations.  Inverse of excludepkgs, DNF will exclude any package in the repository that doesn't match
    this  list.  This  works in conjunction with excludepkgs and doesn't override it, so if you 'excludep‐
    kgs=*.i386' and 'includepkgs=python*' then only packages starting with python that do not have an i386
    arch  will  be seen by DNF in this repo.  Can be disabled using --disableexcludes command line switch.
    Defaults to [].


 excludepkgs

    Exclude packages of this repository, specified by a name or a glob and separated by a comma, from  all
    operations.  Can be disabled using --disableexcludes command line switch.  Defaults to [].

I think adding these options would make the multi-repo feature more usable. Currently my own packages are always replaced with the versions from the FreeBSD repository when there is a newer version available. Having the includepkg and excludepkg options would make this very easy to achieve. On Rocky/Redhat Linux these options make it very easy for a lot repositories from many sources to co-exist without troubles.

On the other hand this may be another challenge for the dependency/conflict resolver, but that's probably a good thing and would allow to further improve it. :)

Lingua principale
C
Stelle
835
Fork
313
Merge medio
3g 7h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di freebsd/pkg

Tutte le issue di freebsd/pkg

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.