gparted_shell: semi-fix for refershing desktop icons

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

gparted_shell: semi-fix for refershing desktop icons

JakeSFR
Since the new pup_event appeared it sometimes happens that after reformatting a partition in GParted, the desktop icons are refreshed, but sometimes (especially if it comes for internal drives) they aren't, for unknown reason to me.

This command is used in puppyinstaller and bootflash to refresh them, but not in gparted_shell (perhaps BK's oversight?).
echo change > /sys/block/<device>/uevent

There's only:
echo "$THEDRIVE" > /tmp/pup_event_frontend_block_request
which seems to be a leftover from the old pup_event.

It's not the part of the woof-CE, so can't fix it directly.
Here's the diff:
--- old/gparted_shell	2014-06-23 22:17:38.232789235 +0200
+++ new/gparted_shell	2014-06-23 22:17:15.766122861 +0200
@@ -69,7 +69,7 @@
 DRVSTATE2="`probepart | grep "$tdPATTERN"`"
 if [ "$DRVSTATE1" != "$DRVSTATE2" ];then
  sync
- echo "$THEDRIVE" > /tmp/pup_event_frontend_block_request
+ echo change > /sys/block/${THEDRIVE}/uevent
 fi
 
 ###END###

The only downside of this fix is that sometimes, after formatting, desktop icons will be refreshed twice...but I think *twice* is way better than *never*. ;)

Greetings!
Reply | Threaded
Open this post in threaded view
|

Re: gparted_shell: semi-fix for refershing desktop icons

JakeSFR
Wait a minute...
gparted_shell IS in woof-CE and, moreover, it already has this change implemented!
https://github.com/puppylinux-woof-CE/woof-CE/blob/testing/woof-code/packages-templates/gparted/usr/sbin/gparted_shell#L84

So, how's that possible, that the final product still has:
echo "$THEDRIVE" > /tmp/pup_event_frontend_block_request
?

The gparted pets from http://distro.ibiblio.org/puppylinux/pet_packages-slacko14.1/
also contain (the old) /usr/sbin/gparted_shell, which apparently overwrites the one from woof during building.

Greetings!
Reply | Threaded
Open this post in threaded view
|

Re: gparted_shell: semi-fix for refershing desktop icons

Karl Godt
Administrator
In reply to this post by JakeSFR
/sbin/pup_event_frontend_d does it for me

Just want to note, that a " DAEMON " should have
start|stop|restart
parameters .

trap "exit" INT QUIT ABRT KILL TERM
BTW : Does a BACON compiled binary needs to test /tmp/wmexitmode.txt all two seconds - or can it be kill 'ed ?
_
kill_me_not(){
    PIDS=`pidof -o $$ -o %PPID ${0##*/}`
    for pid in $PIDS; do
    kill -9 $pid   ; done
}

case $1 in
stop)
_kill_me_not
exit
;;
restart)
_kill_me_not
;;
*) : ;;
esac

##+++2012-04-02
pidof -o $$ -o %PPID ${0##*/} && { echo "$0: Already Running.";exit 1; }

Also the files in .pup_event/ directory  needs refreshing then if partitions and file-systems change .
_clear_desk_icons(){
while read line
do test "$line" || continue
   DRV=`echo "$line" | grep -o -e 'drive_[^<]*'`
   test "$DRV" || continue
#_debug "$DRV"
   DRV="${DRV/drive_/}"
#_debug "$DRV"
 case $DRV in
sr*|fd*) nameDISK=$DRV _remove_pinboard;;
sd*)     test "${OLD_DRV:0:3}" = "${DRV:0:3}" && continue
         nameDISK=${DRV:0:3} _remove_pinboard
;;
*)       nameDISK=$DRV _remove_pinboard;;
 esac
   OLD_DRV=$DRV
done<$home/Choices/ROX-Filer/PuppyPin
unset DRV OLD_DRV line namePARTITION
}
_clear_desk_icons
_remove_pinboard has
rm -rf $HOME/.pup_event/drive_$namePARTITION


/usr/local/bin/drive_all aka AppRun uses  FSTYPE to determine if it should mount and passes the FSTYPE to /bin/mount .

A simple reformat would mount both as former and newer fs-type -- did it for me changing btrfs to ntfs .

But when I placed dirs and files in the new partition , it mounted only as the newer FSTYPE .
 
Reply | Threaded
Open this post in threaded view
|

Re: gparted_shell: semi-fix for refershing desktop icons

01micko
Administrator
In reply to this post by JakeSFR
The templates in woof only cover upstream packages, not .pets.

So it's my bad, fixed now for gparted-0.19.0-i686 and x86_64


Reply | Threaded
Open this post in threaded view
|

Re: gparted_shell: semi-fix for refershing desktop icons

JakeSFR
Thanks!
Btw, is this the corrected package?
http://distro.ibiblio.org/puppylinux/pet_packages-slacko14.1/gparted-0.19.0-i686.pet
Apparently ibiblio did it again - the pet is truncated/damaged.

Greetings!
Reply | Threaded
Open this post in threaded view
|

Re: gparted_shell: semi-fix for refershing desktop icons

01micko
Administrator
No, didn't upload yet, so doesn't matter. Will soon.