Check-in [559a668e3e]
Not logged in

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

Overview

SHA1 Hash:559a668e3eead1456aa66a3d6563e1c8a6ef4727
Date: 2012-09-04 00:17:28
User: BarryK
Comment:ppm: fix for slowness when many user-installed pkgs

Tags And Properties
Changes

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

@@ -9,10 +9,11 @@
 #100711 fix handling of PKG_NAME_ALIASES variable (defined in PKGS_MANAGEMENT file).
 #110706 finding missing dependencies fix (running mageia 1).
 #110722 versioning info added to dependencies.
 #110822 versioning operators can be chained, ex: +linux_kernel&ge2.6.32&lt2.6.33
 #120822 in precise puppy have a pet 'cups' instead of the ubuntu debs. the latter are various pkgs, including 'libcups2'. we don't want libcups2 showing up as a missing dependency, so have to screen these alternative names out. see also pkg_chooser.sh
+#120904 bugfix, was very slow.
 
 DB_dependencies="$1" #in standard format of the package database, field 9.
 
 . /etc/DISTRO_SPECS #has DISTRO_BINARY_COMPAT, DISTRO_COMPAT_VERSION
 . /root/.packages/DISTRO_PKGS_SPECS #has PKGS_SPECS_TABLE
@@ -52,27 +53,29 @@
  INSTALLED_PATTERNS_USER="`cat /root/.packages/user-installed-packages | cut -f 2 -d '|' | sed -e 's%^%|%' -e 's%$%|%' -e 's%\\-%\\\\-%g'`"
  echo "$INSTALLED_PATTERNS_USER" >> /tmp/petget_installed_patterns_all
  #120822 this code also in pkg_chooser.sh, find alt deb names...
  case $DISTRO_BINARY_COMPAT in
   ubuntu|debian|raspbian)
+   #120904 bugfix, was very slow...
    MODIF1=`stat --format=%Y /root/.packages/user-installed-packages` #seconds since epoch.
    MODIF2=0
-   [ -f /var/local/petget_installed_alt_ptns_user ] && MODIF2=`stat --format=%Y /var/local/petget_installed_alt_ptns_user`
+   [ -f /var/local/petget/installed_alt_ptns_pet_user ] && MODIF2=`stat --format=%Y /var/local/petget/installed_alt_ptns_pet_user`
    if [ $MODIF1 -gt $MODIF2 ];then
-    INSTALLED_PTNS_PET="$(grep '\.pet|' /root/.packages/user-installed-packages | cut -f 2 -d '|' | sed -e 's%^%/%' -e 's%$%|%' -e 's%\-%\\-%g')"
-    if [ "$INSTALLED_PTNS_PET" != "/|" ];then
-     echo "$INSTALLED_PTNS_PET" > /tmp/petget/installed_ptns_pet_user
-     INSTALLED_ALT_NAMES="$(grep --no-filename -f /tmp/petget/installed_ptns_pet_user /root/.packages/Packages-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}-* | cut -f 2 -d '|')"
+    INSTALLED_PTNS_PET="$(grep '\.pet|' /root/.packages/user-installed-packages | cut -f 2 -d '|')"
+    if [ "$INSTALLED_PTNS_PET" != "" ];then
+     xINSTALLED_PTNS_PET="$(echo "$INSTALLED_PTNS_PET" | sed -e 's%^%/%' -e 's%$%|%' -e 's%\-%\\-%g')"
+     echo "$xINSTALLED_PTNS_PET" > /tmp/petget/fmp_xipp
+     INSTALLED_ALT_NAMES="$(grep --no-filename -f /tmp/petget/fmp_xipp /root/.packages/Packages-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}-* | cut -f 2 -d '|')"
      if [ "$INSTALLED_ALT_NAMES" ];then
       INSTALLED_ALT_PTNS="$(echo "$INSTALLED_ALT_NAMES" | sed -e 's%^%|%' -e 's%$%|%' -e 's%\-%\\-%g')"
-      echo "$INSTALLED_ALT_PTNS" > /var/local/petget_installed_alt_ptns_user
+      echo "$INSTALLED_ALT_PTNS" > /var/local/petget/installed_alt_ptns_pet_user
       echo "$INSTALLED_ALT_PTNS" >> /tmp/petget_installed_patterns_all
      fi
     fi
-    touch /var/local/petget_installed_alt_ptns_user
+    touch /var/local/petget/installed_alt_ptns_pet_user
    else
-    cat /var/local/petget_installed_alt_ptns_user >> /tmp/petget_installed_patterns_all
+    cat /var/local/petget/installed_alt_ptns_pet_user >> /tmp/petget_installed_patterns_all
    fi
   ;;
  esac
 fi
 

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

@@ -12,10 +12,12 @@
 #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).
+#120903 ubuntu, have lots pkgs installed, check_deps.sh takes ages, remove for now, need to rewrite in C.
+#120904 "examine dependencies" button did not create any /tmp/petget_missing_dbentries-*, workaround.
 
 export TEXTDOMAIN=petget___installpreview.sh
 export OUTPUT_CHARSET=UTF-8
 
 [ "$TREE1" = "" ] && exit #120504 nothing to install.
@@ -188,10 +190,19 @@
 if [ "$EXIT" = "BUTTON_EXAMINE_DEPS" ];then
  /usr/local/petget/dependencies.sh
  [ $? -ne 0 ] && exec /usr/local/petget/installpreview.sh #reenter.
  #returns with /tmp/petget_missing_dbentries-* has the database entries of missing deps.
  #the '*' on the end is the repo-file name, ex: Packages-slackware-12.2-slacky
+
+ #120904
+ FNDMISSINGDBENTRYFILE="`ls -1 /tmp/petget_missing_dbentries-* 2>/dev/null`"
+ if [ "$FNDMISSINGDBENTRYFILE" = "" ];then
+  pupdialog --title "$(gettext 'PPM: examine dependencies')" --background LightYellow --msgbox "$(gettext 'There seem to be no missing dependencies.')
+
+$(gettext 'Note: if the previous window indicated that there are missing dependencies, they were not found. Sometimes, a package database lists a dependency that does not actually exist anymore and is not required.')" 0 0
+  exec /usr/local/petget/installpreview.sh #reenter.
+ fi
 
  #compose pkgs into checkboxes...
  MAIN_REPO="`echo "$DB_FILE" | cut -f 2-9 -d '-'`"
  MAINPKG_NAME="`echo "$DB_ENTRY" | cut -f 1 -d '|'`"
  MAINPKG_SIZE="`echo "$DB_ENTRY" | cut -f 6 -d '|'`"
@@ -406,12 +417,13 @@
   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
+#120903 ubuntu, have lots pkgs installed, this takes ages. remove for now, need to rewrite in C...
+##check any missing shared libraries...
+#PKGS="`cat /tmp/petget_missing_dbentries-* | cut -f 1 -d '|' | tr '\n' '|'`"
+#/usr/local/petget/check_deps.sh $PKGS
 
 [ -f /tmp/petget/current-repo-triad.previous ] && mv -f /tmp/petget/current-repo-triad.previous /tmp/petget/current-repo-triad #120504
 
 ###END###

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

@@ -25,10 +25,11 @@
 #120603 /root/.packages/user-installed-packages missing at first boot.
 #120515 gentoo build.
 #120811 category field now supports sub-category |category;subcategory|, use as icon in ppm main window.
 #120822 in precise puppy have a pet 'cups' instead of the ubuntu debs. the latter are various pkgs, including 'libcups2'. we don't want libcups2 showing up as a missing dependency, so have to screen these alternative names out. see also findmissingpkgs.sh.
 #120831 simplify repos radiobuttons. fixes a bug, when make selection in setup wasn't same in main window.
+#120903 bugfix for 120831.
 
 export TEXTDOMAIN=petget___pkg_chooser.sh
 export OUTPUT_CHARSET=UTF-8
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
@@ -109,27 +110,29 @@
  INSTALLED_PATTERNS_USER="`cat /root/.packages/user-installed-packages | cut -f 2 -d '|' | sed -e 's%^%|%' -e 's%$%|%' -e 's%\\-%\\\\-%g'`"
  echo "$INSTALLED_PATTERNS_USER" >> /tmp/petget_installed_patterns_all
  #120822 find alt names in compat-distro pkgs, for user-installed pets...
  case $DISTRO_BINARY_COMPAT in
   ubuntu|debian|raspbian)
+   #120904 bugfix, was very slow...
    MODIF1=`stat --format=%Y /root/.packages/user-installed-packages` #seconds since epoch.
    MODIF2=0
-   [ -f /var/local/petget_installed_alt_ptns_user ] && MODIF2=`stat --format=%Y /var/local/petget_installed_alt_ptns_user`
+   [ -f /var/local/petget/installed_alt_ptns_pet_user ] && MODIF2=`stat --format=%Y /var/local/petget/installed_alt_ptns_pet_user`
    if [ $MODIF1 -gt $MODIF2 ];then
-    INSTALLED_PTNS_PET="$(grep '\.pet|' /root/.packages/user-installed-packages | cut -f 2 -d '|' | sed -e 's%^%/%' -e 's%$%|%' -e 's%\-%\\-%g')"
-    if [ "$INSTALLED_PTNS_PET" != "/|" ];then
-     echo "$INSTALLED_PTNS_PET" > /tmp/petget/installed_ptns_pet_user
-     INSTALLED_ALT_NAMES="$(grep --no-filename -f /tmp/petget/installed_ptns_pet_user /root/.packages/Packages-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}-* | cut -f 2 -d '|')"
+    INSTALLED_PTNS_PET="$(grep '\.pet|' /root/.packages/user-installed-packages | cut -f 2 -d '|')"
+    if [ "$INSTALLED_PTNS_PET" != "" ];then
+     xINSTALLED_PTNS_PET="$(echo "$INSTALLED_PTNS_PET" | sed -e 's%^%/%' -e 's%$%|%' -e 's%\-%\\-%g')"
+     echo "$xINSTALLED_PTNS_PET" > /tmp/petget/fmp_xipp1
+     INSTALLED_ALT_NAMES="$(grep --no-filename -f /tmp/petget/fmp_xipp1 /root/.packages/Packages-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}-* | cut -f 2 -d '|')"
      if [ "$INSTALLED_ALT_NAMES" ];then
       INSTALLED_ALT_PTNS="$(echo "$INSTALLED_ALT_NAMES" | sed -e 's%^%|%' -e 's%$%|%' -e 's%\-%\\-%g')"
-      echo "$INSTALLED_ALT_PTNS" > /var/local/petget_installed_alt_ptns_user
+      echo "$INSTALLED_ALT_PTNS" > /var/local/petget/installed_alt_ptns_pet_user
       echo "$INSTALLED_ALT_PTNS" >> /tmp/petget_installed_patterns_all
      fi
     fi
-    touch /var/local/petget_installed_alt_ptns_user
+    touch /var/local/petget/installed_alt_ptns_pet_user
    else
-    cat /var/local/petget_installed_alt_ptns_user >> /tmp/petget_installed_patterns_all
+    cat /var/local/petget/installed_alt_ptns_pet_user >> /tmp/petget_installed_patterns_all
    fi
   ;;
  esac
 fi
 
@@ -180,10 +183,11 @@
 do
  [ ! -f /root/.packages/$ONEREPO ] && continue
  REPOCUT="`echo -n "$ONEREPO" | cut -f 2-4 -d '-'`"
  [ "$REPOS_RADIO" = "" ] && FIRST_DB="$REPOCUT"
  REPOS_RADIO="${REPOS_RADIO}<radiobutton><label>${REPOCUT}</label><action>/tmp/filterversion.sh ${REPOCUT}</action><action>/usr/local/petget/filterpkgs.sh</action><action>refresh:TREE1</action></radiobutton>"
+ echo "$REPOCUT" >> /tmp/petget_active_repo_list #120903 needed in findnames.sh
  repocnt=`expr $repocnt + 1`
  [ $repocnt -ge 5 ] && break
 done
 
 ##100116 quirky...

Changes to woof-distro/Packages-puppy-noarch-official

@@ -111,11 +111,11 @@
 shared-mime-info_DEV-0.70-6|shared-mime-info_DEV|0.70-6||BuildingBlock|3772K||shared-mime-info_DEV-0.70-6.pet|+shared-mime-info|mime information||||
 shareinternet-2.2.4-1|shareinternet|2.2.4-1||Network|136K||shareinternet-2.2.4-1.pet|+gtkdialog3,+dnsmasq|run puppy as a router||||
 simple_wall_set-0.6-noarch|simple_wall_set|0.6-noarch||Desktop|80K||simple_wall_set-0.6-noarch.pet|+gtkdialog4|SWS simple wallpaper setter||||
 snap2-4.21|snap2|4.21||Utility|152K||snap2-4.21.pet|+rsync|Snap2 snapshot backup||||
 ssh_gui-0.7.1-1-p4|ssh_gui|0.7.1-1-p4||Internet|40K||ssh_gui-0.7.1-1-p4.pet|+gtk+,+openssh_client|secure telnet gui|puppy|4||
-sys-info-0.9|sys-info|0.9||System|148K||sys-info-0.9.pet|+xdriinfo,+xorg|System Information and Video Report, created by TaZoc||||
+sys-info-1.3|sys-info|1.3||System|148K||sys-info-1.3.pet|+xdriinfo,+xorg|System Information and Video Report, created by TaZoc||||
 usb-modeswitch-data-20120815|usb-modeswitch-data|20120815||BuildingBlock|297K||usb-modeswitch-data-20120815.pet||mode switcher data base||||
 wallpaper-0.6.1-1|wallpaper|0.6.1-1||Desktop|116K||wallpaper-0.6.1-1.pet|+gtkdialog4|Set backdrop image||||
 wcpufreq-0.8|wcpufreq|0.8||System|53K||wcpufreq-0.8.pet||CPU Frequency Scaling Tool||||
 woo-ff-0.1.1|woo-ff|0.1.1||Multimedia|48K||woo-ff-0.1.1.pet|+ffmpeg,+gtkdialog3|woo-ff - multimedia converter||||
 xkbconfigmanager-1.1-1|xkbconfigmanager|1.1-1||Desktop|144K||xkbconfigmanager-1.1-1.pet|+xorg|xorg keyboard manager||||