Check-in [c90cc1a6f0]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

SHA1 Hash:c90cc1a6f01c46dc6380274cf1f4521790b716d4
Date: 2011-12-31 22:35:49
User: BarryK
Comment:01micko: ppm: jwm ge 547 have -reload, refresh menu without flicker

Tags And Properties
Changes

Changes to woof-code/rootfs-skeleton/usr/local/petget/installpreview.sh

@@ -4,10 +4,11 @@
 #called from pkg_chooser.sh
 #package to be previewed prior to installation is TREE1 -- inherited from parent.
 #/tmp/petget_filterversion has the repository that installing from.
 #100821 bug in Lucid 5.1, /tmp/pup_event_sizefreem had two identical lines.
 #101221 yaf-splash fix.
+#120101 01micko: jwm >=547 has -reload, no screen flicker.
 
 . /etc/DISTRO_SPECS #has DISTRO_BINARY_COMPAT, DISTRO_COMPAT_VERSION
 . /root/.packages/DISTRO_PKGS_SPECS
 
 #/usr/X11R7/bin/yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text "Please wait, processing package database files..." &
@@ -315,11 +316,16 @@
 
 #w482 adjust msg as appropriate, restart jwm and update menu if required...
 INSTALLEDCAT="menu" #any string.
 [ "`cat /tmp/petget-installed-pkgs-log | grep -o 'CATEGORY' | grep -v 'none'`" = "" ] && INSTALLEDCAT="none"
 RESTARTMSG="Please wait, updating help page and menu..."
-[ "`pidof jwm`" != "" ] && RESTARTMSG="Please wait, updating help page and menu (the screen will flicker!)..."
+if [ "`pidof jwm`" != "" ];then #120101
+ JWMVER=`jwm -v|head -n1|cut -d ' ' -f2|cut -d - -f2`
+ if vercmp $JWMVER lt 547;then
+  RESTARTMSG="Please wait, updating help page and menu (the screen will flicker!)..."
+ fi
+fi
 [ "$INSTALLEDCAT" = "none" ] && RESTARTMSG="Please wait, updating help page..."
 #/usr/X11R7/bin/yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text "${RESTARTMSG}" &
 yaf-splash -bg orange -text "${RESTARTMSG}" &
 X3PID=$!
 
@@ -337,14 +343,20 @@
 ##to speed things up, find the help files in the new pkg only...
 /usr/sbin/indexgen.sh #${WKGDIR}/${APKGNAME}
 #Reconstruct configuration files for JWM, Fvwm95, IceWM...
 if [ "$INSTALLEDCAT" != "none" ];then
  /usr/sbin/fixmenus
- [ "`pidof jwm`" != "" ] && jwm -restart #w482
+ if [ "`pidof jwm`" != "" ];then #120101
+  if vercmp $JWMVER lt 547;then
+   jwm -restart #w482
+  else
+   jwm -reload
+  fi
+ fi
 fi
 kill $X3PID
 
 #check any missing shared libraries...
 PKGS="`cat /tmp/petget_missing_dbentries-* | cut -f 1 -d '|' | tr '\n' '|'`"
 /usr/local/petget/check_deps.sh $PKGS
 
 ###END###

Changes to woof-code/rootfs-skeleton/usr/local/petget/petget

@@ -16,10 +16,11 @@
 #100616 add support for .txz slackware pkgs.
 #101116 call download_file to download pkg, instead of direct run of wget.
 #101221 yaf-splash fix.
 #110505 support sudo for non-root user.
 #110523 support for rpm pkgs.
+#120101 01micko: jwm >=547 has -reload, no screen flicker.
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
 
 [ ! $1 ] && exit
 
@@ -255,11 +256,16 @@
 </window>
 "
 gtkdialog3 --program=INSTALL_DIALOG
 
 RESTARTMSG="Please wait, updating help page and menu..."
-[ "`pidof jwm`" != "" ] && RESTARTMSG="Please wait, updating help page and menu (the screen will flicker!)..." #w482
+if [ "`pidof jwm`" != "" ];then #120101
+ JWMVER=`jwm -v|head -n1|cut -d ' ' -f2|cut -d - -f2`
+ if vercmp $JWMVER lt 547;then
+  RESTARTMSG="Please wait, updating help page and menu (the screen will flicker!)..."
+ fi
+fi
 [ "$INSTALLEDCAT" = "none" ] && RESTARTMSG="Please wait, updating help page..."
 #/usr/X11R7/bin/yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text "${RESTARTMSG}" &
 yaf-splash -bg orange -text "${RESTARTMSG}" &
 X3PID=$!
 
@@ -273,11 +279,17 @@
 #master help index has to be updated...
 /usr/sbin/indexgen.sh
 #Reconstruct configuration files for JWM, Fvwm95, IceWM...
 if [ "$INSTALLEDCAT" != "none" ];then
  /usr/sbin/fixmenus
- [ "`pidof jwm`" != "" ] && jwm -restart #w482
+ if [ "`pidof jwm`" != "" ];then #120101
+  if vercmp $JWMVER lt 547;then
+   jwm -restart #w482
+  else
+   jwm -reload
+  fi
+ fi
 fi
 
 kill $X3PID
 
 ###END###

Changes to woof-code/rootfs-skeleton/usr/local/petget/removepreview.sh

@@ -11,10 +11,11 @@
 #v424 support post-uninstall script for .pet pkgs.
 #v424 need info box if user has clicked when no pkgs installed.
 #110211 shinobar: was the dependency logic inverted.
 #110706 update menu if .desktop file exists.
 #111228 if snapmergepuppy running, wait for it to complete.
+#120101 01micko: jwm >=547 has -reload, no screen flicker.
 
 . /etc/rc.d/PUPSTATE  #111228 this has PUPMODE and SAVE_LAYER.
 . /etc/DISTRO_SPECS #has DISTRO_BINARY_COMPAT, DISTRO_COMPAT_VERSION
 . /root/.packages/DISTRO_PKGS_SPECS
 
@@ -131,12 +132,17 @@
 #110706 update menu if .desktop file exists...
 if [ -f /root/.packages/${DB_pkgname}.files ];then
  if [ "`grep '\.desktop$' /root/.packages/${DB_pkgname}.files`" != "" ];then
   #Reconstruct configuration files for JWM, Fvwm95, IceWM...
   /usr/sbin/fixmenus
-  if [ "`pidof jwm`" != "" ];then
-   jwm -restart #screen will flicker.
+  if [ "`pidof jwm`" != "" ];then #120101
+   JWMVER=`jwm -v|head -n1|cut -d ' ' -f2|cut -d - -f2`
+   if vercmp $JWMVER lt 547;then
+    jwm -restart #screen will flicker.
+   else
+    jwm -reload
+   fi
   fi
  fi
 fi
 
 #what about any user-installed deps...