4

I got this weird thing going on where,

pacman -S -w awesome xorg-xinit xorg-server xorg-server-utils

pacman doesn't download all the required dependencies.

The reason for downloading the packages is because I'm creating a local repo with only the specific packages to my neededs. (instead of downloading the whole repo since the Arch community doesn't want you to do this because of bandwidth limitations, which is respect)

Now, the packages defined above downloads nicely, it does download xorg-server and so on, and -w ensures they don't get installed. But -S should also download all the dependencies which it doesn't for whatever reason.

The output when trying to install the above packages using the local repo later on results in:

warning: cannot resolve "xorg-xset", a dependency of "xorg-server-utils"
warning: cannot resolve "xorg-xauth", a dependency of "xorg-xinit"

and the list goes on... inspecting the repo surely the packages are missing and has never been downloaded anywhere.

Any ideas to why this is? Have I missed something? Logically or parameter wise?

6

As pointed out by Earnestly and demonicmaniac3 over at #archlinux irc channel, this is because pacman won't re-download anything if it's already locally installed. But it will download whatever it is you're specifically instructing it to, which make a whole lot of sense come to think of it.

This means if you're trying to download packages intended for a custom/local repo, you need to either make sure the packages you're about to download is not installed locally or do one of these options:

Use a empty package database temporarly/locally

pacman -y --dbpath /tmp ...

This will create the illusion that nothing is installed locally and every single package needed is downloaded. This also requires you to do -y since there's no master package-list in your made up database.

Perform a system upgrade

pacman -Syuw ...

This should re-install/upgrade any package may it be installed or not already.
Note: Not verified (I know to little about pacman's logic and is in a time pickle to test it)

Generate a dependency-list using expac

expac -S '%E' -l '\n' xorg-xinit xorg-server-utils ...

Calling expac on the <package string> (all the packages you are about to download) would give you a list of packages needed to run whatever it is you're downloading. You could use this list to fetch/add to your already existing string of packages scheduled for installation.


I prefer the expac version since it holds up programmatically and would be useable in many scripts, but the quick and "dirty" version is to simply redirect the database which pacman checks.

  • 1
    You may want to look into specifying --cachedir if you are going to use the local repository for multiple machines with different packages. It also takes care of have to deal with multiple versions of the same package in the repository. – StrongBad Dec 11 '17 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.