Re: Avoiding getting .buildlink path in installed [python|ruby]scripts?

Fredrik Pettai <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.wip.general
Message-ID <[email protected]>
On 12/20/09 1:41 AM, OBATA Akio wrote:
> Hi!
> 
> On Sun, 20 Dec 2009 07:20:23 +0900, Fredrik Pettai <[email protected]> wrote:
>> Two package examples:
>>
>> wip/py-4Suite, which installs /usr/pkg/bin/4xml among many other files.
>>
>> If I look at that python script more closely:
>> -bash-4.0$ head -1 /usr/pkg/bin/4xml
>> #!/usr/pkgsrc/wip/py-4Suite/work/.tools/bin/env python
>>
>> wip/opendnssec, which installs /usr/pkg/bin/ods-kaspcheck among many
>> other files.
>>
>> -bash-4.0$ head -1 /usr/pkg/bin/ods-kaspcheck
>> #!/usr/pkgsrc/wip/opendnssec/work/.buildlink/bin/ruby
>> -I/usr/pkg/lib/opendnssec
>>
>> How do I solve this the "correct" way?
> 
> You can replace those shebang
>   for python:
>    include lang/python/application.mk and use REPLACE_PYTHON.
>   for ruby:
>    include lang/ruby/replace.mk and use REPLACE_RUBY.

That seems to be done in the pre-configure phase:

=> Replacing ruby18 interpreter in bin/ods-auditor bin/ods-kaspcheck.
WARNING: [replace-interpreter] Skipping non-existent file "bin/ods-auditor".
WARNING: [replace-interpreter] Skipping non-existent file
"bin/ods-kaspcheck".

I need to do it in the post-build/pre-install phase, then the script
files have been built/generated.

>> Btw. wouldn't it be nice if PKG_DEVELOPER=yes would catch this? (It
>> already catches missing interpreters in installed script files)
> 
> CHECK_WRKREF+= buildlink ? (from mk/check/check-wrkref.mk).

That didn't seem to trigger any warnings?
(I added it to the command line, eg. make PKG_DEVELOPER=yes
CHECK_WRKREF+=buildlink USE_DESTDIR=yes install)

/P

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.