Looks good, thanks. I think it should go into the stable branch too. Laca
On Thu, 2009-01-15 at 17:10 -0600, Brian Cameron wrote: > Laca: > > > Since /tmp is shared, I suggest you include the user name and maybe > > even the date/time in the file name to avoid clashes. You should also > > check if tar returned an error. > > > > In the message at the end, it would be nice to tell the users where > > to go for filing bugs (d.o.o?) and a warning that these files may > > include sensitive information. > > Is this patch better. I think it addresses your concerns. For > example it now creates files like: > > /tmp/gnome-cleanup-username-2009-01-15-17:01:53.tar > > If so, should this just go into spec-files SVN head or also to the > stable branch? > > Brian > plain text document attachment (cleanup.diff) > Index: gnome-cleanup > =================================================================== > --- gnome-cleanup (revision 17187) > +++ gnome-cleanup (working copy) > @@ -96,6 +96,7 @@ > done > > has_files=`/bin/ls -d $tmp_files $gnome_files $gnome_14_files 2> /dev/null` > +has_user_files=`/bin/ls -d $gnome_files $gnome_14_files 2> /dev/null` > > if [ ! -z "$has_files" ] > then > @@ -106,10 +107,26 @@ > > if [ "$input" = "Y" -o "$input" = "y" ] > then > + # Back up files for debugging. > + date=`/usr/bin/date +%F-%H:%M:%S` > + tarfile="/tmp/gnome-cleanup-$LOGNAME-$date.tar" > + /usr/bin/tar -cf $tarfile $has_user_files > + > /bin/rm -fR $has_files > rc=$? > if [ $rc = 0 ]; then > - echo "Removed..." > + echo "\nRemoved..." > + echo "\nThe files removed have been backed up to the following > file:" > + echo "\n$tarfile" > + echo "\nIf you ran this program to resolve an issue that was caused" > + echo "by the GNOME desktop not functioning properly, then please" > + echo "report a bug at the following website:" > + echo "\nhttp://defect.opensolaris.org/" > + echo "\nNote that configuration files may contain sensitive" > + echo "information about you. If this is a concern, then it is best" > + echo "to not attach this tar file to a publicly visible bug report." > + echo "If this is not an issue, then attaching this file would help" > + echo "to debug the problem." > else > echo "Error removing files..." > fi
