Check-in [e93ae86ff9]
Not logged in

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

Overview

SHA1 Hash:e93ae86ff9a7e35febfb40f1c54a7bad9a5407b0
Date: 2012-08-27 14:42:11
User: BarryK
Comment:ppm: search may find already-installed pkgs -- display with tick icon and msg, also disable examine-deps

Tags And Properties
Changes

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

@@ -13,10 +13,11 @@
 #120504 some files moved into /tmp/petget
 #120515 common code from pkg_chooser.sh, findnames.sh, filterpkgs.sh, extracted to /usr/local/petget/postfilterpkgs.sh.
 #120529 fix if icon name appended each line.
 #120811 category field now supports sub-category |category;subcategory|, use as icon in ppm main window.
 #120819 fix for 120811.
+#120827 search may find pkgs that are already installed, mark with mini-tick icon.
 
 #puppy package database format:
 #pkgname|nameonly|version|pkgrelease|category|size|path|fullfilename|dependencies|description|compileddistro|compiledrelease|repo|
 #...'compileddistro|compiledrelease' (fields 11,12) identify where the package was compiled.
 
@@ -77,29 +78,34 @@
 
 FNDIT=no
 echo -n "" > /tmp/petget/filterpkgs.results
 for ONEREPO in $REPOLIST
 do
+ #120827 need nameonly field (#2)...
  #120811 need category field (#5), and subcategory part of it...
  #120504 Mavrothal:
  #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | grep -i "$entryPATTERN"`"
  if [ "$entryPATTERN4" != "" ]; then
   #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3" | grep -i "$entryPATTERN4"`"
   #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | cut -f 2-99 -d ';' | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3" | grep -i "$entryPATTERN4"`"
-  FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3" | grep -i "$entryPATTERN4"`" #120819
+  #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3" | grep -i "$entryPATTERN4"`" #120819
+  FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,2,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3" | grep -i "$entryPATTERN4"`" #120827
  elif [ "$entryPATTERN3" != "" ]; then
   #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3"`"
   #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | cut -f 2-99 -d ';' | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3"`"
-  FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3"`" #120819
+  #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3"`" #120819
+  FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,2,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2" | grep -i "$entryPATTERN3"`" #120827
  elif [ "$entryPATTERN2" != "" ]; then
   #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2"`"
   #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | cut -f 2-99 -d ';' | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2"`"
-  FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2"`" #120819
+  #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2"`" #120819
+  FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,2,5,10 -d \| | grep -i "$entryPATTERN1" | grep -i "$entryPATTERN2"`" #120827
  else
   #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,10 -d \| | grep -i "$entryPATTERN1"`"
   #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | cut -f 2-99 -d ';' | grep -i "$entryPATTERN1"`"
-  FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | grep -i "$entryPATTERN1"`" #120819
+  #FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,5,10 -d \| | grep -i "$entryPATTERN1"`" #120819
+  FNDENTRIES="`cat /root/.packages/Packages-${ONEREPO} | cut -f1,2,5,10 -d \| | grep -i "$entryPATTERN1"`" #120827
  fi
 
  if [ "$FNDENTRIES" != "" ];then
   FIRSTCHAR="`echo "$FNDENTRIES" | cut -c 1 | tr '\n' ' ' | sed -e 's% %%g'`"
   #write these just in case needed...
@@ -135,10 +141,25 @@
 fi
 
 if [ "$FNDIT" = "no" ];then
  pupmessage -bg red -center -title "$(gettext 'PPM find')" "$(gettext 'Sorry, no matching package name')" & #110223 run as separate process.
 else
+
+ #120827 search may find pkgs that are already installed...
+ if [ -f /tmp/petget_installed_patterns_all ];then #precaution.
+  grep -f /tmp/petget_installed_patterns_all -v /tmp/petget/filterpkgs.results > /tmp/petget/filterpkgs.results.notinstalled
+  grep -f /tmp/petget_installed_patterns_all /tmp/petget/filterpkgs.results > /tmp/petget/filterpkgs.results.installed
+  cp -f /tmp/petget/filterpkgs.results.notinstalled /tmp/petget/filterpkgs.results
+  if [ -s /tmp/petget/filterpkgs.results.installed ];then
+   #change category field to "tick" (postfilerpkgs.sh converts this to "mini-tick", which will display /usr/local/lib/X11/mini-icons/mini-tick.xpm)...
+   sed -e 's%|%FIRSTPIPECHAR%' -e 's%|[^|]*%|tick%' -e 's%|tick|%|tick|(ALREADY INSTALLED) %' -e 's%FIRSTPIPECHAR%|%' /tmp/petget/filterpkgs.results.installed >> /tmp/petget/filterpkgs.results
+   #ex: xserver-xorg-video-radeon_6.14.99~git20111219.aacbd629|xserver-xorg-video-radeon|tick|(ALREADY INSTALLED) X.Org X server -- AMD/ATI Radeon display driver
+  fi
+ fi
+ #remove field #2, so file is same as generated by filterpkgs.sh, and as expected by postfilterpkgs.sh...
+ cut -f 1,3,4,5,6 -d '|' /tmp/petget/filterpkgs.results > /tmp/petget/filterpkgs.results1
+ mv -f /tmp/petget/filterpkgs.results1 /tmp/petget/filterpkgs.results
 
  #120515 post-filter /tmp/petget/filterpkgs.results.post according to EXE,DEV,DOC,NLS checkboxes...
  /usr/local/petget/postfilterpkgs.sh
  #...main gui will read /tmp/petget/filterpkgs.results.post (actually that happens in ui_Classic or ui_Ziggy, which is included in pkg_chooser.sh).
 

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

@@ -11,10 +11,11 @@
 #120203 BK: internationalized.
 #120504 if no pkgs in category, then when click in window in main dlg, comes here with TREE1="".
 #120504 select correct repo when have chosen a pkg from multiple-repo list.
 #120604 fix for prepended icons field.
 #120811 category field now supports sub-category |category;subcategory|, use as icon in ppm main window.
+#120827 if pkg already installed, do not examine dependencies (doesn't work).
 
 export TEXTDOMAIN=petget___installpreview.sh
 export OUTPUT_CHARSET=UTF-8
 
 [ "$TREE1" = "" ] && exit #120504 nothing to install.
@@ -28,10 +29,18 @@
 
 #ex: TREE1=abiword-1.2.4 (first field in database entry).
 DB_FILE=Packages-`cat /tmp/petget/current-repo-triad` #ex: Packages-slackware-12.2-official
 tPATTERN='^'"$TREE1"'|'
 #xtPATTERN='|'"$TREE1"'|'
+
+#120827 'examine dependencies' button does not work if pkg already installed...
+EXAMDEPSFLAG='yes'
+ttPTN='^'"$TREE1"'|.*ALREADY INSTALLED'
+if [ "`grep "$ttPTN" /tmp/petget/filterpkgs.results.post`" != "" ];then #created by postfilterpkgs.sh
+ EXAMDEPSFLAG='no'
+
+fi
 
 #120504 if findnames.sh searched multiple repos, /tmp/petget/current-repo-triad (set in pkg_chooser.sh) might be wrong...
 [ -f /tmp/petget/current-repo-triad.previous ] && rm -f /tmp/petget/current-repo-triad.previous
 if [ -f /tmp/petget/filterpkgs.results.post ];then
  #file ex line: abiword-1.2.3|[puppy-4-official] Abiword word processor|puppy-4-official|
@@ -110,20 +119,25 @@
  ONLYMSG=""
  if [ "$MISSINGDEPS_PATTERNS" = "" ];then
   DEPINFO="<text><label>$(gettext 'It seems that all dependencies are already installed. Sometimes though, the dependency information in the database is incomplete, however a check for presence of needed shared libraries will be done after installation.')</label></text>"
  else
   ONLYMSG=" $(gettext 'ONLY')"
-  DEPBUTTON="<button>
+  xMISSINGDEPS="`echo "$MISSINGDEPS_PATTERNS" | sed -e 's%|%%g' | tr '\n' ' '`"
+  if [ "$EXAMDEPSFLAG" != "no" ];then #120828
+   DEPBUTTON="<button>
    <label>$(gettext 'Examine dependencies')</label>
    <action>echo \"${TREE1}\" > /tmp/petget_installpreview_pkgname</action>
    <action type=\"exit\">BUTTON_EXAMINE_DEPS</action>
-  </button>"
-  xMISSINGDEPS="`echo "$MISSINGDEPS_PATTERNS" | sed -e 's%|%%g' | tr '\n' ' '`"
-  DEPINFO="<text><label>$(gettext 'Warning, the following dependent packages are missing:')</label></text>
-  <text use-markup=\"true\"><label>\"<b>${xMISSINGDEPS}</b>\"</label></text>
-  <text><label>$(gettext "A warning, these dependencies may have other dependencies not necessarily listed here. It is recommended that you click the 'Examine dependencies' button to find all dependencies before installing.")</label></text>
-  <text use-markup=\"true\"><label>\"<b>$(gettext "Please click 'Examine dependencies' to install") ${TREE1} $(gettext "as well as its dependencies")</b>\"</label></text>"
+   </button>"
+   DEPINFO="<text><label>$(gettext 'Warning, the following dependent packages are missing:')</label></text>
+   <text use-markup=\"true\"><label>\"<b>${xMISSINGDEPS}</b>\"</label></text>
+   <text><label>$(gettext "A warning, these dependencies may have other dependencies not necessarily listed here. It is recommended that you click the 'Examine dependencies' button to find all dependencies before installing.")</label></text>
+   <text use-markup=\"true\"><label>\"<b>$(gettext "Please click 'Examine dependencies' to install") ${TREE1} $(gettext "as well as its dependencies")</b>\"</label></text>"
+  else
+   DEPINFO="<text><label>$(gettext 'Warning, the following dependent packages are missing:')</label></text>
+   <text use-markup=\"true\"><label>\"<b>${xMISSINGDEPS}</b>\"</label></text>"
+  fi
   if [ $DB_size ];then
    MSGWARN1="<text><label>$(gettext 'After installation, this package will occupy') ${SIZEVAL}${SIZEMK}B, $(gettext 'however the dependencies will need more space so you really need to find what they will need first.')</label></text>"
   else
    MSGWARN1="<text><label>$(gettext 'Also, the package database provider has not supplied the installed size of this package, so you will have to try and estimate whether you have enough free space for it (and the dependencies)')</label></text>"
   fi

Changes to woof-distro/arm/ubuntu/precise/DISTRO_PKGS_SPECS-ubuntu-precise

@@ -215,11 +215,11 @@
 yes|glipper||exe,dev>null,doc,nls
 yes|gmeasures||exe,dev>null,doc,nls
 yes|gmp|libgmp10|exe>dev,dev,doc,nls
 yes|gnome-doc-utils|gnome-doc-utils|exe>dev,dev,doc,nls|+python-libxml2
 yes|gnome-keyring|libgnome-keyring0,libgnome-keyring-dev|exe,dev,doc,nls
-yes|gnome_menus|libgnome-menu2,libgnome-menu-dev|exe,dev,doc,nls
+yes|gnome_menus|libgnome-menu2,libgnome-menu-dev|exe,dev,doc,nls| #***TODO*** compile pet version 2.14.3 ***TODO***
 no|gnome_mplayer||exe,dev,doc,nls
 yes|gnome-mplayer-deps|libcurl3-gnutls,libcurl4-gnutls-dev,libdiscid0,libdiscid0-dev,libmusicbrainz3-6,libmusicbrainz3-dev,libneon27-gnutls,libneon27-gnutls-dev|exe,dev,doc,nls
 yes|gnome-vfs|libgnomevfs2-0,libgnomevfs2-dev,libgnomevfs2-common|exe,dev,doc,nls
 no|gnumeric||exe,dev,doc,nls
 yes|gnumeric|gnumeric,gnumeric-common|exe,dev>null,doc,nls

Changes to woof-distro/x86/ubuntu/precise/DISTRO_PKGS_SPECS-ubuntu-precise

@@ -221,11 +221,12 @@
 yes|glipper||exe,dev>null,doc,nls
 yes|gmeasures||exe,dev>null,doc,nls
 yes|gmp|libgmp10|exe>dev,dev,doc,nls
 yes|gnome-doc-utils|gnome-doc-utils|exe>dev,dev,doc,nls|+python-libxml2
 yes|gnome-keyring|libgnome-keyring0,libgnome-keyring-dev|exe,dev,doc,nls
-yes|gnome_menus|libgnome-menu2,libgnome-menu-dev|exe,dev,doc,nls
+no|gnome_menus|libgnome-menu2,libgnome-menu-dev|exe,dev,doc,nls| #must use older version for correct menu layout.
+yes|gnome-menus||exe,dev,doc,nls| #use my pet, version 2.14.3, needed by xdg_puppy.
 yes|gnome-mplayer||exe,dev,doc,nls| #ubuntu pkg compiled for gtk3
 yes|gnome-vfs|libgnomevfs2-0,libgnomevfs2-dev,libgnomevfs2-common|exe,dev,doc,nls
 yes|gnumeric|gnumeric,gnumeric-common|exe,dev>null,doc,nls
 yes|gnumeric-plugins-extra|gnumeric-plugins-extra|exe,dev>null,doc,nls
 yes|gnutls|libgnutls26,libgnutls-dev|exe,dev,doc,nls

Changes to woof-distro/x86/ubuntu/precise/Packages-puppy-precise-official

@@ -1,6 +1,8 @@
 0hack1_precise_dev-20120820|0hack1_precise_dev|20120820||BuildingBlock|24K||0hack1_precise_dev-20120820.pet||files missing from ubuntu precise, needed for compiling|ubuntu|precise||
+gnome-menus-2.14.3-up|gnome-menus|2.14.3-up||BuildingBlock|132K||gnome-menus-2.14.3-up.pet||needed by xdg_puppy, note later versions gnome-menus do not work properly|ubuntu|precise||
+gnome-menus_DEV-2.14.3-up|gnome-menus_DEV|2.14.3-up||BuildingBlock|408K||gnome-menus_DEV-2.14.3-up.pet|+gnome-menus|needed by xdg_puppy|ubuntu|precise||
 gtkhash-0.6.0-i686-up|gtkhash|0.6.0-i686-up||Utility|100K||gtkhash-0.6.0-i686-up.pet|+gtk+|GUI checksum utility|ubuntu|precise||
 gtkhash_NLS-0.6.0-i686-up|gtkhash_NLS|0.6.0-i686-up||Utility|68K||gtkhash_NLS-0.6.0-i686-up.pet||checksum utility||||
 gtk_youtube_viewer-2.05_precise|gtk_youtube_viewer|2.05_precise||Multimedia|10712K||gtk_youtube_viewer-2.05_precise.pet||A Gtk2 application to search and play Youtube videos with MPlayer. created by 666philb|puppy|precise||
 linux_headers-3.2.13|linux_headers|3.2.13||BuildingBlock|4772K||linux_headers-3.2.13.pet||header files for 3.2.13 kernel||||
 linux_kernel-3.2.13-pae-i686-up|linux_kernel|3.2.13-pae-i686-up||BuildingBlock|65400K||linux_kernel-3.2.13-pae-i686-up.pet||Linux kernel 3.2.13 compiled in Precise Puppy version 5.2.52|ubuntu|precise||