Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Memory-sync mode still opens some files for writing

Aberta
#474 4 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
38/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
c

Direção de pesquisa

Start with lib/download.c around the referenced retry branch and reproduce xbps-install with -MS both with and without root, comparing the saved strace output if available. Trace why memory-sync opens x86_64-repodata.part for writing and why the failure reports both an error and “Success”; done means memory-sync avoids unnecessary writes and reports the underlying failure accurately.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

When using xbps-install with flags -MS, xbps will open the db (/var/db/xbps/) in write mode if a remote repo has changed since the last real sync.

This is apparent when running the command without root, where the openat() call fails. It also seems that when run as root, the same command does not actually use the opened file, as further runs of it without root will still present the error.
Using strace, the error (which I think comes from lib/download.c) seems to be this:

openat(AT_FDCWD, "x86_64-repodata.part", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644) = -1 EACCES (Permission denied)

It is in the retry branch of that if though, so maybe there's also an error before it.

There's also a secondary bug; this failure (both sync modes without root) causes a message that both claims failure and success

ERROR: [reposync] failed to fetch file `https://privatereporedacted/x86_64-repodata': Success
[DEBUG] [rpool] `https://privatereporedacted' failed to fetch repository data: Success

(the error line is part of normal output)

I have saved the full strace output of memorysync with and without root, and rootless normal sync. I can provide those if needed but not publicly over github.

Linguagem predominante
C
Estrelas
1.2k
Forks
152
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de void-linux/xbps

Todas as issues de void-linux/xbps

Issues semelhantes

Mais issues de C

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.