Sigh... can we not just delete gnome-cleanup please...?

Laca

On Tue, 2009-01-06 at 20:32 -0600, Brian Cameron wrote:
> The following patch fixes bug #6635943.
> 
> gnome-cleanup currently deletes the $HOME/.gstreamer-0.10 directory.
> However, codeina installs plugins to $HOME/.gstreamer-0.10/plugins.  We
> don't want to delete any plugins the user has downloaded, so we should
> instead delete only $HOME/.gstreamer-0.10/registry since we do want to
> remove the registry so it gets rebuilt when gnome-cleanup is run.
> 
> The above issue is a fairly serious bug, but some other minor issues
> that should be fixed as well include the following:
> 
> Note that GNOME programs use g_get_tmp_dir to figure out where to put
> the files.  gnome-cleanup currently supports deleting files in the
> var/tmp and the $TMP directory, but g_get_tmp_dir can also return the
> value of $TEMPDIR and $TEMP, so we should remove any files in those
> directories as well.  We should also delete gvfs-${LOGNAME} files that
> are in the tmp directory.
> 
> Lastly we should cleanup $HOME/.dbus just to remove all the files that
> could possibly cause the user problems and return the user back to a
> fresh install environment.
> 
> Brian
> 
> ----
> 
> Index: gnome-cleanup
> ===================================================================
> --- gnome-cleanup       (revision 12599)
> +++ gnome-cleanup       (revision 17092)
> @@ -63,23 +63,28 @@
>      exit 1
>   fi
> 
> -# GNOME 2.x files
> +# tmp files
>   #
> -gnome_files="$USRHOME/.gconf $USRHOME/.gconfd $USRHOME/.gnome 
> $USRHOME/.gnome-desktop $USRHOME/.gnome2 $USRHOME/.gnome2_private 
> $USRHOME/.metacity $USRHOME/.nautilus $USRHOME/.esd_auth $USRHOME/.gtkrc 
> $USRHOME/.gtkrc-1.2-gnome2 $USRHOME/.nautilus-metafile.xml 
> $USRHOME/.gstreamer-0.10 $USRHOME/.local/share"
> +tmp_dirs="/var/tmp $TEMPDIR $TMP $TEMP"
> +tmp_files=""
> 
> -# GNOME 1.4 files
> -#
> -gnome_14_files="$USRHOME/.gimp-1.2 $USRHOME/.gnome-help-browser 
> $USRHOME/.gnome_private $USRHOME/.thumbnails $USRHOME/Nautilus"
> +tmp_cleanup="gconfd-${LOGNAME} mapping-${LOGNAME} orbit-${LOGNAME} 
> gvfs-${LOGNAME}*"
> 
> -# /var/tmp files
> +for dir in $tmp_dirs; do
> +   for cleanup in $tmp_cleanup; do
> +       tmp_files="$dir/$cleanup $tmp_files"
> +   done
> +done
> +
> +# GNOME 2.x files
>   #
> -var_tmp_dirs1="/var/tmp/gconfd-${LOGNAME} /var/tmp/mapping-${LOGNAME} 
> /var/tmp/orbit-${LOGNAME}"
> +gnome_files="$USRHOME/.dbus $USRHOME/.gconf $USRHOME/.gconfd 
> $USRHOME/.gnome $USRHOME/.gnome-desktop $USRHOME/.gnome2 
> $USRHOME/.gnome2_private $USRHOME/.metacity $USRHOME/.nautilus 
> $USRHOME/.esd_auth $USRHOME/.gtkrc $USRHOME/.gtkrc-1.2-gnome2 
> $USRHOME/.nautilus-metafile.xml $USRHOME/.gstreamer-0.10/registry.* 
> $USRHOME/.local/share"
> 
> -# Also check the TMP environment variable for /var/tmp files.
> +# GNOME 1.4 files
>   #
> -var_tmp_dirs2="$TMP/gconfd-${LOGNAME} $TMP/mapping-${LOGNAME} 
> $TMP/orbit-${LOGNAME}"
> +gnome_14_files="$USRHOME/.gnome-help-browser $USRHOME/.gnome_private 
> $USRHOME/.thumbnails $USRHOME/Nautilus"
> 
> -has_files=`/bin/ls -1d $gnome_files $gnome_14_files $var_tmp_dirs1 
> $var_tmp_dirs2 2> /dev/null`
> +has_files=`/bin/ls -1d $tmp_files $gnome_files $gnome_14_files 2> 
> /dev/null`
> 
>   if [ ! -z "$has_files" ]
>   then


Reply via email to