<quote who="Jos? Fonseca">
> On 2002.05.14 00:14 Sergey V. Udaltsov wrote:
> >... I found another little buggy in the install.sh script
> >(in mach64 binary snapshots). This script moves existing binary objects
> >(for example, mach64.o) into dri-old prefix and restores them back when
> >asked. But if mach64.o had not not exist before the installation - it
> >just ignores this fact and does not remove the installed one. So Jose,
> >could you please fix this? Just check existence ("if [ -f ") of
> >$.../dri-old.$FILE - and "rm -f $.../$FILE".
>
> The problem is that the existence of those dri-old files are the only
> proof that anything was installed before. If we default to delete files
> when there is no backup then someone mistakenly trying to restore with no
> previous installation (or, e.g., accidental second restore) will delete
> all the drivers, and I think that this can be far more annoying than
> having a dummy mach64.o floating around.
But, if before you had:
fileA, fileB
then install
fileA, fileB, fileC
when you restore, it will copy the fileA and fileB back from dri-old, but
doesn't remove fileC... so you haven't really restored the system to the way
it was in that case.
Possibly, you can say that the stray file doesn't matter, since if they
didn't have it before, it won't be used in the config, but how about:
for FILE in *o; do
if [ -f $XF86_DRV_DIR/$FILE ]; then
mv -f $XF86_DRV_DIR/$FILE $XF86_DRV_DIR/dri-old.$FILE >&
$LOGFILE
rm -f $XF86_DRV_DIR/dri-old.n.$FILE >& $LOGFILE
else
rm -f $XF86_DRV_DIR/dri-old.$FILE >& $LOGFILE
touch $XF86_DRV_DIR/dri-old.n.$FILE >& $LOGFILE
fi
done
Then, to restore, check for the existence of dri-old.n.$FILE and remove the
installed version if that exists...
for FILE in *o; do
if [ -f $XF86_DRV_DIR/dri-old.$FILE ]; then
mv -f $XF86_DRV_DIR/dri-old.$FILE $XF86_DRV_DIR/$FILE >&
$LOGFILE
else
if [ -f $XF86_DRV_DIR/dri-old.n.$FILE ]; then
rm -f $XF86_DRV_DIR/$FILE >& $LOGFILE
# Clean up touch fileE
rm -f $XF86_DRV_DIR/dri-old.n.$FILE >& LOGFILE
fi
fi
done
Cheers,
J.
--
Jan Schmidt [EMAIL PROTECTED]
ENOSIG
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel