[arch-general] Referencing $srcdir in PKGBUILD?

Stefan Husmann stefan-husmann at t-online.de
Wed Aug 18 18:57:36 EDT 2010

Am 17.08.2010 13:52, schrieb Ray Rashif:
> On 17 August 2010 19:32, Philipp Überbacher <hollunder at lavabit.com> wrote:
>> Excerpts from Loui Chang's message of 2010-08-17 13:14:44 +0200:
>>> On Tue 17 Aug 2010 13:01 +0200, Philipp Überbacher wrote:
>>>> Excerpts from Loui Chang's message of 2010-08-17 12:35:41 +0200:
>>>>> On Tue 17 Aug 2010 12:09 +0200, Heiko Baums wrote:
>>>>>> Am Tue, 17 Aug 2010 19:15:34 +1000
>>>>>> schrieb Allan McRae <allan at archlinux.org>:
>>>>>>> grep your files in your package for $srcdir (the actual value...).
>>>>>>> If it is not in a config file or RPATH or the like, you can probably
>>>>>>> ignore it.
>>>>>> I'm not quite sure if this is not a bug in makepkg, because I
>>>>>> have this problem with almost all of my packages in AUR since the latest
>>>>>> update to pacman 3.4.0. I never got this message before and I haven't
>>>>>> changed such elementary parts of the packages. And if I'm right this
>>>>>> problem appears with almost every package which I install from AUR.
>>>>>> But I need to watch it more narrowly.
>>>>> You'll get that with any package that contains debugging symbols.
>>>> So it isn't about the usual 'cd $srcdir/${pkgname}-${pkgver}' ?
>>> No, it's about build directories being referenced in the finished
>>> package, not the PKGBUILD.
>> Oh.. I assumed it was some random annoyance and ignored it. I've seen it
>> a number of times already.
>> So 'grep -R $somedistinctpartofthepathtoPKGBUILDS $pkg' should find the
>> offending file? And then some nasty patching to fix it?
> It's not much of a big deal, and there's rarely need for any "nasty
> patching". It serves as a reminder to check for accidental inclusion
> of build paths in important runtime/system files, which often is an
> upstream build issue or user-specific mistake. Cases where this can be
> ignored and is usually the most prevalent is, for example,
> documentation-related files.
> Just run this from the makepkg build dir:
> grep -R "$(pwd)/src" pkg/
> --

thank you for this enlightning thread. Now I understand why (nearly) all of 
my emacs packages show this error message. 

If you byte-compile an .el-file, emacs writes something like

;;; Compiled by haawda at frege on Thu Aug 19 00:35:21 2010
;;; from file /home/haawda/paketierung/maintained_by_me/auctex-cvs/src/auctex-build/preview/prv-emacs.el
;;; in Emacs version
;;; with all optimizations.

to the beginning of the .elc-file. Well, all this is harmless, because it is just a comment, 
but it is annoying . Does someone know how this can be avoided?

Regards Stefan

More information about the arch-general mailing list