That said, I would like to note some key points in the source code that define how the puppy package manager, (i.e. ppm) downloads packages.
The download function is /usr/sbin/download_file. The two main places it is called are in downloadpkgs.sh and in petget. In the modified code (shown below), I specify a filename option that can be used with the download_file function:
around line# 247 of /usr/local/petget/downloadpkgs.sh
Code: Select all
DLPKG="`basename $ONEFILE`"
download_file -O "${DL_PATH}/$DLPKG" ${DOWNLOADFROM}/${ONEFILE}
around line#79 of /usr/local/petget/petget
Code: Select all
#101116 use download_file utility...
download_file -O "$FULLPKGNAME" "$PASSEDPARAM"
For this to work I added the option processing shown below:
around line #45 of /usr/sbin/download_file
Code: Select all
wget_opts=()
while [ $# -gt 0 ]; do
case "$1" in
-O|--output-document)
wget_opts+=( "$1" "$2" );
shift 2
;;
--)
shift 1
break; ;;
*)
break; ;;
esac
done
URLSPEC="$@"
FILENAME="`basename "$@"`"
URLDIR="`dirname "$@"`" #121019
Code: Select all
wget ${wget_opts[@]} -4 ${CONTPARAM} -t 5 -w 5 "${URLSPEC}" > /tmp/download_file_spider.log2 2>&1
My hunch is that these changes are not necessary. One wierd things is that the script is using "$@" to assign variables, rather than $1. Perhaps this is an unusual way to handle spaces in file paths.
Anyway, As I noted above, I think that the changes mentioned in this post probably aren't necessary but if one is having issues with the ppm finding downloaded files then it gives one a clue where to look.