You are not logged in.

#1 2018-06-23 16:28:17

dbermond
Package Maintainer (PM)
Registered: 2017-05-06
Posts: 28
Website

[SOLVED] What is the problem with this PKGBUILD?

AUR package mpv-full-git, which I maintain. What is the problem with its PKGBUILD?

It gives me this error:

$ git clone https://aur.archlinux.org/mpv-full-git.git
Cloning into 'mpv-full-git'...
remote: Counting objects: 191, done.
remote: Compressing objects: 100% (147/147), done.
remote: Total 191 (delta 48), reused 183 (delta 44)
Receiving objects: 100% (191/191), 96.80 KiB | 70.00 KiB/s, done.
Resolving deltas: 100% (48/48), done.
$ cd mpv-full-git
$ makepkg -rs
==> Making package: mpv-full-git 0.28.2.r566.g1b19ba6c57-1 (sáb 23 jun 2018 16:12:40 America)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> ERROR: /home/<username>/aur/mpv-full-git/mpv-full-git is not a clone of https://github.com/mpv-player/mpv.git
    Aborting...

I'm having this error with makepkg since the pacman/makepkg 5.0.2 -> 5.1.0 upgrade. Before this pacman upgrade, it was working fine.

I can fix this error if I change the clone directory from $pkgname to the standard upstream name. In this case, to 'mpv'.

For example, by changing this line:

source=("$pkgname"::'git+https://github.com/mpv-player/mpv.git')

to this one (and also changing the appropriate 'cd' lines):

source=('git+https://github.com/mpv-player/mpv.git')

So, the issue seems to be somehow related to the directory where the upstream clone is placed. In this case, the clone directory have the same name of $pkgname (mpv-full-git). In my packages I tend to use this approach of naming the clone directory to $pkgname. But what is strange is that other packages in where I use this same approach of naming the clone directory to $pkgname does not suffer from this issue. For example, package ffmpeg-git does not suffer from this issue, and at a first glance this seems inconsistent because I would expect the same error as above.

What is wrong here?

Any comment would be appreciated. Thank you.

Last edited by dbermond (2018-06-23 18:25:21)

Offline

#2 2018-06-23 16:35:37

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [SOLVED] What is the problem with this PKGBUILD?

The problem is in whatever you have in /home/<username>/aur/mpv-full-git/mpv-full-git, it's not a clone of https://github.com/mpv-player/mpv.git

Offline

#3 2018-06-23 16:41:24

dbermond
Package Maintainer (PM)
Registered: 2017-05-06
Posts: 28
Website

Re: [SOLVED] What is the problem with this PKGBUILD?

Scimmia wrote:

The problem is in whatever you have in /home/<username>/aur/mpv-full-git/mpv-full-git, it's not a clone of https://github.com/mpv-player/mpv.git

I'm doing everything in a clean directory, so there is nothing there. makepkg is creating the clone directory...

Offline

#4 2018-06-23 16:57:26

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [SOLVED] What is the problem with this PKGBUILD?

Not in your log it's not.

Offline

#5 2018-06-23 17:49:45

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [SOLVED] What is the problem with this PKGBUILD?

That sounds very similar to this problem:
https://bbs.archlinux.org/viewtopic.php?id=237706

Until a new pacman version is released you should not build from a path containing symlinks. You can do this before calling makepkg:

cd "$(pwd -P)"

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2018-06-23 18:24:52

dbermond
Package Maintainer (PM)
Registered: 2017-05-06
Posts: 28
Website

Re: [SOLVED] What is the problem with this PKGBUILD?

Scimmia wrote:

Not in your log it's not.

Please see carefully the log and I'm pretty sure that you'll find that I'm running in a clean directory (command 'git clone' does not make the clone if the directory already exists as a non-empty directory).

progandy wrote:

That sounds very similar to this problem:
https://bbs.archlinux.org/viewtopic.php?id=237706

Until a new pacman version is released you should not build from a path containing symlinks. You can do this before calling makepkg:

cd "$(pwd -P)"

Ah yes, that's it. The directory /home/<username>/aur is a symlink in my system, as like as other directories where I build AUR stuff. That's why it is failing.

I can confirm that the problem does not occur when running makepkg in a path without any simlinks. I can also reproduce the problem with my other packages when creating pretty new symlinks.

Good to know that developers are aware and the problem is already fixed in pacman git master.

I was pretty sure that it was a pacman 5.1.0 fault, because with 5.0.2 it was working really fine. But since pacman/makepkg claims itself to have no bugs, I was afraid of saying this smile

Marking as solved. Thank you.

Last edited by dbermond (2018-06-23 18:42:12)

Offline

#7 2018-07-02 17:53:08

knedlyk
Member
From: L'viv, Ukraine
Registered: 2009-04-14
Posts: 163
Website

Re: [SOLVED] What is the problem with this PKGBUILD?

Why nobody filed a bug report? I have the same problem with symlinks and new makepkg.

Offline

#8 2018-07-02 18:16:56

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [SOLVED] What is the problem with this PKGBUILD?

The bug report has been filed for a long time and it has been fixed in git
https://bbs.archlinux.org/viewtopic.php … 0#p1789530
https://lists.archlinux.org/pipermail/p … 22579.html
https://git.archlinux.org/pacman.git/co … 232f7c5387

There hasn't been a release yet, though.

You can add a workaround to makepkg.conf if you really need it:

# ~/.config/pacman/makepkg.conf
# temporary fix for symlinks in $startdir
BUILDDIR="${BUILDDIR:-$startdir}"

Last edited by progandy (2018-07-02 18:18:49)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB