`prefer` drops a path when the preferred package lists it `until: mutate`
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
Línea de trabajo
Read internal/slicer/slicer.go where entries skipped for prefer are handled, then compare the behavior with issue #330. Reproduce with the two package slice YAML examples and chisel-proxy cut; verify /file remains in the rootfs and contains the preferred package's content when both slices are selected, including generated content (text).
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
a path that a slice asks for goes missing from the rootfs when another selected slice lists the same path with until: mutate and is the preferred one. no error from cut.
# test-package1.yaml
package: test-package1
slices:
myslice:
contents:
/file: {prefer: test-package2}
# test-package2.yaml
package: test-package2
slices:
myslice:
contents:
/file: {until: mutate}
repro using chisel-proxy:
$ alias chisel-proxy='go run github.com/lczyk/chisel-proxy/cmd/[email protected]'
$ mkdir -p test-package1 test-package2
$ echo foo > test-package1/file
$ echo bar > test-package2/file
$ cut() {
rm -rf ./rootfs && mkdir ./rootfs
chisel-proxy cut --arch amd64 ./test-package1 ./test-package2 ./test-package1.yaml ./test-package2.yaml \
-- --root ./rootfs "$@"
cat ./rootfs/file 2> /dev/null || echo missing
}
$ cut test-package1_myslice
Extracting files from package "test-package1"...
foo
$ cut test-package1_myslice test-package2_myslice
Extracting files from package "test-package1"...
Extracting files from package "test-package2"...
missing
test-package1_myslice wants /file to stay, and with test-package2_myslice next to it nobody gets it.
the entry of the package that lost the prefer is skipped before until is worked out (internal/slicer/slicer.go), so only the preferred until: mutate is counted. same for generated content (text).
same family as #330, with until in place of arch.
proposal
count the until of every selected slice that lists the path, also the ones skipped for prefer. then /file stays, with the preferred content.
- Lenguaje dominante
- Go
- Estrellas
- 434
- Forks
- 74
- Merge medio
- 1 d 30 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de canonical/chisel
-
`mode` of a generated directory is random when it has a generated childPosiblemente ocupada @Amadeus-22 la tomó hace 24 días. AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
-
cut fails on uncompressed debPosiblemente ocupada @yuminn-k la tomó hace 29 días. AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 42/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de canonical/chisel
Issues similares
-
mcpx scan: flag unsafe tool namesPosiblemente ocupada @zeyadbadawyy la tomó hoy. Abiertoarea/scan enhancement good first issue priority/medium size/small
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rohitgollarahalli/mcpx#45 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Mend: dependency security vulnerability
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Windows 主机
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Lee-xeo/Claude-Cage#1550 ·
Los mantenedores suelen responder en 1 día
-
(bug) ui: spanPaint can index spans past their end (panic: index out of range)Posiblemente ocupada @MaxMiksa la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día