X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_NUMERIC_HELO,SARE_SUB_ENC_UTF8,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Achim Gratz Subject: Re: [ANNOUNCEMENT] New package: =?utf-8?b?X2F1dG9yZWJhc2Uu?= Call rebaseall after installing new or updated DLLs Date: Wed, 18 Apr 2012 13:36:46 +0000 (UTC) Lines: 57 Message-ID: References: <87fwcslaa6 DOT fsf AT Rainer DOT invalid> <20120329080315 DOT GZ30721 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Corinna Vinschen cygwin.com> writes: > Feel free to participate in further development of the rebase tool. > Patches for useful functionality is always welcome. The right forum is > the cygwin-apps list. Gmane still has cygwin-apps read-only, so I hope it is acceptable if I post it here until that is resolved... what I have implemented is to extract the list of files to rebase into /etc/rebase/rebase_lst just like rebaseall would do. Any extra files to rebase can be placed into list(s) in /etc/rebase/user.d (e.g. perl5.10.1.lst as produced by perlrebase). Instead of rebuilding the whole list every time, just extract from those package lists that are newer than the rebase_lst. The update will be very fast even on systems which are struck by a slow filesystem (in contrast to the initial build of the list, which is in essence what the current autorebase script _always_ does). ---8<----->8--- #!/bin/ash rebase_lst () { g="/etc/rebase/rebase_lst" if [ ! -e "${g}" ]; then touch -t 7001010000 /etc/rebase/rebase_lst fi for f in $( find /etc/setup -name '*.lst.gz' -newer ${g} ); do echo "Updating rebase information from ${f} in ${g}." cat >>"${g}" <>"${g}" done mv "${g}" "${g}.old" cat >"${g}" <> "${g}" chmod 444 "${g}" } Suffixes='dll|so|oct' rebase_lst ---8<----->8--- The two directories in /etc and the /bin/rebaselst script are dropped in via a package. In the installer script I then do something like that: %CYGWIN_INST%\bin\ash -c "PATH=/bin cd /etc/rebase/user.d&&/bin/perlrebase" %CYGWIN_INST%\bin\ash -c "PATH=/bin rebaselst" %CYGWIN_INST%\bin\ash -c "PATH=/bin rebase -s -v -T /etc/rebase/rebase_lst" I'll probably roll this into another script, but for now this seems to work nicely enough. Achim. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple