You are not logged in.

#1 2018-06-05 02:31:24

hewittc
Member
Registered: 2018-06-05
Posts: 1

pacman 5.1.0 makepkg from symlinked directory broken?

Hello,

It seems since the recent update to pacman a few days ago I can no longer use makepkg to process many PKGBUILDs. It appears to work fine on other systems so I tracked down the difference being that my PKGBUILDs on this system are in a symlinked directory. Here's one example:

% ls -la ~/src 
lrwxrwxrwx 1 chris chris 9 Jun  4 20:05 /home/chris/src -> /code/src

Failure:

% cd ~/src/aur/radare2-git && git clean -xdf . && makepkg
==> Making package: radare2-git 2.4.0.r229.g405c67d77-1 (Mon 04 Jun 2018 10:05:55 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> ERROR: /home/chris/src/aur/radare2-git/radare2-git is not a clone of git://github.com/radare/radare2.git
    Aborting...

Success:

% cd /code/src/aur/radare2-git && git clean -xdf . && makepkg
Removing radare2-git/
==> Making package: radare2-git 2.4.0.r229.g405c67d77-1 (Mon 04 Jun 2018 10:06:04 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning radare2-git git repo...
Cloning into bare repository '/code/src/aur/radare2-git/radare2-git'...
remote: Counting objects: 208754, done.
remote: Compressing objects: 100% (75/75), done.
^Cceiving objects:  12% (25051/208754), 4.90 MiB | 9.78 MiB/s   

It seems this is caused by some discrepancy between $startdir and $SRCDEST variables in makepkg scripts. I was able to work around it by modifying /usr/bin/makepkg:

47c47
< declare -r startdir="$PWD"
---
> declare -r startdir="$(/usr/bin/pwd)"

It's good enough for me, but someone else is certain to run into this problem so a more permanent upstream fix might be handy.

-CH

Offline

#2 2018-06-05 06:49:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,672

Re: pacman 5.1.0 makepkg from symlinked directory broken?

Offline

#3 2018-06-05 15:35:09

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: pacman 5.1.0 makepkg from symlinked directory broken?

In this case it just checks to see if `git config --get remote.origin.url` matches the url in source=() so I'm unsure how this would break. The startdir is definitely misbehaving in other respects when using symlinks though.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2018-06-25 11:49:42

oz
Member
Registered: 2004-05-20
Posts: 102

Re: pacman 5.1.0 makepkg from symlinked directory broken?

hewittc wrote:
> declare -r startdir="$(/usr/bin/pwd)"

Fixed it for me as well.

Offline

Board footer

Powered by FluxBB