Re: [voidlinux/void-packages] Manual.md: description of `XBPS_BUILDDIR` suggests that `wrksrc` is relative to it, which isn't true. (#5802)

Jürgen Buchmüller at Wed, 22 Feb 2017 13:58:57 -0800
The later section `Optional variables` describes the fact that `wrksrc` can be set as (just) the name of the extracted package. It's perhaps a little unfortunate that setting `wrksrc="foo-1.2.3"` results in it becoming `"/builddir/foo-1.2.3"` later on, but that's how it is and it did not disturb me when I took my first steps with `xbps-src`. Many packages do not have to care at all about setting wrksrc because the default is ok. Of course, if anyone can find a better description for these facts without making it too complicated for the newbee to understand, he could create a PR with a change request. I would have no idea what to change.
Alain Kalker at Thu, 23 Feb 2017 06:31:56 -0800
Thanks for the explanation. In this case I wasn't setting `wrksrc`, I needed to get an absolute path to the source directory. Grepping `Manual.md` for `wrksrc`, and the sentence with `${XBPS_BUILDDIR}/${wrksrc}` was one of the first things which came up, so I thought I needed to use that. as the sentence in the issue seemed to suggest. I ended up with `/builddir//builddir/docker-1.13.1` instead...
Toyam Cox at Thu, 23 Feb 2017 07:27:01 -0800
Issue closed?
Alain Kalker at Thu, 23 Feb 2017 10:52:53 -0800
Well, the quoted passage is still wrong. Look at the definition of `wrksrc`: > - `wrksrc` The directory name where the package sources are extracted, by default set to `${pkgname}-${version}`. This at least mentions "by default", making it clear that another possibility exists. I would be happy with changing: > The package `wrksrc` is always stored in this directory such as `${XBPS_BUILDDIR}/${wrksrc}`. to: > A package's sources are always stored in a subdirectory beneath this directory. because that is the only thing that can be said with some certainty.
cr6void at Thu, 02 Mar 2017 12:02:28 -0800
Sorry but all of this sounds unclear and confusing for me... I spent the whole day trying to build some new packages for Void, but I got a lot of errors because of bad **wrksrc**, always the same kind of messages: `/void-packages/common/xbps-src/libexec/xbps-src-doconfigure.sh: line 34: cd: No such file or directory` `=> ERROR: cannot access wrksrc directory` The line 34 is: cd "$wrksrc" So, I understand xbps-src can't cd to the right directory... **wrksrc**: The directory name where the package sources are extracted, by default set to ${pkgname}-${version} The way I understand it: I can choose any name for wrksrc, the name doesn't really matter. This wrksrc directory is created, then my tarball is extracted in this wrksrc directory. If my tarball consists of one top-level directory, then this top-level directory is extracted in wrksrc. The extracted files are located in `/builddir/wrksrc/top-level-directory/*` So, in this case, the line 34 sould be: cd "$wrksrc/top-level-directory" I understand something is wrong somewhere but I can't find where...
cr6void at Thu, 02 Mar 2017 16:16:51 -0800
Thank you!! :)
cr6void at Fri, 03 Mar 2017 19:06:14 -0800
@Duncaen In fact I was **misleaded** by: `mkdir -p ${wrksrc}` in the **fetch** build_style.