Check-in [0cc4a30c89]
Not logged in

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

Overview

SHA1 Hash:0cc4a30c89546f783256fb8ea3ab241d54f43564
Date: 2012-01-07 09:41:44
User: BarryK
Comment:rerwin: space-char in paths, tar errors, fixes for ppm scripts

Tags And Properties
Changes

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

@@ -22,10 +22,11 @@
 #111013 shinobar: aufs direct-write to layer not working, bypass for now.
 #111013 revert above. it works for me, except if file already on top -- that is another problem, needs to be addressed.
 #111207 improve search for menu icon.
 #111229 /usr/local/petget/removepreview.sh when uninstalling a pkg, may have copied a file from sfs-layer to top, check.
 #120102 install may have overwritten a symlink-to-dir.
+#120107 rerwin: need quotes around some paths in case of space chars. remove '--unlink-first' from tar (was introduced 120102, don't think necessary).
 
 #information from 'labrador', to expand a .pet directly to '/':
 #NAME="a52dec-0.7.4"
 #pet2tgz "${NAME}.pet"
 #tar -C / --transform 's/^\(\.\/\)\?'"$NAME"'//g' -zxf "${NAME}.tar.gz"
@@ -129,17 +130,17 @@
   if [ "`echo "$PETFILES" | grep '^\\./'`" != "" ];then
    #ttuuxx has created some pets with './' prefix...
    pPATTERN="s%^\\./${DLPKG_NAME}%%"
    echo "$PETFILES" | sed -e "$pPATTERN" > /root/.packages/${DLPKG_NAME}.files
    install_path_check
-   tar -z -x --unlink-first --strip=2 --directory=${DIRECTSAVEPATH}/ -f ${DLPKG_MAIN}.tar.gz #120102
+   tar -z -x --strip=2 --directory=${DIRECTSAVEPATH}/ -f ${DLPKG_MAIN}.tar.gz #120102. 120107 remove --unlink-first
   else
    #new2dir and tgz2pet creates them this way...
    pPATTERN="s%^${DLPKG_NAME}%%"
    echo "$PETFILES" | sed -e "$pPATTERN" > /root/.packages/${DLPKG_NAME}.files
    install_path_check
-   tar -z -x --unlink-first --strip=1 --directory=${DIRECTSAVEPATH}/ -f ${DLPKG_MAIN}.tar.gz #120102
+   tar -z -x --strip=1 --directory=${DIRECTSAVEPATH}/ -f ${DLPKG_MAIN}.tar.gz #120102. 120107
   fi
  ;;
  *.deb)
   DLPKG_MAIN="`basename $DLPKG_BASE .deb`"
   PFILES="`dpkg-deb --contents $DLPKG_BASE | tr -s ' ' | cut -f 6 -d ' '`"
@@ -159,11 +160,11 @@
   PFILES="`tar --list -z -f $DLPKG_BASE`"
   #hmmm, got a case where passed the above test but failed here...
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
-  tar -z -x --unlink-first --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102
+  tar -z -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102. 120107
  ;;
  *.txz) #100616
   DLPKG_MAIN="`basename $DLPKG_BASE .txz`" #ex: scite-1.77-i686-2as
   xz --test $DLPKG_BASE > /dev/null 2>&1
   [ $? -ne 0 ] && exit 1
@@ -170,31 +171,31 @@
   PFILES="`tar --list -J -f $DLPKG_BASE`"
   #hmmm, got a case where passed the above test but failed here...
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
-  tar -J -x --unlink-first --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102
+  tar -J -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102. 120107
  ;;
  *.tar.gz)
   DLPKG_MAIN="`basename $DLPKG_BASE .tar.gz`" #ex: acl-2.2.47-1-i686.pkg
   gzip --test $DLPKG_BASE > /dev/null 2>&1
   [ $? -ne 0 ] && exit 1
   PFILES="`tar --list -z -f $DLPKG_BASE`"
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
-  tar -z -x --unlink-first --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102
+  tar -z -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102. 120107
  ;;
  *.tar.bz2) #100110
   DLPKG_MAIN="`basename $DLPKG_BASE .tar.bz2`"
   bzip2 --test $DLPKG_BASE > /dev/null 2>&1
   [ $? -ne 0 ] && exit 1
   PFILES="`tar --list -j -f $DLPKG_BASE`"
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
-  tar -j -x --unlink-first --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102
+  tar -j -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102. 120107
  ;;
  *.rpm) #110523
   DLPKG_MAIN="`basename $DLPKG_BASE .rpm`"
   busybox rpm -qp $DLPKG_BASE > /dev/null 2>&1
   [ $? -ne 0 ] && exit 1
@@ -222,24 +223,24 @@
 while read ONESPEC
 do
  if [ -d "${DIRECTSAVEPATH}${ONESPEC}" ];then
   if [ ! -h "${DIRECTSAVEPATH}${ONESPEC}" ];then
    DIRLINK=""
-   if [ -h /initrd${PUP_LAYER}${ONESPEC} ];then
-    DIRLINK="`readlink -m /initrd${PUP_LAYER}${ONESPEC} | sed -e "s%/initrd${PUP_LAYER}%%"`" #PUP_LAYER: see /etc/rc.d/PUPSTATE
-    xDIRLINK="`readlink /initrd${PUP_LAYER}${ONESPEC}`"
+   if [ -h "/initrd${PUP_LAYER}${ONESPEC}" ];then #120107
+    DIRLINK="`readlink -m "/initrd${PUP_LAYER}${ONESPEC}" | sed -e "s%/initrd${PUP_LAYER}%%"`" #PUP_LAYER: see /etc/rc.d/PUPSTATE. 120107
+    xDIRLINK="`readlink "/initrd${PUP_LAYER}${ONESPEC}"`" #120107
    fi
    if [ ! "$DIRLINK" ];then
-    if [ -h /initrd${SAVE_LAYER}${ONESPEC} ];then
-     DIRLINK="`readlink -m /initrd${SAVE_LAYER}${ONESPEC} | sed -e "s%/initrd${SAVE_LAYER}%%"`" #SAVE_LAYER: see /etc/rc.d/PUPSTATE
-     xDIRLINK="`readlink /initrd${SAVE_LAYER}${ONESPEC}`"
+    if [ -h "/initrd${SAVE_LAYER}${ONESPEC}" ];then #120107
+     DIRLINK="`readlink -m "/initrd${SAVE_LAYER}${ONESPEC}" | sed -e "s%/initrd${SAVE_LAYER}%%"`" #SAVE_LAYER: see /etc/rc.d/PUPSTATE. 120107
+     xDIRLINK="`readlink "/initrd${SAVE_LAYER}${ONESPEC}"`" #120107
     fi
    fi
    if [ "$DIRLINK" ];then
     if [ -d "$DIRLINK"  ];then
      if [ "$DIRLINK" != "${ONESPEC}" ];then #precaution.
-      mkdir -p ${DIRECTSAVEPATH}${DIRLINK}
+      mkdir -p "${DIRECTSAVEPATH}${DIRLINK}" #120107
       cp -a -f --remove-destination ${DIRECTSAVEPATH}"${ONESPEC}"/* "${DIRECTSAVEPATH}${DIRLINK}/" #ha! fails if put double-quotes around entire expression.
       rm -rf "${DIRECTSAVEPATH}${ONESPEC}"
       if [ "$DIRECTSAVEPATH" = "" ];then
        ln -s "$xDIRLINK" "${ONESPEC}"
       else

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

@@ -13,10 +13,11 @@
 #110211 shinobar: was the dependency logic inverted.
 #110706 update menu if .desktop file exists.
 #111228 if snapmergepuppy running, wait for it to complete.
 #120101 01micko: jwm >=547 has -reload, no screen flicker.
 #120103 shinobar, bk: improve file deletion when older file in lower layer.
+#120107 rerwin: need quotes around some paths in case of space chars.
 
 . /etc/rc.d/PUPSTATE  #111228 this has PUPMODE and SAVE_LAYER.
 . /etc/DISTRO_SPECS #has DISTRO_BINARY_COMPAT, DISTRO_COMPAT_VERSION
 . /root/.packages/DISTRO_PKGS_SPECS
 
@@ -100,11 +101,11 @@
  #do it again, looking for empty directories...
  cat /root/.packages/${DB_pkgname}.files |
  while read ONESPEC
  do
   if [ -d "$ONESPEC" ];then
-   [ "`ls -1 $ONESPEC`" = "" ] && rmdir $ONESPEC 2>/dev/null
+   [ "`ls -1 "$ONESPEC"`" = "" ] && rmdir "$ONESPEC" 2>/dev/null #120107
   fi
  done
  ###+++2011-12-27 KRG
 else
  firstchar=`echo ${DB_pkgname} | cut -c 1`