You are not logged in.
Hello,
I'm trying to install a package from a local file with pacman -U
this package has dependencies found in AUR which have been previously built and placed into /var/abs/local/pkg
I want pacman to automatically install all the dependencies.
to do so I tried:
1) in /etc/pacman.conf (as suggested by "man pacman.conf")
CacheDir = /var/cache/pacman/pkg/ /var/abs/local/pkg/
2) in the command line (as suggested by "man pacman")
--cachedir /var/cache/pacman/pkg --cachedir /var/abs/local/pkg
All of them failed with "could not satisfy dependencies"
Why does that happen?
Is it related to pacman only searching for packages into the database and not into the cache directories?
How can it be achieved?
Regards,
vicencb
Offline
You could -U all the packages you want at once.
Offline
Is it related to pacman only searching for packages into the database and not into the cache directories?
Yes.
Pacman looks up packages/dependencies in it's database to see if it knows about them, if your AUR packages aren't in any of your synced repositories then as far as pacman is concerned they don't exist, so it doesn't matter that they're in your CacheDir or not.
Last edited by Slithery (2014-08-11 19:44:23)
Offline
You'll need a package database of your aur packages if this is the way you want to do it. Take a look at repo-add and related utilities if this is the way you want to manage your packages.
Personally, I prefer to install aur/abs packages using pacman -U with the --asdepend switch if it is a dependency of another package. The dependency status is carried over for a package update, so it all works out. (also works with makepkg)
edit for clarity, although slithery beat me to posting
Last edited by runical (2014-08-11 19:49:21)
Offline
You need to create a pacman database.
Put all of those packages in a single directory.
Create a database in that directory using repo-add or repo-add_and_sign
Add an entry in /etc/pacman.conf for the new database. You must use the same name that you used when you created the database. The path should use the "file" scheme:
Server=file:///path/to/directorywhere /path/to/directory is the local path to that directory.
Optionally add the directory as a local cache in /etc/pacman.conf
Run pacman -Syu <package> where <package> is the name of the package in your custom local repository.
Note that you will have to rebuild all of those packages yourself when updated become available on the AUR. Pacman will not do it for you. Alternatively, you may use one of the many AUR helpers that provide dependency resolution when installing AUR packages.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks for your answers, they are very helpful.
I didn't know about the option of building my own database with repo-add.
Now I've a db built with
repo-add /var/abs/local/pkg/aur.db.tar.xz /var/abs/local/pkg/*.pkg*
and a new repo in pacman.conf
[aur]
Server = file:///var/abs/local/pkg
SigLevel = Optional TrustAll
along with two CacheDir paths
The only drawback I see in this method is that
pacman -Qm
does not report aur packages as foreign.
Thanks,
vicencb.
Offline
The only drawback I see in this method is that
pacman -Qm
does not report aur packages as foreign.Thanks,
vicencb.
"Foreign" packages are those which are not found in any pacman database so this is expected. If you want to work around this, remove your repo from /etc/pacman.conf and add it to an empty text file, then at the beginning of the file add this line:
Include = /etc/pacman.confThis is your custom pacman.conf file. Save it wherever you want with whatever name you want.
Now create an alias such as
alias localpacman='pacman --config /path/to/custom/pacman.conf'with the path to the file that you saved.
You can then run localpacman (or whatever you want to call it) to quickly install packages in your local repo but then use pacman as usual.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline