pkg(8) should not silently discard errors when installing new packages
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Inizia in libpkg/scripts.c, in pkg_script_run(), soprattutto nella gestione di waitpid() per gli script -*INSTALL, e controlla il flag esistente che distingue le nuove installazioni dagli upgrade. Usa la discussione IRC collegata per comprendere la distinzione prevista. Il lavoro è completato quando gli errori degli script delle nuove installazioni non vengono più ignorati silenziosamente e la gestione degli upgrade mantiene il proprio comportamento di rollback.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In 4158cd4 the behavior for all pkg scripts have been changed to silently discard errors but only report them. The reasoning behind this is that when doing an upgrade, such errors may prevent the pkg(8) tools from reverting the system to previous state.
We (FreeNAS) have hit this when we are converting the packaging system to pkgNG. It seems like that we should be more careful handling the errors, specifically, the errors should not be ignored if we are doing a new install.
Original IRC discussion:
16:32 @delphij bapt: am I understanding correctly that pkg(8) would errors from post-install scripts?
16:34 @delphij bapt: in libpkg/scripts.c, pkg_script_run() line 182-184, it checks if the *-{DE,}INSTALL script returns an non-zero status but didn't set ret = EPKG_FATAL, is this intentional?
16:36 @delphij bdrewery: ^^
16:37 * delphij thinks the waitpid() loop should set ret as well
16:41 @bapt delphij: yes intentinal to avoid breaking all the upgrade process
16:41 @bapt suboptimal though
16:41 @bapt don't have a better idea that reporting for now
16:41 @delphij bapt: I think only 'delete' should be ignoring errors...
16:42 @bapt if you are in a middle of an upgrade
16:42 @bapt and the script fail if it returns EPKG_FAIL it will rollback the transaction
16:42 @bapt that is what I want to avoid
16:43 @bapt because you will end up with an inconsistent state on your system
16:43 @bapt but really open to better idea
16:43 @delphij bapt: hrm can't we use a flag instead? e.g. if we are doing "new" installs, errors shouldn't be ignored silently
16:43 @bapt on new install I agree
16:44 @bapt and we do have a flag
16:44 @delphij Craig hit this when converting FreeNAS to use pkgng for packages
16:44 @delphij where he converted existing build scripts to a POST-INSTALL action
16:44 @bapt can you open a tiket with that discussion?
16:44 @delphij sure
16:44 @delphij where should I open it? on github or bugzilla.freebsd.org?
16:44 @bapt it around 2 am I will forgot otherwise
16:44 @bapt honnestly github is prefered
16:45 @delphij ok will do
#16:45 @bapt thanks
- Lingua principale
- C
- Stelle
- 835
- Fork
- 313
- Merge medio
- 3g 7h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di freebsd/pkg
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 13 giorni
-
DBMS_UTILITY.FORMAT_ERROR_STACK exceeds the 2000-byte limitForse già presa @coder999o l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
zephyrproject-rtos/zephyr#127560 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
area-VM-meta-mono untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
tetragon-info.json btf_fname doesn't record the BTF file the agent usesForse già presa @bar234 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno