You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Patrick Mayweg <ma...@qint.de> on 2004/05/30 15:14:34 UTC

[PATCH] In build system hashing problem.

Hi,
In the building system there is the class "DependencyNode" in the file 
build/generator/gen_base.py. This class defines the methods __hash__ and 
__cmp__,which uses the member "filename" for hashing and comparision. 
The derived class "TargetJava"  set  "filename" to  '' so  all  objects  
of  the derived  classes  "TargetJavaClasses"  and  "TargetJavaHeaders"  
are for hashing and comparision the same objects. This is wrong. The 
patch uses the member "name" if the member "filename"  contains an empty 
string for hashing and comparision.

Patrick

[[[
 * build/generator/gen_base.py
   DependencyNode.__hash__
     use member name of member filename contains an empty string
   DependencyNode.__cmp__
     use member name of member filename contains an empty string
]]]

Re: [PATCH] In build system hashing problem.

Posted by Patrick Mayweg <ma...@qint.de>.
Hi Justin,

Patrick Mayweg wrote:

> Hi Justin,
>
> Justin Erenkrantz wrote:
>
>> On Mon, May 31, 2004 at 07:31:25AM +0200, Patrick Mayweg wrote:
>>  
>>
>>> Setting the filename to the name was my first try.  But that does 
>>> generate more problems. The windows project file generation uses the 
>>> filename too. That's why I ended up with that patch.
>>>   
>>
>>
>> Could we flip the cmp and hash to go off name instead of filename?  
>> Or, could
>> there be a collision there that wouldn't happen otherwise?
>>  
>>
> Unfortunately not. Not all DependencyNodes have a name  (e.g. SourceFile)
>
>> If not, then, yah, your patch should go in and we can fix it up later, I
>> guess.  *sigh*  -- justin
>>  
>>
> In the moment I do not know  why setting the filename ended up in the 
> project file. I will have a look. Could you confirm the setting the 
> filename does start any problems with the non-windows builds?
> Patrick
>
I have tried setting the filename and have a problem when trying to run 
"make install-javahl" on linux. So I would suggest going with my 
original patch.
Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] In build system hashing problem.

Posted by Patrick Mayweg <ma...@qint.de>.
Hi Justin,

Justin Erenkrantz wrote:

>On Mon, May 31, 2004 at 07:31:25AM +0200, Patrick Mayweg wrote:
>  
>
>>Setting the filename to the name was my first try.  But that does 
>>generate more problems. The windows project file generation uses the 
>>filename too. That's why I ended up with that patch.
>>    
>>
>
>Could we flip the cmp and hash to go off name instead of filename?  Or, could
>there be a collision there that wouldn't happen otherwise?
>  
>
Unfortunately not. Not all DependencyNodes have a name  (e.g. SourceFile)

>If not, then, yah, your patch should go in and we can fix it up later, I
>guess.  *sigh*  -- justin
>  
>
In the moment I do not know  why setting the filename ended up in the 
project file. I will have a look. Could you confirm the setting the 
filename does start any problems with the non-windows builds?
Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] In build system hashing problem.

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Mon, May 31, 2004 at 07:31:25AM +0200, Patrick Mayweg wrote:
> Setting the filename to the name was my first try.  But that does 
> generate more problems. The windows project file generation uses the 
> filename too. That's why I ended up with that patch.

Could we flip the cmp and hash to go off name instead of filename?  Or, could
there be a collision there that wouldn't happen otherwise?

If not, then, yah, your patch should go in and we can fix it up later, I
guess.  *sigh*  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] In build system hashing problem.

Posted by Patrick Mayweg <ma...@qint.de>.
Hi Justin,

Justin Erenkrantz wrote:

>On Sun, May 30, 2004 at 05:14:34PM +0200, Patrick Mayweg wrote:
>  
>
>>Hi,
>>In the building system there is the class "DependencyNode" in the file 
>>build/generator/gen_base.py. This class defines the methods __hash__ and 
>>__cmp__,which uses the member "filename" for hashing and comparision. 
>>The derived class "TargetJava"  set  "filename" to  '' so  all  objects  
>>of  the derived  classes  "TargetJavaClasses"  and  "TargetJavaHeaders"  
>>are for hashing and comparision the same objects. This is wrong. The 
>>patch uses the member "name" if the member "filename"  contains an empty 
>>string for hashing and comparision.
>>    
>>
>
>At one point, filename needed to be blank to avoid generating some false make
>file rules that weren't required for Java files.  I think I eventually fixed
>the 'root' cause later on - so it may be possible to just set filename to name
>and see if it builds.  -- justin
>  
>
Setting the filename to the name was my first try.  But that does 
generate more problems. The windows project file generation uses the 
filename too. That's why I ended up with that patch.

Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] In build system hashing problem.

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Sun, May 30, 2004 at 05:14:34PM +0200, Patrick Mayweg wrote:
> Hi,
> In the building system there is the class "DependencyNode" in the file 
> build/generator/gen_base.py. This class defines the methods __hash__ and 
> __cmp__,which uses the member "filename" for hashing and comparision. 
> The derived class "TargetJava"  set  "filename" to  '' so  all  objects  
> of  the derived  classes  "TargetJavaClasses"  and  "TargetJavaHeaders"  
> are for hashing and comparision the same objects. This is wrong. The 
> patch uses the member "name" if the member "filename"  contains an empty 
> string for hashing and comparision.

At one point, filename needed to be blank to avoid generating some false make
file rules that weren't required for Java files.  I think I eventually fixed
the 'root' cause later on - so it may be possible to just set filename to name
and see if it builds.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org