* RE: FW: [BUG] SCons 2.3.0 sometimes cannot find files
[not found] ` <543C29B9.8040409@acm.org>
@ 2014-10-15 5:50 ` Pavel Fedin
2014-10-15 16:30 ` David Rothenberger
2014-10-21 18:41 ` David Rothenberger
0 siblings, 2 replies; 4+ messages in thread
From: Pavel Fedin @ 2014-10-15 5:50 UTC (permalink / raw)
To: 'cygwin'; +Cc: daveroth
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
Hello!
> I saw the email, but haven't had time to look into it. Your reduced
> test case didn't make it, either.
How ? The idea is to save it under 'test.py' name and run as 'python
test.py'. You should get FAIL with the original version and PASS if you
apply the fix.
> So, if you think you know the solution and can provide a patch, I can
> roll a fixed package pretty quickly.
Ok. The patch is attached.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
[-- Attachment #2: always-use-normcase.patch --]
[-- Type: application/octet-stream, Size: 599 bytes --]
--- origsrc/scons-2.3.0/engine/SCons/Node/FS.py 2013-03-03 18:48:39.000000000 +0400
+++ src/scons-2.3.0/engine/SCons/Node/FS.py 2014-10-10 18:50:41.092778200 +0500
@@ -1841,8 +1841,8 @@ class Dir(Base):
for entry in map(_my_normcase, entries):
d[entry] = True
self.on_disk_entries = d
+ name = _my_normcase(name)
if sys.platform == 'win32':
- name = _my_normcase(name)
result = d.get(name)
if result is None:
# Belt-and-suspenders for Windows: check directly for
[-- Attachment #3: Type: text/plain, Size: 218 bytes --]
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FW: [BUG] SCons 2.3.0 sometimes cannot find files
2014-10-15 5:50 ` FW: [BUG] SCons 2.3.0 sometimes cannot find files Pavel Fedin
@ 2014-10-15 16:30 ` David Rothenberger
2014-10-16 12:50 ` Pavel Fedin
2014-10-21 18:41 ` David Rothenberger
1 sibling, 1 reply; 4+ messages in thread
From: David Rothenberger @ 2014-10-15 16:30 UTC (permalink / raw)
To: cygwin
On 10/14/2014 10:50 PM, Pavel Fedin wrote:
> Hello!
>
>> I saw the email, but haven't had time to look into it. Your reduced
>> test case didn't make it, either.
>
> How ? The idea is to save it under 'test.py' name and run as 'python
> test.py'. You should get FAIL with the original version and PASS if you
> apply the fix.
The original email you sent did not include any attachment. Can you
please reply to this email with the test case attached.
>> So, if you think you know the solution and can provide a patch, I can
>> roll a fixed package pretty quickly.
>
> Ok. The patch is attached.
Thanks. Hopefully I can get to this over the weekend.
Regards,
David
--
David Rothenberger ---- daveroth@acm.org
Always do right. This will gratify some people and astonish the rest.
-- Mark Twain
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: FW: [BUG] SCons 2.3.0 sometimes cannot find files
2014-10-15 16:30 ` David Rothenberger
@ 2014-10-16 12:50 ` Pavel Fedin
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Fedin @ 2014-10-16 12:50 UTC (permalink / raw)
To: cygwin; +Cc: daveroth
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
Hello!
> The original email you sent did not include any attachment. Can you
> please reply to this email with the test case attached.
Ops, sorry. I forgot to attach the file. Here it is.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
[-- Attachment #2: test.py --]
[-- Type: text/plain, Size: 1376 bytes --]
import os
import sys
# Cygwin's os.path.normcase pretends it's on a case-sensitive filesystem.
_is_cygwin = sys.platform == "cygwin"
if os.path.normcase("TeSt") == os.path.normpath("TeSt") and not _is_cygwin:
def _my_normcase(x):
return x
else:
def _my_normcase(x):
return x.upper()
class Entry:
def entry_exists_on_disk(self, name):
try:
d = self.on_disk_entries
except AttributeError:
d = {}
try:
entries = os.listdir(self.abspath)
except OSError:
pass
else:
for entry in map(_my_normcase, entries):
d[entry] = True
self.on_disk_entries = d
if sys.platform == 'win32':
name = _my_normcase(name)
result = d.get(name)
if result is None:
# Belt-and-suspenders for Windows: check directly for
# 8.3 file names that don't show up in os.listdir().
result = os.path.exists(self.abspath + OS_SEP + name)
d[name] = result
return result
else:
return name in d
test_entry = Entry()
test_entry.abspath = '.'
result = test_entry.entry_exists_on_disk('test.py')
if result:
print 'PASS'
else:
print 'FAIL'
[-- Attachment #3: Type: text/plain, Size: 218 bytes --]
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FW: [BUG] SCons 2.3.0 sometimes cannot find files
2014-10-15 5:50 ` FW: [BUG] SCons 2.3.0 sometimes cannot find files Pavel Fedin
2014-10-15 16:30 ` David Rothenberger
@ 2014-10-21 18:41 ` David Rothenberger
1 sibling, 0 replies; 4+ messages in thread
From: David Rothenberger @ 2014-10-21 18:41 UTC (permalink / raw)
To: cygwin
Pavel Fedin wrote:
> Hello!
>
>> I saw the email, but haven't had time to look into it. Your reduced
>> test case didn't make it, either.
>
> How ? The idea is to save it under 'test.py' name and run as 'python
> test.py'. You should get FAIL with the original version and PASS if you
> apply the fix.
>
>> So, if you think you know the solution and can provide a patch, I can
>> roll a fixed package pretty quickly.
>
> Ok. The patch is attached.
The issue you reported is fixed in the 2.3.4 scons release. There was
already a fix upstream for the issue.
--
David Rothenberger ---- daveroth@acm.org
Trespassers will be shot. Survivors will be SHOT AGAIN!
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-21 18:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <004101cfe6a8$fac2d340$f04879c0$%fedin@samsung.com>
[not found] ` <543C29B9.8040409@acm.org>
2014-10-15 5:50 ` FW: [BUG] SCons 2.3.0 sometimes cannot find files Pavel Fedin
2014-10-15 16:30 ` David Rothenberger
2014-10-16 12:50 ` Pavel Fedin
2014-10-21 18:41 ` David Rothenberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).