Check-in [dc585512f0]
Not logged in

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

Overview

SHA1 Hash:dc585512f0c8006083ec49d309dca6617881f149
Date: 2012-05-04 13:27:21
User: BarryK
Comment:ppm: exe,dev,doc,nls pkg selection checkboxes fixed, now support ubuntu,debian pkgs

Tags And Properties
Changes

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

@@ -13,10 +13,11 @@
 #101129 checkboxes for show EXE DEV DOC NLS.
 #101221 yaf-splash fix.
 #110530 ignore packages with different kernel version number, format -k2.6.32.28- in pkg name (also findnames.sh)...
 #120203 BK: internationalized.
 #120504 some files moved into /tmp/petget
+#120504b improved dev/doc/nls/exe pkg selection.
 
 export TEXTDOMAIN=petget___filterpkgs.sh
 export OUTPUT_CHARSET=UTF-8
 
 #export LANG=C
@@ -133,15 +134,36 @@
 [ -e /var/local/petget/postfilter_EXE ] && DEF_CHK_EXE="`cat /var/local/petget/postfilter_EXE`"
 [ -e /var/local/petget/postfilter_DEV ] && DEF_CHK_DEV="`cat /var/local/petget/postfilter_DEV`"
 [ -e /var/local/petget/postfilter_DOC ] && DEF_CHK_DOC="`cat /var/local/petget/postfilter_DOC`"
 [ -e /var/local/petget/postfilter_NLS ] && DEF_CHK_NLS="`cat /var/local/petget/postfilter_NLS`"
 cp -f /tmp/petget/filterpkgs.results /tmp/petget/filterpkgs.results.post
-[ "$DEF_CHK_EXE" = "false" ] && sed -i -e '/_EXE/d' /tmp/petget/filterpkgs.results.post
+#[ "$DEF_CHK_EXE" = "false" ] && sed -i -e '/_EXE/d' /tmp/petget/filterpkgs.results.post
 [ "$DEF_CHK_DEV" = "false" ] && sed -i -e '/_DEV/d' /tmp/petget/filterpkgs.results.post
 [ "$DEF_CHK_DOC" = "false" ] && sed -i -e '/_DOC/d' /tmp/petget/filterpkgs.results.post
 [ "$DEF_CHK_NLS" = "false" ] && sed -i -e '/_NLS/d' /tmp/petget/filterpkgs.results.post
+#120504b fix filtering out _EXE...
+if [ "$DEF_CHK_EXE" = "false" ];then
+ grep -E '_DEV|_DOC|_NLS' /tmp/petget/filterpkgs.results.post > /tmp/petget/filterpkgs.results.post.tmp
+ mv -f /tmp/petget/filterpkgs.results.post.tmp /tmp/petget/filterpkgs.results.post
+fi
+
+#120504b for .deb pkgs, we have alternate naming for dev, doc, nls...
+if [ "`grep -E 'ubuntu|debian' /tmp/petget/filterpkgs.results.post`" != "" ];then
+ #ex line: abiword-doc_1.2.3|[ubuntu-lucid-official] Abiword word processor|ubuntu-lucid-official| (part in [] may not be there, refer findnames.sh)
+ [ "$DEF_CHK_DEV" = "false" ] && sed -i -e '/-dev_/d' /tmp/petget/filterpkgs.results.post
+ [ "$DEF_CHK_DOC" = "false" ] && sed -i -e '/-doc_/d' /tmp/petget/filterpkgs.results.post
+ [ "$DEF_CHK_DOC" = "false" ] && sed -i -e '/-docs_/d' /tmp/petget/filterpkgs.results.post
+ [ "$DEF_CHK_NLS" = "false" ] && sed -i -e '/-langpack/d' /tmp/petget/filterpkgs.results.post
+ [ "$DEF_CHK_NLS" = "false" ] && sed -i -e '/-lang-/d' /tmp/petget/filterpkgs.results.post
+ #filtering out _EXE...
+ if [ "$DEF_CHK_EXE" = "false" ];then
+  grep -E '-dev_|-doc_|-docs_|-langpack|-lang-' /tmp/petget/filterpkgs.results.post > /tmp/petget/filterpkgs.results.post.tmp
+  mv -f /tmp/petget/filterpkgs.results.post.tmp /tmp/petget/filterpkgs.results.post
+ fi
+fi
+
 #...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).
 
 [ $X1PID -ne 0 ] && kill $X1PID
 
 ###END###
 

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

@@ -118,24 +118,44 @@
 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
- #101129 postprocess, show EXE, DEV, DOC, NLS...
+ #101129 postprocess, show EXE, DEV, DOC, NLS... (see also pkg_chooser.sh, filterpkg.sh)
  DEF_CHK_EXE='true'
  DEF_CHK_DEV='false'
  DEF_CHK_DOC='false'
  DEF_CHK_NLS='false'
  [ -e /var/local/petget/postfilter_EXE ] && DEF_CHK_EXE="`cat /var/local/petget/postfilter_EXE`"
  [ -e /var/local/petget/postfilter_DEV ] && DEF_CHK_DEV="`cat /var/local/petget/postfilter_DEV`"
  [ -e /var/local/petget/postfilter_DOC ] && DEF_CHK_DOC="`cat /var/local/petget/postfilter_DOC`"
  [ -e /var/local/petget/postfilter_NLS ] && DEF_CHK_NLS="`cat /var/local/petget/postfilter_NLS`"
  cp -f /tmp/petget/filterpkgs.results /tmp/petget/filterpkgs.results.post
- [ "$DEF_CHK_EXE" = "false" ] && sed -i -e '/_EXE/d' /tmp/petget/filterpkgs.results.post
+ #[ "$DEF_CHK_EXE" = "false" ] && sed -i -e '/_EXE/d' /tmp/petget/filterpkgs.results.post
  [ "$DEF_CHK_DEV" = "false" ] && sed -i -e '/_DEV/d' /tmp/petget/filterpkgs.results.post
  [ "$DEF_CHK_DOC" = "false" ] && sed -i -e '/_DOC/d' /tmp/petget/filterpkgs.results.post
  [ "$DEF_CHK_NLS" = "false" ] && sed -i -e '/_NLS/d' /tmp/petget/filterpkgs.results.post
+ #120504b fix filtering out _EXE...
+ if [ "$DEF_CHK_EXE" = "false" ];then
+  grep -E '_DEV|_DOC|_NLS' /tmp/petget/filterpkgs.results.post > /tmp/petget/filterpkgs.results.post.tmp
+  mv -f /tmp/petget/filterpkgs.results.post.tmp /tmp/petget/filterpkgs.results.post
+ fi
+
+ #120504b for .deb pkgs, we have alternate naming for dev, doc, nls...
+ if [ "`grep -E 'ubuntu|debian' /tmp/petget/filterpkgs.results.post`" != "" ];then
+  #ex line: abiword-doc_1.2.3|[ubuntu-lucid-official] Abiword word processor|ubuntu-lucid-official| (part in [] may not be there)
+  [ "$DEF_CHK_DEV" = "false" ] && sed -i -e '/-dev_/d' /tmp/petget/filterpkgs.results.post
+  [ "$DEF_CHK_DOC" = "false" ] && sed -i -e '/-doc_/d' /tmp/petget/filterpkgs.results.post
+  [ "$DEF_CHK_DOC" = "false" ] && sed -i -e '/-docs_/d' /tmp/petget/filterpkgs.results.post
+  [ "$DEF_CHK_NLS" = "false" ] && sed -i -e '/-langpack/d' /tmp/petget/filterpkgs.results.post
+  [ "$DEF_CHK_NLS" = "false" ] && sed -i -e '/-lang-/d' /tmp/petget/filterpkgs.results.post
+  #filtering out _EXE...
+  if [ "$DEF_CHK_EXE" = "false" ];then
+   grep -E '-dev_|-doc_|-docs_|-langpack|-lang-' /tmp/petget/filterpkgs.results.post > /tmp/petget/filterpkgs.results.post.tmp
+   mv -f /tmp/petget/filterpkgs.results.post.tmp /tmp/petget/filterpkgs.results.post
+  fi
+ fi
  #...main gui will read /tmp/petget/filterpkgs.results.post
 
  #120504 post-process presentation to show which repo...
  #filterpkgs.results.post each line has package-name|description|repo-triad
  #when we have searched multiple repos, move repo-triad into description field, so that it will show up on main window...

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

@@ -16,10 +16,11 @@
 #110706 fix for deps checking.
 #120203 BK: internationalized.
 #120327 sometimes the selected repo radiobutton did not match listed packages at startup.
 #120504 /tmp/petget_filterversion renamed to /tmp/petget/current-repo-triad
 #120504 some files moved into /tmp/petget
+#120504b improved separation of dev,doc,nls,exe, enhanced ubuntu,debian pkg support.
 
 export TEXTDOMAIN=petget___pkg_chooser.sh
 export OUTPUT_CHARSET=UTF-8
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
@@ -52,15 +53,35 @@
 DEF_CHK_NLS='false'
 [ -e /var/local/petget/postfilter_EXE ] && DEF_CHK_EXE=\"\`cat /var/local/petget/postfilter_EXE\`\"
 [ -e /var/local/petget/postfilter_DEV ] && DEF_CHK_DEV=\"\`cat /var/local/petget/postfilter_DEV\`\"
 [ -e /var/local/petget/postfilter_DOC ] && DEF_CHK_DOC=\"\`cat /var/local/petget/postfilter_DOC\`\"
 [ -e /var/local/petget/postfilter_NLS ] && DEF_CHK_NLS=\"\`cat /var/local/petget/postfilter_NLS\`\"
-[ \"\$DEF_CHK_EXE\" = \"false\" ] && sed -i -e '/_EXE/d' /tmp/petget/filterpkgs.results.post
+#[ \"\$DEF_CHK_EXE\" = \"false\" ] && sed -i -e '/_EXE/d' /tmp/petget/filterpkgs.results.post
 [ \"\$DEF_CHK_DEV\" = \"false\" ] && sed -i -e '/_DEV/d' /tmp/petget/filterpkgs.results.post
 [ \"\$DEF_CHK_DOC\" = \"false\" ] && sed -i -e '/_DOC/d' /tmp/petget/filterpkgs.results.post
 [ \"\$DEF_CHK_NLS\" = \"false\" ] && sed -i -e '/_NLS/d' /tmp/petget/filterpkgs.results.post
 " > /tmp/petget/filterpkgs.results.postfilter.sh
+#120504b filter corrections, enhance...
+echo "
+if [ \"\$DEF_CHK_EXE\" = \"false\" ];then
+ grep -E '_DEV|_DOC|_NLS' /tmp/petget/filterpkgs.results.post > /tmp/petget/filterpkgs.results.post.tmp
+ mv -f /tmp/petget/filterpkgs.results.post.tmp /tmp/petget/filterpkgs.results.post
+fi
+#120504b for .deb pkgs, we have alternate naming for dev, doc, nls...
+if [ \"\`grep -E 'ubuntu|debian' /tmp/petget/filterpkgs.results.post\`\" != \"\" ];then
+ #ex line: abiword-doc_1.2.3|[ubuntu-lucid-official] Abiword word processor|ubuntu-lucid-official| (part in [] may not be there, refer findnames.sh)
+ [ \"\$DEF_CHK_DEV\" = \"false\" ] && sed -i -e '/-dev_/d' /tmp/petget/filterpkgs.results.post
+ [ \"\$DEF_CHK_DOC\" = \"false\" ] && sed -i -e '/-doc_/d' /tmp/petget/filterpkgs.results.post
+ [ \"\$DEF_CHK_DOC\" = \"false\" ] && sed -i -e '/-docs_/d' /tmp/petget/filterpkgs.results.post
+ [ \"\$DEF_CHK_NLS\" = \"false\" ] && sed -i -e '/-langpack/d' /tmp/petget/filterpkgs.results.post
+ [ \"\$DEF_CHK_NLS\" = \"false\" ] && sed -i -e '/-lang-/d' /tmp/petget/filterpkgs.results.post
+ #filtering out _EXE...
+ if [ \"\$DEF_CHK_EXE\" = \"false\" ];then
+  grep -E '-dev_|-doc_|-docs_|-langpack|-lang-' /tmp/petget/filterpkgs.results.post > /tmp/petget/filterpkgs.results.post.tmp
+  mv -f /tmp/petget/filterpkgs.results.post.tmp /tmp/petget/filterpkgs.results.post
+ fi
+fi" >> /tmp/petget/filterpkgs.results.postfilter.sh
 chmod 777 /tmp/petget/filterpkgs.results.postfilter.sh
 
 
 #finds all user-installed pkgs and formats ready for display...
 /usr/local/petget/finduserinstalledpkgs.sh #writes to /tmp/installedpkgs.results