pacman can't find package file added to custom repo database

I’ve added a package libxau-1.0.11-1-x86_64.pkg.tar.zst to my custom repository database custom.db.tar.gz using repo-add. The package file is located in the current directory, while the repo database is in the parent directory:

repo-add ../custom.db.tar.gz ./libxau-1.0.11-1-x86_64.pkg.tar.zst

This runs without any errors. However, when I try to install the package with:

pacman -S libxau

I get the following error:

libxau-1.0.11-1-x86_64.pkg.tar.zst failed to download
error: failed retrieving file 'libxau-1.0.11-1-x86_64.pkg.tar.zst' from disk : Couldn't open file /self/libxau-1.0.11-1-x86_64.pkg.tar.zst

It seems pacman is expecting the package file to be in the same directory as the repo database file, which is not the case here.
the file would be at /self/libxau/libxau-1.0.11-1-x86_64.pkg.tar.zst

How can I get pacman to look in the correct directory for the package file that was added to the custom repo database? Is there a way to specify the package file path relative to the repo database? Or do I need to move the package file to the same directory as the database?

Any suggestions on how to resolve this would be appreciated. Let me know if you need any other details.

Asked By: Rainb

||

I must have hallucinated, but packages are only allowed on the same directory where custom.db is located. source Good to know.

Answered By: Rainb
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.