On Wed, 2008-10-29 at 18:50 +0000, Adam D. Barratt wrote: > To be honest a .+? would probably work, given that we're throwing away > the distribution anyway. I'm guessing that the regex was probably > adapted from a version of dpkg's parser at some point, so I'm tempted to > update the above to more closely match what dpkg actually looks for now > - policy doesn't put any restrictions on distribution names but dpkg > constrains them to the same set of characters as valid package names.
Yeah, I think there is another failure there as policy allows multiple distributions to be supplied (though that will be very rare, as there is little use). .+ is probably the best thing to do. The changelog format means that it's pretty easy to get the package name and version ^(\w+) \((.+)\) might be a good regex to use (assuming that means what I think). > dpkg-parsechangelog (and the perl modules behind it) have only fairly > recently (in Debian terms - 1.14.16) acquired the ability to select only > the "top n" entries from a changelog, which is why I imagine they > weren't used before; that and the fact that reading the file directly > saves a fork. > > At least in the short term I'm therefore probably just going to update > the regex to match dpkg's current changelog parsing. Fair enough, that's obviously your decision, I just wanted to bring up the possibility. Thanks, James -- To unsubscribe, send mail to [EMAIL PROTECTED]
