ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tdk
tdk
Re: [TDK] Why does teacup install of zip types add underscores?
by Andreas Kupries other posts by this author
Jun 1 2007 8:26AM messages near this date
view in the new Beta List Site
[TDK] Why does teacup install of zip types add underscores? | Re: [TDK] Why does teacup install of zip types add underscores?
Intentional behaviour.

To be able to handle packages with ':' in their name, i.e. for example

    fileutil::mimetypes

I convert colons to underscores for the directory name. While unix has no
problem with the colon in a filename other platforms do forbid that
character. Windows for example, because it needs colon as part of drive
letters. Just doing that conversion however could cause a clash between the
directory for packages like 'fileutil::mimetypes' and 'fileutil__mimetypes'.
Rare, but possible. To avoid this type of conflict I look for underscores in
package names as well and quote them too, again using underscore.

And now I see that there is a potential conflict. Now the clash would be the
dir names of  'test::util' and 'test_util' ... I have to think again about
this ...

--
        Andreas Kupries <andreask@[...].com> 
        Developer @ http://www.ActiveState.com
        Tel: +1 778-786-1122

  -----Original Message-----
  From: tdk-bounces@[...].com
[mailto:tdk-bounces@[...].com]On Behalf Of Brandt, Joe
  Sent: Friday, June 01, 2007 7:10 AM
  To: tdk@[...].com
  Subject: [TDK] Why does teacup install of zip types add underscores?


  If I create a zip teapot archive of a simple tcl package, that has an
underscore in its name (test_utils).  Why when I install it using teacup
does it show up with a directory name test__utils (2 underscores)?  Is there
a reason for this, or is this a bug?



  Here is directory structure from inside my teacup installation repository.



  ./package/tcl/lib/pkgIndex.tcl

  ./package/tcl/lib/pkgIndex.index

  ./package/tcl/lib/test__utils-0.0.10

  ./package/tcl/lib/test__utils-0.0.10/pkgIndex.tcl

  ./package/tcl/lib/test__utils-0.0.10/teapot.txt

  ./package/tcl/lib/test__utils-0.0.10/test_utils.tcl





  NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient, please contact the sender by reply email and
destroy all copies of the original message.
Thread:
Joe Brandt
Andreas Kupries
Hemang Lavana
Andreas Kupries

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved