Re: [Dri-devel] little fix for install.sh
Sergey, sorry for replying only now. For some time I was planning to apply That's OK. Everyone understands that actual work on the driver has incomparable higher priority. 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. I see the point. My only concern is that when I do restore - I actually do not change my XF86Config in the DRI section. So I am a bit afraid that XFree would try to use the module (without other parts of the snapshot). If you tell me it's not a danger - I am ready to forget about all this stuff. Cheers, Sergey PS Hope you won't forget to announce AGP-mapping-enabled binaries - I am eager to hand my laptop. ___ 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
Re: [Dri-devel] little fix for install.sh
On 2002.05.15 22:34 Jan Schmidt wrote: quote who=Jos? Fonseca ... 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 file 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. Yep. I know.. but although the fileC remains it has no effect. This affects mostly new drivers which aren't supported in the stock distro (e.g., Mach64). The orginal fileA and fileB have no knowledge of the fileC so it won't be used. 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 Yes, this would do it. When I have some time I'll use your ideas to make an install and uninstall bash functions to be reused across the install.sh script. Then I'll also try to address another problem which is to avoid that two consequtive installs irreversibily remove the original drivers... José Fonseca ___ 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
Re: [Dri-devel] little fix for install.sh
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. Sergey, sorry for replying only now. For some time I was planning to apply the fix you suggested but time has been rather short lately. When I finally was to do it and understood what you were suggesting I must say that I disagreed. 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. José Fonseca ___ 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
Re: [Dri-devel] little fix for install.sh
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
[Dri-devel] little fix for install.sh
Hi all I know, this is going to sound stupid in the list discussing textures, mappings etc.. but 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. Cheers, Sergey PS It's not easy but sometimes interesting to follow the Texture management threads. Also, the feeling that you are ... well, one step, from AGP mapping in Mach64... - it's really exciting!:) ___ 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