[Zope-dev] Differing case for Buildout on Windows

2009-02-05 Thread Sidnei da Silva
I've been constantly bitten by a very annoying bug: depending on how
you call buildout on Windows, a full rebuild might be triggered, if
only the case differs. For example, all the following calls cause
buildout to think settings have changed and that things need to be
rebuilt. Note only the drive letter changes:

  c:\Python24\python.exe bin\buildout-script.py -c
c:\src\some-project\buildout.cfg
  c:\Python24\python.exe bin\buildout-script.py -c
C:\src\some-project\buildout.cfg
  C:\Python24\python.exe bin\buildout-script.py -c
c:\src\some-project\buildout.cfg
  C:\Python24\python.exe bin\buildout-script.py -c
C:\src\some-project\buildout.cfg

Now, I'm wondering what is the best way to fix it. I originally
thought of fixing the data as it comes into buildout, but that would
cause existing buildouts to all possibly trigger a rebuild. I'm now
thinking of fixing the place where buildout detects that the path has
been changed as to normalize the path.

Thoughts?

-- 
Sidnei da Silva
Canonical Ltd.
 Landscape · Changing the way you manage your systems
http://landscape.canonical.com
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Differing case for Buildout on Windows

2009-02-05 Thread Jim Fulton

On Feb 5, 2009, at 3:36 PM, Sidnei da Silva wrote:

 I've been constantly bitten by a very annoying bug: depending on how
 you call buildout on Windows, a full rebuild might be triggered, if
 only the case differs. For example, all the following calls cause
 buildout to think settings have changed and that things need to be
 rebuilt. Note only the drive letter changes:

  c:\Python24\python.exe bin\buildout-script.py -c
 c:\src\some-project\buildout.cfg
  c:\Python24\python.exe bin\buildout-script.py -c
 C:\src\some-project\buildout.cfg
  C:\Python24\python.exe bin\buildout-script.py -c
 c:\src\some-project\buildout.cfg
  C:\Python24\python.exe bin\buildout-script.py -c
 C:\src\some-project\buildout.cfg

 Now, I'm wondering what is the best way to fix it. I originally
 thought of fixing the data as it comes into buildout, but that would
 cause existing buildouts to all possibly trigger a rebuild. I'm now
 thinking of fixing the place where buildout detects that the path has
 been changed as to normalize the path.

 Thoughts?


I think it would be easiest to have buildout normalize the config path  
using os.path.normcase where it is input.

Jim

--
Jim Fulton
Zope Corporation


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )