Reputation: 43
I’m working on an project, which is a pacman
fork. I’m trying to develop this project for both macOS and Linux. Compiling my project on macOS is so far successful, but I’ve got a problem with some directories. In the Makefile.am, directories for the DB and cache are supposed to be create:.
# create the meme DB, cache, makepkg-template and system hook directories upon install
install-data-local:
for dir in "$(DESTDIR)$(localstatedir)/lib/meme" "$(DESTDIR)$(localstatedir)/cache/meme/pkg" \
"$(DESTDIR)$(datarootdir)/makepkg-template" "$(DESTDIR)$(datarootdir)/libalpm/hooks"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
Those directories are missing after installation on macOS, so that I get the following error by pacman
:
error: failed to initialize alpm library
(could not find or read directory: /usr/local/Cellar/meme/0.0.8.2/var/lib/meme/)
I’m using Homebrew to compile, bottle and install the package manager. You can find my formula on GitHub: https://github.com/kenokenobingo/homebrew-memetap.
Do you have any idea how to get rid of this problem? Is this a OS-specific issue?
Upvotes: 0
Views: 1002
Reputation: 323
As discussed in the #archlinux-pacman IRC channel on Freenode (official pacman development channel) pacman installs a couple of empty directories, which seem to be created successfully on a manual make install
but not when brew does it.
Brew may be deleting these directories because it thinks you don't need them. This is similar to a feature in makepkg too -- if the !emptydirs option is specified in makepkg.conf(5) or the PKGBUILD, empty directories will be deleted. This option is disabled by default because it can cause issues when those directories are legitimately needed.
Upvotes: 1