You are not logged in.
I'm trying to make my first open source contribution and have made a patch for pacman, unfortunately I'm a beginner and don't know how to test it without overwriting the normal pacman installation.
Using the '--prefix' and 'DESTDIR' options with the configure and make install scripts does install everything in the chosen folder, but running the binary in installDir/usr/local/bin/pacman just returns
error: config file /usr/local/etc/pacman.conf could not be read: No such file or directory How do people normally test their compiled code without ruining the system?
Last edited by Axejob (2019-06-08 01:18:52)
Offline
You shouldn't need to install it at all to test it. Just compile it (without any special prefix options) and run it from where it is.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
In the git source directory:
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-doc --enable-git-version --enable-debug --enable-warningflags
make
./src/pacman/pacman -SyuOffline
In the git source directory:
./autogen.sh ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-doc --enable-git-version --enable-debug --enable-warningflags make ./src/pacman/pacman -Syu
Thanks for the answer, it works. My patch on the other hand...
Offline
If the patch is in libalpm, maybe you have to specify its location with LD_LIBRARY_PATH when running your freshly built pacman?
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
If the patch is in libalpm, maybe you have to specify its location with LD_LIBRARY_PATH when running your freshly built pacman?
No. The path I gave is actually a wrapper script that handles all that.
Offline