On Mon, Oct 26, 2009 at 12:21:28AM +0100, Francesco Poli wrote: > 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 >
huh, I suppose that's one way...not sure why a hash lookup would be faster than .include?, but ya, I'll consider that option as well. > 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've already replied, tho you seem to have not seen this mail... > > [...] > > > 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 ... > > and that's why I've reassigned the bug already.. -- _________________________ Ryan Niebur ryanrya...@gmail.com
signature.asc
Description: Digital signature