Skip to content

Fix formatting of noticepath string in update-notice.c - #14

Open
opinijm wants to merge 1 commit into
CachyOS:release/7.1.xfrom
opinijm:patch-1
Open

opinijm wants to merge 1 commit into
CachyOS:release/7.1.xfrom
opinijm:patch-1

Conversation

@opinijm

@opinijm opinijm commented Oct 23, 2026 •

Copy link
Copy Markdown

Even with a trailing slash in my pacman.conf, this trips up on non-standard DbPath. A double slash in the working case should be harmlesss

:: Synchronizing package databases...
 cachyos-znver4 is up to date
 cachyos-core-znver4 is up to date
 cachyos-extra-znver4 is up to date
 cachyos-v4 is up to date
 cachyos-core-v4 is up to date
 cachyos-extra-v4 is up to date
 cachyos-v3 is up to date
 cachyos-core-v3 is up to date
 cachyos-extra-v3 is up to date
 cachyos is up to date
 core is up to date
 extra is up to date
:: Starting full system upgrade...
Update notice: Kernel 7.3.0-2 has issues with amdgpu particularly causing black screen on AMD dGPUs
:: Do you want to continue? [Y/n] Y
error: could not save notice id: No such file or directory

Config

...
DBPath       = /mnt/db/pacman/
...
 $ pacman-conf DBPath
/mnt/db/pacman
sudo strace -f -e trace=file -o /tmp/p.txt pacman -Suu -p
sudo grep -a CACHY_UPDATE_NOTICE /tmp/p.txt
38547 openat(AT_FDCWD, "/mnt/db/pacmanlocal/CACHY_UPDATE_NOTICE", O_RDONLY) = -1 ENOENT (No such file or directory)
38547 openat(AT_FDCWD, "/mnt/db/pacmanlocal/CACHY_UPDATE_NOTICE", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 ENOENT (No such file or directory)

Even with a trailing slash in my pacman.conf, this trips up on non-standard DbPath. A double slash in the working case should be harmlesss

```
sudo strace -f -e trace=file -o /tmp/p.txt pacman -Suu -p
sudo grep -a CACHY_UPDATE_NOTICE /tmp/p.txt
38547 openat(AT_FDCWD, "/mnt/db/pacmanlocal/CACHY_UPDATE_NOTICE", O_RDONLY) = -1 ENOENT (No such file or directory)
38547 openat(AT_FDCWD, "/mnt/db/pacmanlocal/CACHY_UPDATE_NOTICE", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 ENOENT (No such file or directory)
```

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the update-notice path separator change.

No open issues 🎉

What changed in this PR

Fixes update-notice file paths when a custom pacman DBPath has no trailing slash, allowing the notice ID to be read and saved correctly.

Changes:

  • Adds an explicit / separator between config->dbpath and local/CACHY_UPDATE_NOTICE.
File Description
src/​pacman/​update-notice.c Corrects construction of the update-notice file path.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants