[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: checksumming debian/rules



On Mon, 2009-08-03 at 10:30 +0300, Damyan Ivanov wrote:
> Can this number (700+) be reduced? What about if the sha1 is 
> calculated after stripping all whitespace?

I don't think it can be reduced by very much, but...

        for file in */debian/rules; do \
          hash=`sed '/^\s*$/d' $file | sha1sum | sed 's/ -$//'`; \
          cp -n $file ../hashes/$hash; \
          sed -i '/^\s*$/d' ../hashes/$hash; done

Stripping blank lines (plus 'svn up' in my working copy) gives 714
files.  This is more useful than it looks, because the dh7 dh-make-perl
template contains a blank line.  This isn't quite /all/ whitespace...

There might be a possible improvement to be made by replacing the
package name with a constant string (to consolidate some of the cdbs
varieties...)

> My only hesitation about this is that going over 1000 packages one by 
> one will take a lot of effort if done in one push. Converting only 
> when preparing new upload will both be less tedious and easier to 
> test. This is not to stop you or anyone else who wants to do it :)

Yeah. :(  I think there are ~300 packages which can be updated
automatically, actually... it's just that there are 662 packages with
their own unique debian/rules.  Maybe dh-make-perl could print a
warning, but not attempt to update them.

-- 
Tim Retout <tim@retout.co.uk>


Reply to: