drop tcl/tclsh dependency

Bug #679256 reported by Jani Monoses
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usb-modeswitch (Debian)
In Progress
Undecided
Unassigned
usb-modeswitch (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: usb-modeswitch

Rewriting /usr/sbin/usb_modeswitch_dispatcher in a compiled language would make the package not depend on tclsh, a move that would save livecd/disk space and would be a slight help for boot speed as well when such hardware is present.

Revision history for this message
Didier Raboud (odyx) wrote :

Good idea, but patches are really welcome !

(As package maintainer, I have not enough knowledge nor time to do this; I will let upstream speak up himself).

Revision history for this message
Jani Monoses (jani) wrote :

Not my idea actually, it came up in the More LiveCD space optimizations on ubuntu-devel, I just filed it for reference.
https://lists.ubuntu.com/archives/ubuntu-devel/2010-November/031950.html
Upstream also commented in that thread althought it is unclear if he will do the rewrite in Vala (seemed ok with Python)

Revision history for this message
Josua Dietze (digidietze) wrote :

After some attempts with Python I realized that more and more additional extensions had to be loaded to do really simple stuff. It annoyed me.

I have decided to stick with Tcl, but I made the script work with JIMSH (known from Puppy Linux) which is a small and fast Tcl interpreter with a reduced subset of commands, still sufficient for what I'm doing. Not unlike Dash vs. Bash.

I will offer two source packages from now on. One will contain the jimsh source to be made and installed alongside the other utilities.

The compressed size of jimsh is 86 kB. All necessary components are integrated in the binary.

Sorry, I will not start doing all that string mangling in C. Neither will I give up the flexibility of scripting.
BTW, as I have stated elsewhere, space constraints are a valid argument - execution speed is not. The switching process is firmware dependent and may take one to 20 seconds. The startup time for the tool to initiate that process can be neglected.

Josua Dietze
(upstream)

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I notice jimsh in and of itself doesn't seem to be packaged separately in Debian/Ubuntu. I think it would be better to have it as a separate package so that other scripts could benefit from it; there are certainly other things in default install which depend on tcl.

Revision history for this message
Martin Pitt (pitti) wrote :

Seems Jani quietly wrote https://code.launchpad.net/~jani/usb-modeswitch/vala as an initial port. I haven't tested or looked at it yet at all, just pointing it out for interested people.

Revision history for this message
Jani Monoses (jani) wrote :

It is 'very' initial as only a few functions and helpers are implemented but may be a good starting point. I have no modems to test with. I found Vala quite verbose though for dealing with files, sometimes wishing for grep/echo :)

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Closing as Fix Released since we now have usb-modeswitch dispatcher ported to C in Ubuntu.

I'm setting this to In progress in Debian; since we're still working on pushing this to Debian.

Changed in usb-modeswitch (Ubuntu):
status: New → Fix Released
Changed in usb-modeswitch (Debian):
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.