This is the mail archive of the
mailing list for the Cygwin project.
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: cygwin-apps at cygwin dot com
- Date: Mon, 21 Jun 2004 09:26:42 -0400 (EDT)
- Subject: base-files request
- Reply-to: cygwin-apps at cygwin dot com
Would it be possible to add the base-files package version to the header
comment of all the scripts in base-files? It would then be apparent which
version of the base-files package each script came from.
Another thing that was talked about was checking whether /etc/profile was
edited and updating it if it wasn't (same probably goes for other
/etc/defaults scripts). One way to do this is to compare /etc/profile
with /etc/defaults/etc/profile in the preremove script, and if it's the
same, remove /etc/profile, i.e.,
if /bin/cmp -s /etc/defaults/etc/profile /etc/profile; then
echo "/etc/profile was modified, leaving as-is"
elif [ $? -eq 127 ]; then
echo "diffutils must have been uninstalled, sorry"
The contortions above are needed to correctly handle the case when
"diffutils" is being upgraded as well. Of course, upgrading "fileutils"
will cause "rm" to fail, and no postinstall script will work if either
"cygwin" or "bash" is upgraded, but at least the above won't remove
/etc/profile if /bin/cmp is missing (as the first obvious choice,
if ! /bin/cmp -s /etc/defaults/etc/profile /etc/profile; then
BTW, a question to setup developers: did we ever figure out how to get
preremove scripts to run reliably?
|\ _,,,---,,_ firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ email@example.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton