You are not logged in.

#1 2025-12-05 13:22:22

spsf64
Member
From: FL, US or SP, BR
Registered: 2012-05-18
Posts: 109
Website

[SOLVED] Pacman 7.1.x does not create 'CacheDir' automatically

I am testing the latest pacman 7.1.x;
As I run Arch from a small external USB drive, I keep the cache dir in /tmp, which is, of course, erased after each boot...
Ver 7.x used to create it automatically, but with ver 7.1.x I got this error after reboot:

"error: 'failed to resolve path '/tmp/cache/pacman/pkg/' passed to 'CacheDir': No such file or directory"

This is my pacman.conf related line(s)

#CacheDir    = /var/cache/pacman/pkg/
CacheDir    = /tmp/cache/pacman/pkg/

Is this a bug or will it be a norm for this release?
TIA

Last edited by spsf64 (2025-12-12 20:25:00)


Sergio S.
Yes, I'm old and bald!

Offline

#2 2025-12-05 14:50:45

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,465

Re: [SOLVED] Pacman 7.1.x does not create 'CacheDir' automatically

Online

#3 2025-12-05 15:01:06

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,619
Website

Re: [SOLVED] Pacman 7.1.x does not create 'CacheDir' automatically

Not related directly - that bug is when there are multiple CacheDir entries.  This is about directories that do not exist.

File a bug report and I will remember to fix it.

Offline

#4 2025-12-05 15:39:22

spsf64
Member
From: FL, US or SP, BR
Registered: 2012-05-18
Posts: 109
Website

Re: [SOLVED] Pacman 7.1.x does not create 'CacheDir' automatically

Allan wrote:

Not related directly - that bug is when there are multiple CacheDir entries.  This is about directories that do not exist.

File a bug report and I will remember to fix it.

Thanks for replying!
I tried to file a bug report but the gitlab requested me to create a new account, I did, waiting for approval...

Maybe someone with an account can do this??


Sergio S.
Yes, I'm old and bald!

Offline

#5 2025-12-06 15:35:47

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,465

Re: [SOLVED] Pacman 7.1.x does not create 'CacheDir' automatically

Do you meantime have an account?

Fwwi

Allan in a not directly related patch wrote:

This provides checks that the directories specified in pacman.conf exist.
It will also fix the "bug" where people replace their pacman package cache with a symlink to another directory, and have issues mid-transaction when pacman is upgraded (and the symlink becomes a directory again).

Any fix itr would defeat the first aspect by necessity but for the second it's probably sufficient to default back to the configured path if realpath returns null (and have sync create the directory later on)?

Online

#6 2025-12-06 23:25:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,619
Website

Re: [SOLVED] Pacman 7.1.x does not create 'CacheDir' automatically

Pretty much the fix I am implementing.

Offline

#7 2025-12-12 20:24:09

spsf64
Member
From: FL, US or SP, BR
Registered: 2012-05-18
Posts: 109
Website

Re: [SOLVED] Pacman 7.1.x does not create 'CacheDir' automatically

Allan wrote:

Pretty much the fix I am implementing.

Just tested the latest 7.1.0.r7.gb9f7d4a-1, it works as expected!
Thank you!!


Marking this as solved


Sergio S.
Yes, I'm old and bald!

Offline

Board footer

Powered by FluxBB