Check-in [c5f76a9101]
Not logged in

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

Overview

SHA1 Hash:c5f76a910167a25a8050a4cd92f8734bc49b4bdf
Date: 2012-08-15 12:15:08
User: BarryK
Comment:0setup script, improved allocation of db category field for debian and ubuntu pkgs

Tags And Properties
Changes

Changes to woof-code/0setup

@@ -11,10 +11,11 @@
 #120315 pkg list entries may have optional forced repo field. Ref: http://bkhome.org/blog/?viewDetailed=02414
 #120515 build from "gentoo" binary tarballs (refer support/gentoo). --no need to modify anything in 0setup.
 #120719 support raspbian. fix debian db format change.
 #120804 fix when only have pkgname_DEV, no pkgname.
 #120812 db category now allows optional subcategory (for which an icons exists in /usr/local/lib/X11/mini-icons).
+#120815 for debian, ubuntu, use the generic name provided in the $DB_path, instead of $Package, for find_cat.
 
 export LANG=C #faster.
 
 if [ -f ./DISTRO_SPECS ];then
 . ./DISTRO_SPECS
@@ -311,11 +312,14 @@
      DB_fullfilename="`echo -n "$Filename" | rev | cut -f 1 -d '/' | rev`"
      DB_path="`echo -n "$Filename" | rev | cut -f 2-9 -d '/' | rev`"
      DB_version="`echo -n "$Version" | sed -e 's%^[0-9]:%%' -e "$v1PATTERN" -e "$v2PATTERN"`"
      DB_pkgrelease="`echo -n "$Version" | sed -e 's%^[0-9]:%%' -e "s%${DB_version}%%" -e 's%^\\-%%' -e 's%^\\+%%'`"
      DB_pkgname="${Package}_${DB_version}"
-     DB_category="`${FIND_CAT} $Package "$Description"`" #120812 find_cat now returns category[;subcategory], ex: Document;edit
+     #120815 for debian, ubuntu, use the generic name provided in the $DB_path, instead of $Package, for find_cat...
+     xPackage="$Package"
+     [ "$DB_path" ] && xPackage="$(basename "$DB_path")"
+     DB_category="`${FIND_CAT} $xPackage "$Description"`" #120812 find_cat now returns category[;subcategory], ex: Document;edit
      DB_dependencies="`echo -n "$Depends" | sed -e 's%, %\n%g' | cut -f 1 -d ' ' | tr '\n' ' ' | sed -e 's% $%%' -e 's% %,+%g' -e 's%,$%%'`"
      [ "$DB_dependencies" != "" ] && DB_dependencies='+'"$DB_dependencies"
      echo "$DB_pkgname|$Package|$DB_version|$DB_pkgrelease|$DB_category|${InstalledSize}K|$DB_path|$DB_fullfilename|$DB_dependencies|$Description|" >> $ONE_PKGLISTS_COMPAT
      echo -n "$Package "
      Description=''; Filename=''; Package=''; InstalledSize=''; Architecture=''; Version=''