Open RubenKelevra opened 1 year ago
The optional arg to --localrepo takes the repo name not path. Im guess putting the path causes is to match nothing and then trigger the "no repos configured" code.
Also, the local repo mode makes paru work on your local repo not on what's installed. So paru will only update stuff already in the repo and old version will be nothing if it wasn't in the repo previously.
Issue one though, I don't know what's up as I can't reproduce. You should probably try paru-git and if that fails send some debug logs with PARU_DEBUG=1.
The optional arg to --localrepo takes the repo name not path. Im guess putting the path causes is to match nothing and then trigger the "no repos configured" code.
This errors out now instead of failing confusingly
Okay, so I got have a system where this issue occours.
I did now the following:
LocalRepo
and Chroot
to the paru.conf - so no parameters.error: no local repos configured, add one to your pacman.conf:
[options]
CacheDir = /var/lib/repo/aur
[aur]
SigLevel = PackageOptional DatabaseOptional
Server = file:///var/lib/repo/aur
Now paru gives me:
$ paru
no new news
:: Synchronizing package databases...
endeavouros is up to date
core-x86-64-v3 is up to date
extra-x86-64-v3 is up to date
community-x86-64-v3 is up to date
core is up to date
extra is up to date
community is up to date
multilib is up to date
chaotic-aur is up to date
aur.db failed to download
error: failed retrieving file 'aur.db' from disk : Couldn't open file /var/lib/repo/aur/aur.db
error: failed to synchronize all databases (download library error)
With debug I get the following:
$ paru
debug: <reqwest::connect> starting new connection: https://archlinux.org/
debug: <reqwest::async_impl::client> redirecting 'https://archlinux.org/feeds/news' to 'https://archlinux.org/feeds/news/'
debug: <reqwest::async_impl::client> response '200 OK' for https://archlinux.org/feeds/news/
debug: <alpm> loading package cache for repository 'local'
debug: <alpm> added 3215 packages to package cache for db 'local'
no new news
:: Synchronizing package databases...
endeavouros is up to date
core-x86-64-v3 is up to date
extra-x86-64-v3 is up to date
community-x86-64-v3 is up to date
core is up to date
extra is up to date
community is up to date
multilib is up to date
chaotic-aur is up to date
aur.db failed to download
error: failed retrieving file 'aur.db' from disk : Couldn't open file /var/lib/repo/aur/aur.db
error: failed to synchronize all databases (download library error)
debug: <alpm> unregistering database 'local'
debug: <alpm> freeing package cache for repository 'local'
debug: <alpm> unregistering database 'endeavouros'
debug: <alpm> unregistering database 'core-x86-64-v3'
debug: <alpm> unregistering database 'extra-x86-64-v3'
debug: <alpm> unregistering database 'community-x86-64-v3'
debug: <alpm> unregistering database 'core'
debug: <alpm> unregistering database 'extra'
debug: <alpm> unregistering database 'community'
debug: <alpm> unregistering database 'multilib'
debug: <alpm> unregistering database 'chaotic-aur'
debug: <alpm> unregistering database 'aur'
It may be the cause that paru will only make the repo on install and not upgrade. Try install an aur package.
@Morganamilo that's the result:
$ paru -S aur/paru
warning: database file for 'aur' does not exist (use '-Sy' to download)
error: target not found: paru
$ paru -Sy aur/paru
:: Synchronizing package databases...
endeavouros is up to date
core-x86-64-v3 is up to date
extra-x86-64-v3 is up to date
community-x86-64-v3 is up to date
core is up to date
extra 1738.0 KiB 387 KiB/s 00:04 [-----------------------------------------------------------------------------------------------------------------------] 100%
community 7.2 MiB 483 KiB/s 00:15 [-----------------------------------------------------------------------------------------------------------------------] 100%
multilib is up to date
chaotic-aur 2.3 MiB 516 KiB/s 00:05 [-----------------------------------------------------------------------------------------------------------------------] 100%
aur.db failed to download
error: failed retrieving file 'aur.db' from disk : Couldn't open file /var/lib/repo/aur/aur.db
error: failed to synchronize all databases (download library error)
Same problem as author.
It may be the cause that paru will only make the repo on install and not upgrade. Try install an aur package.
This fixed it for me ^
paru --chroot -Sy paru
Maybe a setup
command or something like that would help?
paru --chroot -Sy
, then I get the following error message:Error: no local repos configured, add one to your pacman.conf:
[options]
CacheDir = /var/lib/repo/aur
[aur]
SigLevel = PackageOptional DatabaseOptional
Server = file:///var/lib/repo/aur
paru --chroot -Sy
command, then I get the following error message::: Synchronizing package databases...
endeavouros is up to date
core is up to date
extra is up to date
multilib is up to date
aur.db failed to download
error: failed retrieving file 'aur.db' from disk : Couldn't open file /var/lib/repo/aur/aur.db
error: failed to synchronize all databases (download library error)
Same problem as author.
It may be the cause that paru will only make the repo on install and not upgrade. Try install an aur package.
This fixed it for me ^
paru --chroot -Sy paru
Maybe a
setup
command or something like that would help?
This does not help:
[ruben@v ~]$ LANG=en_US.UTF-8 paru --chroot -Sy paru
:: Synchronizing package databases...
endeavouros is up to date
core is up to date
extra is up to date
multilib is up to date
aur.db failed to download
error: failed retrieving file 'aur.db' from disk : Couldn't open file /var/lib/repo/aur/aur.db
error: failed to synchronize all databases (download library error)
I ran into this as well and I was able to resolve it by doing the following:
touch aur.db
rm aur.db
and then repo-add aur.db.tar.gz youtube-dl...zst
. This will create a proper package database including the previously built package. Presumably you could skip some of the above by jumping to this and just using a package you built with makepkg, but I haven't tried that.At that point paru seems to be working correctly using the chroot as intended.
To avoid the readlink
error, touch aur.db.tar.gz
and soft link aur.db
to it instead.
According to Arch wiki,
A package database is a tar file, optionally compressed. Valid extensions are .db or .files followed by an archive extension of .tar, .tar.gz, .tar.bz2, .tar.xz, .tar.zst, or .tar.Z.
https://github.com/Morganamilo/paru/blob/5355012aa3529014145b8940dd0c62b21e53095a/src/repo.rs#L31
Paru assumes that it is a symbolic link and calls std::fs::read_link
which fails if it is not.
@Sohex & @SuibianP thanks! This solution combined works for me.
@Morganamilo can we get this automatically setup if the user configures chroot builds?
I found that paru -Sccd
will actually break the setup.
Afterwards the aur.db and the aur.db.tar.gz are gone, so paru will report:
error: failed retrieving file 'aur.db' from disk : Couldn't open file /var/lib/repo/aur/aur.db
error: failed to synchronize all databases (unexpected error)
error: failed to run: sudo arch-nspawn -C /tmp/.tmpzCtIuZ -M /etc/makepkg.conf /var/lib/paru/aur_chroot/root --bind-ro /var/lib/repo/aur --bind /var/lib/repo/aur --bind /var/cache/pacman/pkg/ pacman -Syu --noconfirm:
Affected Version
paru v1.11.2 - libalpm v13.0.2
Description
I want to use the Chroot function by paru:
I've enabled the settings
LocalRepo
andChroot
in the settings, by adding the following:Issue One
Calling
paru
afterwards gave me the following output:So I added the
CacheDir
entry and[aur]
repo as first repo in the list of repos.A call of
paru
now fails:So I fixed that by creating the folder structure manually and touched the aur.db file.
Now the empty file seems to be enough for pacman/aur to accept it.
The man page states that this shouldn't be necessary:
Issue Two
The man page for paru.conf also lists, that I can specify the Repo explicitly, so I have tried that:
Doing so will lead to paru outputting the following, despite that those information is already added to the pacman.conf file:
Issue Three
Because of Issue Two, I haven't specified the LocalRepo explicitly, and created the folder and the db file, because of Issue One, manually on disk.
Now all packages installed by Paru from the AUR are no longer recognized by Paru, so they won't receive any updates:
Notice the missing
Old Version
entry.wine-stable-next
however is installed on my system in an older version:So there's a new version available, but
paru -Syu
does not show an update available. In the man-page I couldn't find a way to fix this or hint how to regenerate the database containing this information... only the--gendb
function is explained, but won't help here.Config files:
paru.conf
pacman.conf