tiger-devel
[Top][All Lists]
Advanced

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

[Tiger-devel] deb_nopackfiles speed up


From: Nicolas François
Subject: [Tiger-devel] deb_nopackfiles speed up
Date: Thu, 3 Jul 2003 03:51:22 +0200
User-agent: Mutt/1.5.4i

Hello all,

I think deb_nopackfile can be enhanced:
  - when used with the  Tiger_DPKG_Optimize option:
    currently, for each file, its filename is searched in one of the
    /var/lib/dpkg/info/*.list files or in /var/lib/dpkg/diversions

    This could be changed by appending all the /var/lib/dpkg/info/*.list
    files in a temporary file and then using a 'grep -x -F -v -f $temp_list'
    (idem for /var/lib/dpkg/diversions, use only one grep call instead
    of one for each file)

  - the '[ -f $file ] && [ ! -L $file  ]' check is redundant with the
    'find ... -type f'

On my system, it makes the script more than 10 times faster!

Here is a patch for this.


PS: Perhaps some would want the path '/bin/ /usr/bin/ /sbin/ /usr/sbin/
/lib/ /usr/X11R6/bin/' to be customizable in tigerrc (the maxpath could
also be set in an option)

PS2: in each scripts, the haveallcmds, haveallfiles, haveallvars calls are
repeated. Perhaps this calls could be donne before the
'["$Tiger_TESTMODE" = 'Y' ]' test, and the specific code for -t option
should be only:
[ "$Tiger_TESTMODE" = 'Y' ] && {
  message CONFIG init003c "" "$0: Configuration ok..."
  exit 0
}

This could avoid one of these tests to be forget in normal execution or
test mode.


hth
-- 
Nekral

Attachment: deb_nopackfiles.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]