Tonight I look at Mistfire's first post in the PPMv3 thread for some inscite:
http://murga-linux.com/puppy/viewtopic. ... 901#914058The repo information is implemented by list (csv). The files are located in .packages/database
PET_REPO_LIST - PET Repo list
PET_DB_REPO - Repo list for package database
PET_ORDER_LIST - Priority list for searching packages
COMPAT_REPO_LIST - Compatible distro repo list
COMPAT_DB_REPO - Repo list for Compatible distro package database
The key info here is the file "/root/.packages/database/COMPAT_DB_REPO"
Here is what I have for this file in Tiny_Devaun
Code: Select all
z|http://packages.devuan.org/merged/dists/ascii/main/binary-i386/Packages.xz|Packages-devuan-ascii-main
z|http://packages.devuan.org/merged/dists/ascii/contrib/binary-i386/Packages.xz|Packages-devuan-ascii-contrib
z|http://packages.devuan.org/merged/dists/ascii/non-free/binary-i386/Packages.xz|Packages-devuan-ascii-non-free
z|http://packages.devuan.org/merged/dists/ascii/main/binary-i386/Packages.xz|Packages-devuan-ascii-main
z|http://packages.devuan.org/merged/dists/ascii/contrib/binary-i386/Packages.xz|Packages-devuan-ascii-contrib
z|http://packages.devuan.org/merged/dists/ascii/non-free/binary-i386/Packages.xz|Packages-devuan-ascii-non-free
Such robustness would make it easier for people to configure "pkg".
My Post: http://murga-linux.com/puppy/viewtopic. ... 57#1030857
Sc0ttman's reply: http://murga-linux.com/puppy/viewtopic. ... 98#1030898
I will note that Mistfire's approach is more explicit. Conversly to infer this exact path from one of the pkg configuration files (in sc0tman's ppm) such as :
Code: Select all
/root/.pkg/pkgrc
/root/.pkg/sources
/root/.pkg/sources-all
I will also note that that sc0tman provides a more standard way of adding repos:
Code: Select all
# for each repo in $apt_sources_list, use `ppa2pup` to update the repo
for line in $apt_sources_list
do
[ "$line" = "" ] && continue
[ "$line" = "\n" ] && continue
local ppa_repo_url="$(echo ${line//|/ } | cut -f1 -d" ")"
local ppa_repo_name=$(cat ~/.pkg/sources-all | grep -m1 $ppa_repo_url | cut -f1 -d'|')
# if a PPA repo, get a user-friendly repo name from the /etc/sources.list entry
if [ "$ppa_repo_name" = "" ];then
ppa_repo_name="$(echo ${line} | cut -f3 -d'|')-$(echo $line | cut -f2 -d':' | cut -f1 -d '/' | tr -d '-' | tr -d '_')"
fi
echo
echo "Processing: ${line//|/ }"
ANSWER=y
if [ "$ASK" = true ];then
# ask user to update repo
bash -c 'read -r -N 1 -p "Update repo $ppa_repo_name? [y/n] " ANSWER; echo $ANSWER > /tmp/pkg/ANSWER'
echo
ANSWER="$(cat /tmp/pkg/ANSWER)"
fi
if [ "$ANSWER" = 'y' ] || [ "$ANSWER" = 'Y' ];then
echo "Please wait..."
ppa2pup ${line//|/ } 1>/dev/null && echo -e "${green}Success${endcolour}: Updated repo '$ppa_repo_name'"
retval=$?
fi
done
That is with pkg if a repo follows the debian formant (but not the standard puppy format) then you can add it by updating /etc/sources.list. Note this is slower than the way that the puppy package manager does it but will make it easier to add repos that don't fit puppies standard format (e.g. the tor repo).