On Sun, 25 Oct 2009 15:22:33 -0500 Joseph Rawson wrote:

> On Sunday 25 October 2009 13:24:42 you wrote:
[...]
> > I don't think that the Ruby Regexp class has some hard-coded limitation
> > for the regular expression length.  Can it be that it failed because it
> > went out of available memory?
> > What is the total capacity of the main memory on your system?
> > 
> I have 3G of ram, and 4G of swap.  Enough to hibernate if I ever get it 
> working right on this laptop.  Before running aptitude, I quit most of the 
> applications and had plenty of spare ram.  There was less than 500M in swap, 
> also.

It seems that it didn't run out of memory.
I searched the web about this "regular expression too big" error
message: it turns out that Ruby Regexp really seems to have a
hard-coded limitation:
https://www.ruby-forum.com/topic/87932

Ryan, the above forum thread is about a problem which is pretty similar
to what must be done by libdpkg-ruby1.8 in its Packages class's
initialize() method: compare with
/usr/lib/ruby/1.8/debian.rb:905
One of the proposed solutions was to replace the regexp matching with a
hash look-up:
https://www.ruby-forum.com/topic/87932#166516

It seems to me that this could be done with package names in the
Packages class's initialize() method: this way the Ruby Regexp
hard-coded limitation could be worked around.

Ryan, what do you think?


[...]
> > I think that, if there's a way to cope with this issue (maybe by
> > splitting too long regular expressions into partial regular expressions
> > based on shorter package sub-lists?), it should be implemented at the
> > libdpkg-ruby1.8 level, rather than at the apt-listbugs level.
> > 
> The regex created by apt-listbugs is a long concatenation of "or's", and it 
> should be easy to split those up.  I would assume it would be more difficult 
> to split an arbitrary regex on the ruby level because it would be difficult 
> to 
> determine where to split the regex, or even if it was possible to do so.  I'm 
> no expert here, just adding my two cents. :)

The regexp is not directly created by apt-listbugs; it's created by
libdpkg-ruby1.8, instead.
That's why I think the issue can be worked around in libdpkg-ruby1.8 ...



-- 
 New location for my website! Update your bookmarks!
 http://www.inventati.org/frx
..................................................... Francesco Poli .
 GnuPG key fpr == C979 F34B 27CE 5CD8 DC12  31B5 78F4 279B DD6D FCF4

Attachment: pgpSWK0sZYSJc.pgp
Description: PGP signature

Reply via email to