removepreview.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. #!/bin/sh
  2. #(c) Copyright Barry Kauler 2009, puppylinux.com
  3. #2009 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html).
  4. #called from pkg_chooser.sh and petget.
  5. #package to be removed is TREE2, ex TREE2=abiword-1.2.3 (corrresponds to 'pkgname' field in db).
  6. #installed pkgs are recorded in /root/.packages/user-installed-packages, each
  7. #line a standardised database entry:
  8. #pkgname|nameonly|version|pkgrelease|category|size|path|fullfilename|dependencies|description|
  9. #optionally on the end: compileddistro|compiledrelease|repo| (fields 11,12,13)
  10. #If X not running, no GUI windows displayed, removes without question.
  11. #v424 support post-uninstall script for .pet pkgs.
  12. #v424 need info box if user has clicked when no pkgs installed.
  13. #110211 shinobar: was the dependency logic inverted.
  14. #110706 update menu if .desktop file exists.
  15. #111228 if snapmergepuppy running, wait for it to complete.
  16. #120101 01micko: jwm >=547 has -reload, no screen flicker.
  17. #120103 shinobar, bk: improve file deletion when older file in lower layer.
  18. #120107 rerwin: need quotes around some paths in case of space chars.
  19. #120116 rev. 514 introduced icon rendering method which broke -reload at 547. fixed at rev. 574.
  20. #120203 BK: internationalized.
  21. #120323 replace 'xmessage' with 'pupmessage'.
  22. export TEXTDOMAIN=petget___removepreview.sh
  23. export OUTPUT_CHARSET=UTF-8
  24. . /etc/rc.d/PUPSTATE #111228 this has PUPMODE and SAVE_LAYER.
  25. . /etc/DISTRO_SPECS #has DISTRO_BINARY_COMPAT, DISTRO_COMPAT_VERSION
  26. . /root/.packages/DISTRO_PKGS_SPECS
  27. DB_pkgname="$TREE2"
  28. #v424 info box, nothing yet installed...
  29. if [ "$DB_pkgname" = "" -a "`cat /root/.packages/user-installed-packages`" = "" ];then #fix for ziggi
  30. export REM_DIALOG="<window title=\"$(gettext 'Puppy Package Manager')\" icon-name=\"gtk-about\">
  31. <vbox>
  32. <pixmap><input file>/usr/local/lib/X11/pixmaps/error.xpm</input></pixmap>
  33. <text><label>$(gettext 'There are no user-installed packages yet, so nothing to uninstall!')</label></text>
  34. <hbox>
  35. <button ok></button>
  36. </hbox>
  37. </vbox>
  38. </window>
  39. "
  40. [ "$DISPLAY" != "" ] && gtkdialog3 --program=REM_DIALOG
  41. exit 0
  42. fi
  43. if [ "$DB_pkgname" = "" ];then #fix for ziggi moved here problem is #2011-12-27 KRG
  44. exit 0 #clicking an empty line in the gui would have
  45. fi #thrown the above REM_DIALOG even if pkgs are installed
  46. export REM_DIALOG="<window title=\"$(gettext 'Puppy Package Manager')\" icon-name=\"gtk-about\">
  47. <vbox>
  48. <pixmap><input file>/usr/local/lib/X11/pixmaps/question.xpm</input></pixmap>
  49. <text><label>$(gettext "Click 'OK' button to confirm that you wish to uninstall package") '$DB_pkgname'</label></text>
  50. <hbox>
  51. <button ok></button>
  52. <button cancel></button>
  53. </hbox>
  54. </vbox>
  55. </window>
  56. "
  57. if [ "$DISPLAY" != "" ];then
  58. RETPARAMS="`gtkdialog3 --program=REM_DIALOG`"
  59. eval "$RETPARAMS"
  60. [ "$EXIT" != "OK" ] && exit 0
  61. fi
  62. #111228 if snapmergepuppy running, wait for it to complete (see also /usr/local/petget/installpkg.sh)...
  63. #note, inverse true, /sbin/pup_event_frontend_d will not run snapmergepuppy if removepreview.sh running.
  64. if [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o $PUPMODE -eq 13 ];then
  65. while [ "`pidof snapmergepuppy`" != "" ];do
  66. sleep 1
  67. done
  68. fi
  69. if [ -f /root/.packages/${DB_pkgname}.files ];then
  70. if [ "$PUP_LAYER" = '/pup_ro2' ]; then #120103 shinobar.
  71. cat /root/.packages/${DB_pkgname}.files |
  72. while read ONESPEC
  73. do
  74. if [ ! -d "$ONESPEC" ];then
  75. #120103 shinobar: better way of doing this, look all lower layers...
  76. Sx=$(ls /initrd/pup_{a,y,ro[0-9]*}"$ONESPEC" 2>/dev/null| grep -v '^/initrd/pup_ro1/')
  77. INAY=$(echo $Sx | grep -E 'pup_a|pup_y')
  78. if [ "$INAY" != "" ]; then
  79. S=$(ls /initrd/pup_{a,y}"$ONESPEC" 2>/dev/null| grep -v '^/initrd/pup_ro1/'| tail -n 1)
  80. else
  81. S=$(ls /initrd/pup_ro{?,??}"$ONESPEC" 2>/dev/null| grep -v '^/initrd/pup_ro1/'| head -n 1)
  82. fi # pup_ro2 - pup_ro99
  83. if [ "$S" ]; then
  84. #the problem is, deleting the file on the top layer places a ".wh" whiteout file,
  85. #that hides the original file. what we want is to remove the installed file, and
  86. #restore the original pristine file...
  87. cp -a --remove-destination "$S" "$ONESPEC" #120103 shinobar.
  88. #120103 apparently for odd# PUPMODEs, save layer may have a lurking old file and/or whiteout...
  89. if [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o $PUPMODE -eq 13 ];then
  90. [ -f "/initrd${SAVE_LAYER}${ONESPEC}" ] && rm -f "/initrd${SAVE_LAYER}${ONESPEC}" #normally /pup_ro1
  91. BN="`basename "$ONESPEC"`"
  92. DN="`dirname "$ONESPEC"`"
  93. [ -f "/initrd${SAVE_LAYER}${DN}/.wh.${BN}" ] && rm -f "/initrd${SAVE_LAYER}${DN}/.wh.${BN}"
  94. fi
  95. else
  96. rm -f "$ONESPEC"
  97. fi
  98. fi
  99. done
  100. fi
  101. #do it again, looking for empty directories...
  102. cat /root/.packages/${DB_pkgname}.files |
  103. while read ONESPEC
  104. do
  105. if [ -d "$ONESPEC" ];then
  106. [ "`ls -1 "$ONESPEC"`" = "" ] && rmdir "$ONESPEC" 2>/dev/null #120107
  107. fi
  108. done
  109. ###+++2011-12-27 KRG
  110. else
  111. firstchar=`echo ${DB_pkgname} | cut -c 1`
  112. possiblePKGS=`find /root/.packages -type f -iname "$firstchar*.files"`
  113. possible5=`echo "$possiblePKGS" | head -n5`
  114. count=`echo "$possiblePKGS" | wc -l`
  115. [ ! "$count" ] && count=0
  116. [ ! "$possiblePKGS" ] && possiblePKGS="$(gettext 'No pkgs beginning with') ${firstchar} $(gettext 'found')"
  117. if [ "$count" -le '5' ];then
  118. WARNMSG="$possiblePKGS"
  119. else
  120. WARNMSG="$(gettext 'Found more than 5 pkgs starting with') ${firstchar}.
  121. $(gettext 'The first 5 are')
  122. $possible5"
  123. fi
  124. pupmessage -bg red "$(gettext 'WARNING:')
  125. $(gettext 'No file named') ${DB_pkgname}.files $(gettext 'found in')
  126. /root/.packages/ $(gettext 'folder.')
  127. $0
  128. $(gettext 'refusing cowardly to remove the package.')
  129. $(gettext 'Possible suggestions are')
  130. $WARNMSG
  131. $(gettext 'Possible solution:')
  132. $(gettext 'Edit') /root/.packages/user-installed-packages $(gettext 'to match the pkgname')
  133. $(gettext 'and start again.')
  134. "
  135. rox /root/.packages
  136. geany /root/.packages/user-installed-packages
  137. exit 101
  138. ###+++2011-12-27 KRG
  139. fi
  140. if [ "$PUPMODE" = "2" ]; then
  141. #any user-installed deps?...
  142. remPATTERN='^'"$DB_pkgname"'|'
  143. DEP_PKGS="`grep "$remPATTERN" /root/.packages/user-installed-packages | cut -f 9 -d '|' | tr ',' '\n' | grep -v '^\\-' | sed -e 's%^+%%'`" #names-only, one each line.
  144. #131222 do not uninstall if other-installed depend on it...
  145. echo -n '' > /tmp/petget/other-installed-deps
  146. for ADEP in $DEP_PKGS
  147. do
  148. PTN2="|${ADEP}|"
  149. DEPPKG="$(grep "$PTN2" /root/.packages/user-installed-packages | cut -f 1 -d '|')"
  150. [ "$DEPPKG" ] && echo "$DEPPKG" >> /tmp/petget/other-installed-deps
  151. done
  152. if [ -s /tmp/petget/other-installed-deps ];then
  153. OTHERDEPS="$(sort -u /tmp/petget/other-installed-deps | tr '\n' ' ')"
  154. pupmessage -bg '#ff8080' -fg black -title "Cannot uninstall: ${DB_pkgname}" "Sorry, but these other installed packages depend on the package that you want to uninstall:
  155. ${OTHERDEPS}
  156. Aborting uninstall operation."
  157. exit 1
  158. fi
  159. #131221 131222
  160. #check install history, so know if can safely uninstall...
  161. REMLIST="${DB_pkgname}"
  162. mkdir -p /tmp/petget
  163. echo -n "" > /tmp/petget/FILECLASHES
  164. echo -n "" > /tmp/petget/CLASHPKGS
  165. grep -v '/$' /root/.packages/${DB_pkgname}.files > /tmp/petget/${DB_pkgname}.filesFILESONLY #/ on end, it is a directory entry.
  166. LATERINSTALLED="$(cat /root/.packages/user-installed-packages | cut -f 1 -d '|' | tr '\n' ' ' | grep -o " ${DB_pkgname} .*" | cut -f 3- -d ' ')"
  167. for ALATERPKG in $LATERINSTALLED
  168. do
  169. if [ -f /audit/${ALATERPKG}DEPOSED.sfs ];then
  170. mkdir /audit/${ALATERPKG}DEPOSED
  171. busybox mount -t squashfs -o loop,ro /audit/${ALATERPKG}DEPOSED.sfs /audit/${ALATERPKG}DEPOSED
  172. FNDFILES="$(cat /tmp/petget/${DB_pkgname}.filesFILESONLY | xargs -I FULLPATHSPEC ls -1 /audit/${ALATERPKG}DEPOSEDFULLPATHSPEC 2>/dev/null | sed -e "s%^/audit/${ALATERPKG}%%")"
  173. if [ "$FNDFILES" ];then
  174. #echo "" >> /tmp/petget/FILECLASHES
  175. #echo "PACKAGE: ${ALATERPKG}" >> /tmp/petget/FILECLASHES
  176. echo "$FNDFILES" >> /tmp/petget/FILECLASHES
  177. echo "${ALATERPKG}" >> /tmp/petget/CLASHPKGS
  178. fi
  179. busybox umount /audit/${ALATERPKG}DEPOSED
  180. rmdir /audit/${ALATERPKG}DEPOSED
  181. fi
  182. done
  183. if [ -s /tmp/petget/CLASHPKGS ];then
  184. #a later-installed package is going to be compromised if uninstall ${DB_pkgname}.
  185. #131222 much simpler...
  186. FILECLASHES="$(sort -u /tmp/petget/FILECLASHES | grep -v '^$')"
  187. rm -rf /tmp/petget/savedfiles 2>/dev/null
  188. mkdir /tmp/petget/savedfiles
  189. echo "$FILECLASHES" |
  190. while read AFILE
  191. do
  192. APATH="$(dirname "$AFILE")"
  193. mkdir -p /tmp/petget/savedfiles"${APATH}"
  194. cp -a -f "${AFILE}" /tmp/petget/savedfiles"${APATH}"/
  195. done
  196. fi
  197. #end 131221 131222
  198. #131230 from here down, use busybox applets only...
  199. export LANG=C
  200. #delete files...
  201. busybox cat /root/.packages/${DB_pkgname}.files | busybox grep -v '/$' | busybox xargs busybox rm -f #/ on end, it is a directory entry.
  202. #do it again, looking for empty directories...
  203. busybox cat /root/.packages/${DB_pkgname}.files |
  204. while read ONESPEC
  205. do
  206. if [ -d "$ONESPEC" ];then
  207. [ "`busybox ls -1 "$ONESPEC"`" = "" ] && busybox rmdir "$ONESPEC" 2>/dev/null #120107
  208. fi
  209. done
  210. #131222 restore files that were deposed when this pkg installed...
  211. if [ -f /audit/${DB_pkgname}DEPOSED.sfs ];then
  212. busybox mkdir -p /audit/${DB_pkgname}DEPOSED
  213. busybox mount -t squashfs -o loop,ro /audit/${DB_pkgname}DEPOSED.sfs /audit/${DB_pkgname}DEPOSED
  214. DIRECTSAVEPATH="/audit/${DB_pkgname}DEPOSED"
  215. #same code as in installpkg.sh... 131230 cp is compiled statically, need full version...
  216. cp -a -f --remove-destination ${DIRECTSAVEPATH}/* / 2> /tmp/petget/install-cp-errlog
  217. busybox sync
  218. #can have a problem if want to replace a folder with a symlink. for example, got this error:
  219. # cp: cannot overwrite directory '/usr/share/mplayer/skins' with non-directory
  220. #3builddistro has this fix... which is a vice-versa situation...
  221. #firstly, the vice-versa, source is a directory, target is a symlink...
  222. CNT=0
  223. while [ -s /tmp/petget/install-cp-errlog ];do
  224. echo -n "" > /tmp/petget/install-cp-errlog2
  225. echo -n "" > /tmp/petget/install-cp-errlog3
  226. busybox cat /tmp/petget/install-cp-errlog | busybox grep 'cannot overwrite non-directory' | busybox tr '[`‘’]' "'" | busybox cut -f 2 -d "'" |
  227. while read ONEDIRSYMLINK #ex: /usr/share/mplayer/skins
  228. do
  229. #adding that extra trailing / does the trick... 131230 full cp...
  230. cp -a -f --remove-destination ${DIRECTSAVEPATH}"${ONEDIRSYMLINK}"/* "${ONEDIRSYMLINK}"/ 2> /tmp/petget/install-cp-errlog2
  231. done
  232. #secondly, which is our mplayer example, source is a symlink, target is a folder...
  233. busybox cat /tmp/petget/install-cp-errlog | busybox grep 'cannot overwrite directory' | busybox grep 'with non-directory' | busybox tr '[`‘’]' "'" | busybox cut -f 2 -d "'" |
  234. while read ONEDIRSYMLINK #ex: /usr/share/mplayer/skins
  235. do
  236. busybox mv -f "${ONEDIRSYMLINK}" "${ONEDIRSYMLINK}"TEMP
  237. busybox rm -rf "${ONEDIRSYMLINK}"TEMP
  238. DIRPATH="$(busybox dirname "${ONEDIRSYMLINK}")"
  239. cp -a -f --remove-destination ${DIRECTSAVEPATH}"${ONEDIRSYMLINK}" "${DIRPATH}"/ 2> /tmp/petget/install-cp-errlog3
  240. done
  241. busybox cat /tmp/petget/install-cp-errlog2 >> /tmp/petget/install-cp-errlog3
  242. busybox cat /tmp/petget/install-cp-errlog3 > /tmp/petget/install-cp-errlog
  243. busybox sync
  244. CNT=`busybox expr $CNT + 1`
  245. [ $CNT -gt 10 ] && break #something wrong, get out.
  246. done
  247. busybox umount /audit/${DB_pkgname}DEPOSED
  248. busybox rm -rf /audit/${DB_pkgname}DEPOSED
  249. busybox rm -f /audit/${DB_pkgname}DEPOSED.sfs
  250. fi
  251. #131222 restore latest files, needed by later-installed packages...
  252. #note, manner in which old files got saved may result in wrong dirs instead of symlinks, hence need fixes below...
  253. if [ -s /tmp/petget/CLASHPKGS ];then
  254. DIRECTSAVEPATH="/tmp/petget/savedfiles"
  255. #same code as in installpkg.sh...
  256. cp -a -f --remove-destination ${DIRECTSAVEPATH}/* / 2> /tmp/petget/install-cp-errlog
  257. busybox sync
  258. #can have a problem if want to replace a folder with a symlink. for example, got this error:
  259. # cp: cannot overwrite directory '/usr/share/mplayer/skins' with non-directory
  260. #3builddistro has this fix... which is a vice-versa situation...
  261. #firstly, the vice-versa, source is a directory, target is a symlink...
  262. CNT=0
  263. while [ -s /tmp/petget/install-cp-errlog ];do
  264. echo -n "" > /tmp/petget/install-cp-errlog2
  265. echo -n "" > /tmp/petget/install-cp-errlog3
  266. busybox cat /tmp/petget/install-cp-errlog | busybox grep 'cannot overwrite non-directory' | busybox tr '[`‘’]' "'" | busybox cut -f 2 -d "'" |
  267. while read ONEDIRSYMLINK #ex: /usr/share/mplayer/skins
  268. do
  269. #adding that extra trailing / does the trick...
  270. cp -a -f --remove-destination ${DIRECTSAVEPATH}"${ONEDIRSYMLINK}"/* "${ONEDIRSYMLINK}"/ 2> /tmp/petget/install-cp-errlog2
  271. done
  272. #secondly, which is our mplayer example, source is a symlink, target is a folder...
  273. busybox cat /tmp/petget/install-cp-errlog | busybox grep 'cannot overwrite directory' | busybox grep 'with non-directory' | busybox tr '[`‘’]' "'" | busybox cut -f 2 -d "'" |
  274. while read ONEDIRSYMLINK #ex: /usr/share/mplayer/skins
  275. do
  276. busybox mv -f "${ONEDIRSYMLINK}" "${ONEDIRSYMLINK}"TEMP
  277. busybox rm -rf "${ONEDIRSYMLINK}"TEMP
  278. DIRPATH="$(dirname "${ONEDIRSYMLINK}")"
  279. cp -a -f --remove-destination ${DIRECTSAVEPATH}"${ONEDIRSYMLINK}" "${DIRPATH}"/ 2> /tmp/petget/install-cp-errlog3
  280. done
  281. busybox cat /tmp/petget/install-cp-errlog2 >> /tmp/petget/install-cp-errlog3
  282. busybox cat /tmp/petget/install-cp-errlog3 > /tmp/petget/install-cp-errlog
  283. busybox sync
  284. CNT=`busybox expr $CNT + 1`
  285. [ $CNT -gt 10 ] && break #something wrong, get out.
  286. done
  287. busybox rm -rf /tmp/petget/savedfiles
  288. busybox rm -f /tmp/petget/CLASHPKGS
  289. busybox rm -f /tmp/petget/FILECLASHES
  290. fi
  291. #end 131220 131222
  292. export LANG="$ORIGLANG"
  293. #131230 ...end need to use busybox applets?
  294. fi
  295. #fix menu...
  296. #master help index has to be updated...
  297. ##to speed things up, find the help files in the new pkg only...
  298. /usr/sbin/indexgen.sh #${WKGDIR}/${APKGNAME}
  299. #110706 update menu if .desktop file exists...
  300. if [ -f /root/.packages/${DB_pkgname}.files ];then
  301. if [ "`grep '\.desktop$' /root/.packages/${DB_pkgname}.files`" != "" ];then
  302. #Reconstruct configuration files for JWM, Fvwm95, IceWM...
  303. /usr/sbin/fixmenus
  304. if [ "`pidof jwm`" != "" ];then #120101
  305. JWMVER=`jwm -v|head -n1|cut -d ' ' -f2|cut -d - -f2`
  306. if vercmp $JWMVER lt 574;then #120116 547 to 574.
  307. jwm -restart #screen will flicker.
  308. else
  309. jwm -reload
  310. fi
  311. fi
  312. fi
  313. fi
  314. #what about any user-installed deps...
  315. remPATTERN='^'"$DB_pkgname"'|'
  316. #110211 shinobar: was the dependency logic inverted...
  317. DEP_PKGS="`grep "$remPATTERN" /root/.packages/user-installed-packages | cut -f 9 -d '|' | tr ',' '\n' | grep -v '^\\-' | sed -e 's%^+%%'`"
  318. #remove records of pkg...
  319. rm -f /root/.packages/${DB_pkgname}.files
  320. grep -v "$remPATTERN" /root/.packages/user-installed-packages > /tmp/petget-user-installed-pkgs-rem
  321. cp -f /tmp/petget-user-installed-pkgs-rem /root/.packages/user-installed-packages
  322. #v424 .pet pckage may have post-uninstall script, which was originally named puninstall.sh
  323. #but /usr/local/petget/installpkg.sh moved it to /root/.packages/$DB_pkgname.remove
  324. if [ -f /root/.packages/${DB_pkgname}.remove ];then
  325. /bin/sh /root/.packages/${DB_pkgname}.remove
  326. rm -f /root/.packages/${DB_pkgname}.remove
  327. fi
  328. #remove temp file so main gui window will re-filter pkgs display...
  329. FIRSTCHAR="`echo -n "$DB_pkgname" | cut -c 1 | tr '[A-Z]' '[a-z]'`"
  330. rm -f /tmp/petget_fltrd_repo_${FIRSTCHAR}* 2>/dev/null
  331. rm -f /tmp/petget_fltrd_repo_?${FIRSTCHAR}* 2>/dev/null
  332. [ "`echo -n "$FIRSTCHAR" | grep '[0-9]'`" != "" ] && rm -f /tmp/petget_fltrd_repo_0* 2>/dev/null
  333. #announce any deps that might be removable...
  334. echo -n "" > /tmp/petget-deps-maybe-rem
  335. cut -f 1,2,10 -d '|' /root/.packages/user-installed-packages |
  336. while read ONEDB
  337. do
  338. ONE_pkgname="`echo -n "$ONEDB" | cut -f 1 -d '|'`"
  339. ONE_nameonly="`echo -n "$ONEDB" | cut -f 2 -d '|'`"
  340. ONE_description="`echo -n "$ONEDB" | cut -f 3 -d '|'`"
  341. opPATTERN='^'"$ONE_nameonly"'$'
  342. [ "`echo "$DEP_PKGS" | grep "$opPATTERN"`" != "" ] && echo "$ONE_pkgname DESCRIPTION: $ONE_description" >> /tmp/petget-deps-maybe-rem
  343. done
  344. EXTRAMSG=""
  345. if [ -s /tmp/petget-deps-maybe-rem ];then
  346. #nah, just list the names, not descriptions...
  347. MAYBEREM="`cat /tmp/petget-deps-maybe-rem | cut -f 1 -d ' ' | tr '\n' ' '`"
  348. EXTRAMSG="<text><label>$(gettext 'Perhaps you do not need these dependencies that you had also installed:')</label></text> <text use-markup=\"true\"><label>\"<b>${MAYBEREM}</b>\"</label></text><text><label>$(gettext "...if you do want to remove them, you will have to do so back on the main window, after clicking the 'Ok' button below (perhaps make a note of the package names on a scrap of paper right now)")</label></text>"
  349. fi
  350. #announce success...
  351. export REM_DIALOG="<window title=\"$(gettext 'Puppy Package Manager')\" icon-name=\"gtk-about\">
  352. <vbox>
  353. <pixmap><input file>/usr/local/lib/X11/pixmaps/ok.xpm</input></pixmap>
  354. <text><label>$(gettext 'Package') '$DB_pkgname' $(gettext 'has been removed.')</label></text>
  355. ${EXTRAMSG}
  356. <hbox>
  357. <button ok></button>
  358. </hbox>
  359. </vbox>
  360. </window>
  361. "
  362. if [ "$DISPLAY" != "" ];then
  363. gtkdialog3 --program=REM_DIALOG
  364. fi
  365. ###+++2011-12-27 KRG
  366. #emitting exitcode for some windowmanager depending on dbus
  367. #popup a message window saying the program stopped unexpectedly
  368. #ie (old) enlightenment
  369. exit 0
  370. ###+++2011-12-27 KRG
  371. ###END###