diff mbox

[1/6] tcl: change BR2_PACKAGE_TCL_SHLIB_ONLY option

Message ID 51c43f9c.ebbbb40a.0abf.ffffba07@mx.google.com
State Superseded
Headers show

Commit Message

Richard Genoud June 21, 2013, 11:56 a.m. UTC
From: Richard Genoud <richard.genoud@gmail.com>

It's not convenient to have an option (defaulted to yes) that removes a
software.
For instance, usb_modeswitching_data needs the tclsh interpreter, so it
would have to un-select this option, but select TCL.

Having an option that adds the tclsh binary (defaulted to no to keep the
same behaviour) is way more convenient.
Moreover, it seems that it was intended liked that at the begining
because usb_modeswitching_data already selects BR2_PACKAGE_TCL_TCLSH
which wasn't declared anywhere.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 package/tcl/Config.in |   11 +++++------
 package/tcl/tcl.mk    |    2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)

Comments

Patrick Ziegler June 22, 2013, 9:15 a.m. UTC | #1
Dear Richard Genoud,

Am 21.06.2013 13:56, schrieb richard.genoud@gmail.com:
> From: Richard Genoud <richard.genoud@gmail.com>
> 
> It's not convenient to have an option (defaulted to yes) that removes a
> software.
> For instance, usb_modeswitching_data needs the tclsh interpreter, so it
> would have to un-select this option, but select TCL.
> 
> Having an option that adds the tclsh binary (defaulted to no to keep the
> same behaviour) is way more convenient.
> Moreover, it seems that it was intended liked that at the begining
> because usb_modeswitching_data already selects BR2_PACKAGE_TCL_TCLSH
> which wasn't declared anywhere.
> 
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>

If you change an existing option, please have a look on the
Config.in.legacy file. You should add the old option to that file, so
the user gets informed about the change.

Finally you should check if another package uses this option for its own
configuration and change this to the new option.
BR2_PACKAGE_TCL_SHLIB_ONLY is used by usb_modeswitch (not
usb_modeswitch_data anymore) to switch between the binary wrapper and
the tcl wrapper script.

Best regards
Patrick
Richard Genoud June 24, 2013, 7:49 a.m. UTC | #2
2013/6/22 Patrick Ziegler <patrick.ziegler@fh-kl.de>:
> Dear Richard Genoud,
>
> Am 21.06.2013 13:56, schrieb richard.genoud@gmail.com:
>> From: Richard Genoud <richard.genoud@gmail.com>
>>
>> It's not convenient to have an option (defaulted to yes) that removes a
>> software.
>> For instance, usb_modeswitching_data needs the tclsh interpreter, so it
>> would have to un-select this option, but select TCL.
>>
>> Having an option that adds the tclsh binary (defaulted to no to keep the
>> same behaviour) is way more convenient.
>> Moreover, it seems that it was intended liked that at the begining
>> because usb_modeswitching_data already selects BR2_PACKAGE_TCL_TCLSH
>> which wasn't declared anywhere.
>>
>> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
>
> If you change an existing option, please have a look on the
> Config.in.legacy file. You should add the old option to that file, so
> the user gets informed about the change.
>
> Finally you should check if another package uses this option for its own
> configuration and change this to the new option.
> BR2_PACKAGE_TCL_SHLIB_ONLY is used by usb_modeswitch (not
> usb_modeswitch_data anymore) to switch between the binary wrapper and
> the tcl wrapper script.
>
I didn't saw your patch on that !
It seems that you already correct the problem with the tclsh interpreter.
So I can drop this patch.

Thanks !

Best regards,
Richard.
diff mbox

Patch

diff --git a/package/tcl/Config.in b/package/tcl/Config.in
index 7a4d887..8af7980 100644
--- a/package/tcl/Config.in
+++ b/package/tcl/Config.in
@@ -16,12 +16,11 @@  config BR2_PACKAGE_TCL_DEL_ENCODINGS
 
 	  It saves approx. 1.4 Mb of space.
 
-config BR2_PACKAGE_TCL_SHLIB_ONLY
-	bool "install only shared library"
-	default y
+config BR2_PACKAGE_TCL_TCLSH
+	bool "Install also tclsh binary, not only the shared library"
+	default n
 	depends on BR2_PACKAGE_TCL
 	help
-	  Install only TCL shared library and not binary tcl
-	  interpreter(tclsh8.4).
+	  Install the TCL interpreter binary file(tclsh8.4).
 
-	  Saves ~14kb.
+	  Adds ~14kb.
diff --git a/package/tcl/tcl.mk b/package/tcl/tcl.mk
index 0c8fa33..ad23b80 100644
--- a/package/tcl/tcl.mk
+++ b/package/tcl/tcl.mk
@@ -27,7 +27,7 @@  define TCL_POST_INSTALL_CLEANUP
 	-if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" = "y" ]; then \
 	rm -Rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*; \
 	fi
-	-if [ "$(BR2_PACKAGE_TCL_SHLIB_ONLY)" = "y" ]; then \
+	-if [ "$(BR2_PACKAGE_TCL_TCLSH)" != "y" ]; then \
 	rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR); \
 	fi
 endef