Conflict detection broken (for scripting)

Aperta
#1,609 0 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
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c, sqlite
Ambito
cli, database

Direzione di ricerca

Inizia tracciando il solver della prima fase e la routine esistente di rilevamento dei conflitti, quindi esamina lo schema SQLite remoto relativo alle tabelle pkg_conflicts, files e directories. L’issue è completata quando le installazioni non interattive rilevano e gestiscono in modo affidabile i conflitti tra pacchetti prima del prompt della seconda fase, utilizzando un approccio basato su CONFLICTS, Makefile o MANIFEST che sia stato deciso.

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

Descrizione

I posted this on issue #231 a while back, but that ticket seems to have stagnated and is tagged as a feature request while this is actually a fairly critical bug, so I am re-creating it here with the appropriate tags

Note: This behavior has been verified with pkg version 1.10.1

Summary of the problem:

  1. pkg never populates the "pkg_conflicts" table within the SQLite database for a remote repository.
  2. Due to the lack of information, pkg cannot detect a conflict between package A (installed) and package B (requested to be installed) at the time of the request.
  3. To work around this, pkg downloads the tarball and generates a conflict warning/prompt only if the tarball contains files/directories which conflict with currently-installed packages (based on the "files" table in the local database - not available in remote database).

Critical Failures/Issues:

  1. If the "-y" flag is supplied to pkg for a non-interactive install (based on a previous "-n" dry-run which did not detect/report any conflicts), then it will automatically assume "yes" for all interactive prompts, including the 2nd-stage prompt where pkg currently detects conflicts. This means that conflict resolution/handling from a non-interactive use-case is completely broken at the moment (will always de-install the conflicting package(s) and replace it with the requested package).

Possible solutions:

  1. Make the "files" and "directories" table(s) available in the remote database and use the same conflict-detection routine we have now, but within the "first-stage" solver iteration.
  2. Populate the "pkg_conflicts" table within the database based upon the "CONFLICTS" fields in a port Makefile[1] or a MANIFEST file(#772).

[1] https://www.freebsd.org/doc/en/books/porters-handbook/conflicts.html

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.