Skip to content

Commit

Permalink
PPM. Support colon in package nemes
Browse files Browse the repository at this point in the history
  • Loading branch information
mavrothal committed Feb 21, 2020
1 parent d61e6bb commit 448ed13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions woof-code/rootfs-skeleton/usr/local/petget/installpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ case $DLPKG_BASE in
DLPKG_MAIN="`basename $DLPKG_BASE .pet`"
pet2tgz $DLPKG_BASE || exit 1
tarball=$(echo ${DLPKG_MAIN}.tar.[gx]z)
PETFILES="$(tar --list -f $tarball)" || exit 1
PETFILES="$(tar --force-local --list -f $tarball)" || exit 1
#check for renamed pets. Will produce an empty ${DLPKG_NAME}.files file
PETFOLDER=$(echo "${PETFILES}" | cut -f 2 -d '/' | head -n 1)
[ "$PETFOLDER" = "" ] && PETFOLDER=$(echo "${PETFILES}" | cut -f 1 -d '/' | head -n 1)
Expand All @@ -251,13 +251,13 @@ case $DLPKG_BASE in
pPATTERN="s%^\\./${DLPKG_NAME}%%"
echo "$PETFILES" | sed -e "$pPATTERN" -e "s#^\.\/#\/#g" -e "s#^#\/#g" -e "s#^\/\/#\/#g" -e 's#^\/$##g' -e 's#^\/\.$##g' > /root/.packages/${DLPKG_NAME}.files
install_path_check
tar -x --strip=2 --directory=${DIRECTSAVEPATH}/ -f ${tarball} #120102. 120107 remove --unlink-first
tar -x --force-local --strip=2 --directory=${DIRECTSAVEPATH}/ -f ${tarball} #120102. 120107 remove --unlink-first
else
#new2dir and tgz2pet creates them this way...
pPATTERN="s%^${DLPKG_NAME}%%"
echo "$PETFILES" | sed -e "$pPATTERN" -e "s#^\.\/#\/#g" -e "s#^#\/#g" -e "s#^\/\/#\/#g" -e 's#^\/$##g' -e 's#^\/\.$##g' > /root/.packages/${DLPKG_NAME}.files
install_path_check
tar -x --strip=1 --directory=${DIRECTSAVEPATH}/ -f ${tarball} #120102. 120107. 131122
tar -x --force-local --strip=1 --directory=${DIRECTSAVEPATH}/ -f ${tarball} #120102. 120107. 131122
fi
rm -f "${tarball}"
[ $? -ne 0 ] && clean_and_die
Expand All @@ -278,10 +278,10 @@ case $DLPKG_BASE in
DLPKG_MAIN=${DLPKG_MAIN%*.tar.*} #remove .tar.xx extension
DLPKG_MAIN=${DLPKG_MAIN%.t[gx]z} #remove .t[gx]z extension
DLPKG_MAIN=${DLPKG_MAIN%.tzst} #remove .tzst extension
PFILES="`tar --list -a -f $DLPKG_BASE`" || exit 1
PFILES="`tar --force-local --list -a -f $DLPKG_BASE`" || exit 1
echo "$PFILES" | sed -e "s#^\.\/#\/#g" -e "s#^#\/#g" -e "s#^\/\/#\/#g" -e 's#^\/$##g' -e 's#^\/\.$##g' > /root/.packages/${DLPKG_NAME}.files
install_path_check
tar -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102. 120107
tar -x --force-local --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE #120102. 120107
[ $? -ne 0 ] && clean_and_die
;;
*.rpm) #110523
Expand Down
2 changes: 1 addition & 1 deletion woof-code/rootfs-skeleton/usr/local/petget/verifypkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ case $DLPKG in
exit $?
;;
*.t[gx]z|*.tar.*)
tar -tf "$DLPKG" >/dev/null 2>&1
tar -tf --force-local "$DLPKG" >/dev/null 2>&1
exit $?
;;
esac
Expand Down

0 comments on commit 448ed13

Please sign in to comment.