[OpenWrt-Devel] Remove requirement of an absolute path to the perl interpreter

Felix Fietkau nbd at openwrt.org
Sun May 10 08:48:28 EDT 2015


On 2015-05-10 14:16, Thomas Strobel wrote:
>>> diff --git a/include/feeds.mk b/include/feeds.mk
>>> index 695b03b..27f3e8f 100644
>>> --- a/include/feeds.mk
>>> +++ b/include/feeds.mk
>>> @@ -7,7 +7,7 @@
>>>  
>>>  -include $(TMP_DIR)/.packagefeeds
>>>  
>>> -FEEDS_AVAILABLE:=$(shell $(SCRIPT_DIR)/feeds list -n)
>>> +FEEDS_AVAILABLE:=$(perl $(SCRIPT_DIR)/feeds list -n)
>> I think this is the wrong place to make the change. Why not change
>> scripts/feeds to replace the #! line with:
>> #!/usr/bin/env perl
>>
>> - Felix
>>
>>
> Thanks for the review.
> Unfortunately, "/usr/bin/env" does not exist either. In NixOS there is
> no "/usr", no "/sbin", and only a "/bin/sh ->
> /nix/store/nixos_installation_specific_hash/bash". The absolute path to,
> e.g., "perl" or "env" is different for each installation of NixOS, so it
> can't be hard-coded into the build script. That's why I thought of
> calling "perl" directly from the PATH environment.
Then I think we should hold off on applying changes like the one you
proposed until we have a proper plan for dealing with the rest.
It needs to be possible to call ./scripts/feeds and similar scripts
directly.
How do other perl scripts on NixOS deal with that sort of stuff?

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list