Let `cran` and `bioc` be mapped to another server, e.g. an internal PPM

Aperta
#515 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
tooling

Direzione di ricerca

Start by tracing how --with-repos, rproj.toml, and rproj.lock handle cran and bioc, then follow how package history and downloads choose a server. The proposal’s done criteria are mapped URLs recorded in the lockfile and package downloads coming from the configured server, with the specified PPM and CRAN-mirror behavior.

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

Descrizione

Problem

Many organizations point R's cran at an internal Posit Package Manager (PPM) or a CRAN mirror. In rig:

  • --with-repos cran=<URL> fails with "already a repository of the project, with another URL", because the built-in cran entry has no URL.
  • A cran or bioc entry in rproj.toml cannot take a url.
  • Adding the server under another name and setting cran to enabled = false works for solving, because a cran or ppm-cran repository replaces the built-in feed. But repository = "cran" pins, --without-repos=cran, and the meaning of cran in rproj.lock then refer to the wrong thing.
  • Binaries are always downloaded from public P3M, whatever server the user configured. This breaks air-gapped installs and ignores the user's choice of server.

Proposal

  1. Allow --with-repos cran=<URL> (and bioc=<URL>), and url = "..." on a cran or bioc entry. This would mean "this is CRAN", and rproj.lock would record the mapped URL. The current error stays for any other name that already exists with a different URL.

  2. The type of the mapped server would be detected as usual, or set with type.

  3. rig would keep downloading the public package history from https://ppm.r-pkg.org (and https://ppm-bioc.r-pkg.org) unless extend = false is set. The history is only used to decide what to install; it is not where packages are downloaded from.

  4. Downloads always come from the server the user named:

    • For a PPM, binaries come from the server's own bin/linux/<distro>-<arch>/<R minor>/ URLs, including Archive/ paths and dated snapshots. A source tarball served at a binary URL is detected and built from source (see #461).
    • For a CRAN mirror or another CRAN-like repository, rig never falls back to P3M, for binaries or for sources. Binaries come only from what the repository itself publishes (the bin/ indexes for macOS and Windows), so Linux installs are from source. If the repository does not have a package version that the metadata lists, rig reports an error, instead of fetching it from somewhere else.

    Today a CRAN source package is downloaded from the mirror first and from PPM if the mirror does not have it. A mapped cran should not do that.

Lingua principale
Rust
Stelle
1k
Fork
41
Merge medio
9h 33m
PR unite (30g)
17

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 r-lib/rig

Tutte le issue di r-lib/rig

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.