Pkg - CLI package manager
Updates to Pkg:
- fixes for LxPup64:
* added lxPup64 repo entries to ~/.pkg/sources-all, fixed some existing ones
* fixes in parsing the repo vars in ~/.packages/DISTRO_COMPAT_REPOS
* fixes in building the package download URL
* other related fixes
- fixes in `pkg_status` when finding a packages repo file
* this makes `pkg status <package-name>` return better info more often
- some fixes in the installer
* this may have fixed the installer bug mentioned earlier in the thread
See main post for download.
- fixes for LxPup64:
* added lxPup64 repo entries to ~/.pkg/sources-all, fixed some existing ones
* fixes in parsing the repo vars in ~/.packages/DISTRO_COMPAT_REPOS
* fixes in building the package download URL
* other related fixes
- fixes in `pkg_status` when finding a packages repo file
* this makes `pkg status <package-name>` return better info more often
- some fixes in the installer
* this may have fixed the installer bug mentioned earlier in the thread
See main post for download.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
hi sc0ttman,
just wanted to say that pkg is brilliant. i'm using it in bionicpup64 in a number of ways. first off i have it update the repos every boot with a script in /root/Startup so that the PPM is always up-to date.
I'm also using it in /usr/local/petget/hacks-postinstall.sh to fix packages that don't install completely with the PPM, for instance openshot misses some deps when installed so pkg fires up and grabs the missing stuff
and finally i've used it in some of bionics pet pinstall.sh scripts. gimp from quickpet for example
BTW i've found that some apps need update-icon-caches /usr/share/icons/*
maybe worth adding
in bionicpup i've hidden the gui menu entries as i don't want to confuse new users. they are still there though and can be turned on in the menu manager.
now you asked for feature requests, and i think i have asked this before. my feature request is an option to check for updates to inbuilt packages and offer to install them.
anyway .. brilliant work and loving it!
just wanted to say that pkg is brilliant. i'm using it in bionicpup64 in a number of ways. first off i have it update the repos every boot with a script in /root/Startup so that the PPM is always up-to date.
I'm also using it in /usr/local/petget/hacks-postinstall.sh to fix packages that don't install completely with the PPM, for instance openshot misses some deps when installed so pkg fires up and grabs the missing stuff
Code: Select all
openshot-qt_*)
if [ -f /usr/bin/openshot-qt ];then
yaf-splash -bg lightgreen -fg black -placement top -timeout 8 -text "installing missing deps for openshot" &
urxvt -e pkg -f repo bionic-multiverse get python3-sip python3-requests python3-pkgconfig
fi
;;
Code: Select all
#!/bin/sh
yaf-splash -bg lightgreen -fg black -placement top -timeout 8 -text "installing missing dependencies" &
urxvt -e pkg repo bionic-universe get libamd2 libblas3 libcamd2,libccolamd2 libcholmod3 libcolamd2 libgexiv2-2 libgfortran4 libheif1 libilmbase12 liblapack3 libmetis5 libopenexr22 libraw16 libspiro0 libsuitesparseconfig5 libumfpack5 libwebpmux3 libwebpdemux2 mypaint-brushes
update-icon-caches /usr/share/icons/*
yaf-splash -bg lightgreen -fg black -placement top -timeout 4 -text "gimp installed"
maybe worth adding
in bionicpup i've hidden the gui menu entries as i don't want to confuse new users. they are still there though and can be turned on in the menu manager.
now you asked for feature requests, and i think i have asked this before. my feature request is an option to check for updates to inbuilt packages and offer to install them.
anyway .. brilliant work and loving it!
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
Thanks very much I like it too.666philb wrote:hi sc0ttman,
just wanted to say that pkg is brilliant.
Given I've never booted bionicpup64, I'm glad to hear it is working...666philb wrote:i'm using it in bionicpup64 in a number of ways.
BTW, if you call pkg as gpkg, you will get a graphical download progress bar..
Depending on your needs, you might be able to do away with the rxvt popups ..
Noted, will do, thanks.666philb wrote:BTW i've found that some apps need update-icon-caches /usr/share/icons/*
maybe worth adding
A few weeks ago, I tried updating the `pkg update` command to also update builtins.. But hit some unintended snags and didn't have the time...now you asked for feature requests, and i think i have asked this before. my feature request is an option to check for updates to inbuilt packages and offer to install them
..And way back I looked into it, and it turns out the PPM merges the updated packages back into the main repo and
gets rid of the list containing updated packages only (IIRC)... Long story short, Pkg never gets a look at which 'new' and
'updated' packages are added to the repo - so it cant show you a list like "Here are packages you can update:" ...
Maybe some hacks to /usr/local/petget/0setup would do it .... Just need to save out the repo entries of the
new packages into their own text file before they get merged into the main repo files...
If the PPM saved a list of these newer versioned packages in /tmp/petget_repoupdate_newpkgs, then at boot Pkg can
update the repos as usual (to generate that file), then read that file and list for the user right away which updated packages
are available to install.
Or some other method... But the point is - if the PPM added the updated packages to a separate file, we could easily copy the
big boy distros and have a popup message in the terminal at first boot, or a pop GUI on running X (etc) that listed the
newly available package updates.
(maybe it already has something to hook into, I don't know, couldn't find it, and 01micko said it would be a pain due to how
PPM works.. maybe mavrothal or someone can think of a good/easy solution?)
Glad to hear it666philb wrote:anyway .. brilliant work and loving it!
Thanks, glad it's of use for you!rockedge wrote:pkg is excellent...huge potential.
I am close to a working (reliable) install script for a complete LAMP and ZoneMinder setup...one click. pkg is what makes this approach possible.
@sc0ttman... it's a master piece in my book.
One of the reasons for making Pkg was to make it easier to create GUIs that can download and install packages..
Things like QuickPet can be made much easier, with less code..
And I'm hoping that users catch on to the potential of creating their own repos, full of custom/merged/combined
packages and SFS files - of all which is now easy to do using Pkg... It just needs a few fixes here and there when
combining and merging packages..
And more generally I'm happy to see Pkg being used for a variety of things... Pretty cool
------------------------------------------
On another note,
I did a mini tutorial on busybox httpd and Bash CGI scripts ...
Or, "web-based GUIs for command line programs" as it could be called
It seems very possible to make a website that can create custom puppy ISOs:
* choose the ISO from a dropdown list
* click 'Begin' button
* ISO and main SFS is unpacked
* a list of all installed packages is presented, uncheck the ones you wanna remove, click 'Next'
* choose a repo from dropdown, it will list all its packages, check/tick the packages you wanna include, click 'Next'
* show a list of extra SFS files that can be added to the ISO, check the ones you want, click 'Next'
* show a form so user can choose themes and default options from dropdowns, input boxes etc
* click 'Build' button
* the SFS and then the ISO are rebuilt and offered for download
...something like that anyway... Basically a remaster tool, but from a webpage... Salix had one, other distros too...
No reason why Puppy can't have one, hosted at ibiblio, smokey01, or sdf.org somewhere ...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
About the update packages needed info.
What about using the info provided in /var/packages
The files:
user-installed-packages
woof-installed-packages
There is Updates_mgr program in some Slacko versions that looks at the Slackware updates repository for updates.
http://distro.ibiblio.org/puppylinux/pe ... r-0.11.pet
It seems to use this to check what to update.
Later in the code it makes a list of what to update.
What about using the info provided in /var/packages
The files:
user-installed-packages
woof-installed-packages
There is Updates_mgr program in some Slacko versions that looks at the Slackware updates repository for updates.
http://distro.ibiblio.org/puppylinux/pe ... r-0.11.pet
It seems to use this to check what to update.
Code: Select all
# check if we already have the latest $SELECTION
grep -q "$1" $PKGINFODIR/woof-installed-packages
[ "$?" = 0 ] && INSTWOOF=yes
grep -q "$1" $PKGINFODIR/user-installed-packages
[ "$?" = 0 ] && INSTUSER=yes
if [[ "$INSTWOOF" || "$INSTUSER" ]];then
MSGINSTALLED=$(eval_gettext "$1 seems already to be installed. Exiting now.")
gtkdialog-splash -bg pink -close box -timeout 6 -text "$MSGINSTALLED"
exit
fi
Code: Select all
# show only patches of installed apps #add firefox and seamonkey
#get rid of dep info, can bork
[ -f /tmp/update_slack_database ] && rm /tmp/update_slack_database
while read PLINE
do XLINE=$(echo $PLINE|cut -d '|' -f1,2,3,6,8,10)
echo "$XLINE" >> /tmp/update_slack_database
done <$PKGINFODIR/Packages-slackware${X}-$DISTRO_COMPAT_VERSION-patches
while read line
do PKGNAME=$(echo $line|cut -d '|' -f2)
PKGNAMEVER=${PKGNAME}-
PKGVER=$(echo $line|cut -d '|' -f1)
if [ "$PKGNAME" = "mozilla-firefox" ];then
echo "$line" >> /tmp/updates_slack.lst
fi
if [ "$PKGNAME" = "seamonkey" ];then
echo "$line" >> /tmp/updates_slack.lst
fi
# filter if a default or user installed package
INSTALLEDWOOF=$(grep $PKGNAMEVER $PKGINFODIR/woof-installed-packages)
INSTALLEDUSER=$(grep $PKGNAMEVER $PKGINFODIR/user-installed-packages)
if [ "$INSTALLEDWOOF" ]||[ "$INSTALLEDUSER" ];then
# filter if it is up to date, assuming we don't roll back
CURINWOOF=$(grep $PKGVER $PKGINFODIR/woof-installed-packages)
CURINUSER=$(grep $PKGVER $PKGINFODIR/user-installed-packages)
if [ ! "$CURINWOOF" ]&&[ ! "$CURINUSER" ];then
echo "$line" >> /tmp/updates_slack.lst
fi
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
Thanks for the link, I hadn't seen that before..bigpup wrote:About the update packages needed info.
What about using the info provided in /var/packages ?
But, Pkg already does this, somewhat - just run `pkg update [pkgname]` and it will compare the
installed version to the latest repo versions..
The only issues at the moment being that Pkg refuses to update the built-ins, and Pkg has no
access to a ready made list of available updates - you must give a package name, or loop
through all packages..
About the updates_mgr script:
So, in general it does this:
1. downloads the latest repo (containing the new packages)
2. goes through the list of new packages
3. gets the latest version of each new package (from 'patches' or 'updates' repo files)
4. compares the versions to installed versions
5. if installed version is older than repo version, offers to update
..but this is Slackware only, and won't work for non-slack pups.
(01mickos updates_mgr is essentially a re-write of some repo update code that already exists in the PPM,
... the fact he wrote a separate script and doesn't just cat a file, kinda proves my point.)
Therefore, IMHO, the method I described is still probably best - to patch the PPM to leave a list
of the available package updates somewhere for other programs to make use of..
IMHO, the code for listing available updates should live in one place - the PPM - and not be re-written for
each Pup that gets made .. Also, we don't wanna re-update the repos just to generate or grab the list of
new packages if the PPM already updated the repos - cos the PPM should/could have generated it already.
And we certainly don't wanna have to loop through all packages just to find a few updates after they
were merged in with the rest (as is the current situation).
Having a separate list means at boot you just cat a file to get the list of available updates, cos the info is
always available, and you won't have run a slow script and make the user wait to get it...
Even better is making 2 lists: one for security updates, one for other updates. Not sure how easy that
would be - Slackware repo structures would allow for it, dunno about other distros though...
....
About removing/updating built-in packages using Pkg:
Currently it's not possible, but I think allowing *only* the `install` and `uninstall` commands to
affect built-ins should be enough.. Users would then be able to download, install or remove
built-ins, using `pkg download`, `pkg install` and `pkg uninstall` with the -F option...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
A Puppy frugal install has built-ins in a read only .sfs file.About removing/updating built-in packages using Pkg:
Currently it's not possible, but I think allowing *only* the `install` and `uninstall` commands to
affect built-ins should be enough.. Users would then be able to download, install or remove
built-ins, using `pkg download`, `pkg install` and `pkg uninstall` with the -F option...
Usually the Puppy version main .sfs file.
It will not let you uninstall them.
What the Remove Builtin Packages program does is white list a program so it is no longer seen by the OS.
The program is still in the .sfs file.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
I know - I'm aware remaster would still be needed to properly remove them...bigpup wrote:A Puppy frugal install has built-ins in a read only .sfs file....What the Remove Builtin Packages program does is white list a program so it is no longer seen by the OS.
That is why Pkg doesn't handle them the same as regular packages..
(it currently refuses to touch them)
When I say Pkg should be able to 'uninstall' built-ins, I mean in the same
way the "Remove Builtin Packages" tool does it (as in hides them with
whiteout files)...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
Hi Sc0ttman,
Just wanted to say this creation of yours is the best thing to happen in a long time here. Was in Radky's RC3, have now went to RC4, and everything still goes when I'm experimenting.
Something you wrote a few messages above hit me between the eyes with the proverbial anvil:
I think if what you wrote ever comes to pass:
Anyway, much kudos all around to you for getting Pkg this far. I stumbled around with it at first, but now it is mostly successes, which brings no end of delight to me.
I figure if a dunderhead like me can understand it and get it to work most of the time, then this thing has--in my old eyes--passed a major, major, MAJOR test/threshold.
Just wanted to say this creation of yours is the best thing to happen in a long time here. Was in Radky's RC3, have now went to RC4, and everything still goes when I'm experimenting.
Something you wrote a few messages above hit me between the eyes with the proverbial anvil:
4-5 years ago (back in my original Belham iteration) I had posted here on murga ruminating---after having using Porteus and their "build-your-ISO" website, which let you choose some, not all, but some things like browser, word processors, etc----if this would ever be possible in Puppy-land. Even using Pkg, it didn't dawn on me it could actually do this.It seems very possible to make a website that can create custom puppy ISOs:
I think if what you wrote ever comes to pass:
....then the world of Puppy definitely takes its [i]next step of evolution[/i].It seems very possible to make a website that can create custom puppy ISOs:
* choose the ISO from a dropdown list
* click 'Begin' button
* ISO and main SFS is unpacked
* a list of all installed packages is presented, uncheck the ones you wanna remove, click 'Next'
* choose a repo from dropdown, it will list all its packages, check/tick the packages you wanna include, click 'Next'
* show a list of extra SFS files that can be added to the ISO, check the ones you want, click 'Next'
* show a form so user can choose themes and default options from dropdowns, input boxes etc
* click 'Build' button
* the SFS and then the ISO are rebuilt and offered for download
Anyway, much kudos all around to you for getting Pkg this far. I stumbled around with it at first, but now it is mostly successes, which brings no end of delight to me.
I figure if a dunderhead like me can understand it and get it to work most of the time, then this thing has--in my old eyes--passed a major, major, MAJOR test/threshold.
Thanks for the kind words belham, glad Pkg is (mostly!) working for you.
I still plan to keep working on it, but I'm sidetracked at the mo...
Currently working on Mdsh - a static website (and documentation/manpage) generator..
When it's done, it will be a great way of building and hosting a 100% free blog, and of generating documentation across various distros/systems...
(It could be used to auto-generate wikis, docs & webpages for each Puppy release, for example )
I still plan to keep working on it, but I'm sidetracked at the mo...
Currently working on Mdsh - a static website (and documentation/manpage) generator..
When it's done, it will be a great way of building and hosting a 100% free blog, and of generating documentation across various distros/systems...
(It could be used to auto-generate wikis, docs & webpages for each Puppy release, for example )
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
LxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Hi sc0ttman,
I thought you might find XBPS package manager used in Void Linux interesting since it is an independently developed package management system (though not, in its present form, for Puppy, but who knows what might be done with it should devs here make a fork of it). I briefly describe my recent look at Void Linux here:
http://www.murga-linux.com/puppy/viewto ... 51#1022151
wiak
I thought you might find XBPS package manager used in Void Linux interesting since it is an independently developed package management system (though not, in its present form, for Puppy, but who knows what might be done with it should devs here make a fork of it). I briefly describe my recent look at Void Linux here:
http://www.murga-linux.com/puppy/viewto ... 51#1022151
wiak
WeeDogLinux forum: https://weedoglinux.rockedge.org/viewforum.php?f=4
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Hello S0ttman,
since you discovered my thread, I'll start reporting issues. I haven't reported any yet because my original plan was to troubleshoot first, since I don't know what errors might be due to me installing pkg wrong vs a bug in pkg.
In the following example pkg appears to download the pacakge (to /root/pkg) but some of the paths look worng,. They have a "//".
since you discovered my thread, I'll start reporting issues. I haven't reported any yet because my original plan was to troubleshoot first, since I don't know what errors might be due to me installing pkg wrong vs a bug in pkg.
In the following example pkg appears to download the pacakge (to /root/pkg) but some of the paths look worng,. They have a "//".
Code: Select all
pkg --download geany_1.29-1
wget --no-check-certificate --progress=dot -O /root/pkg/geany_1.29-1_i386.deb -4 -c http://deb.devuan.org/merged/pool/DEBIAN/main/g/geany/geany_1.29-1_i386.deb
...
Downloaded: /root/pkg/geany_1.29-1_i386.deb
...
+ case $1 in
++ func_list
++ '[' -f /tmp/pkg//func_list ']'
++ tr '\t' ' '
++ cat /tmp/pkg//func_list
++ cut -f2 '-d '
++ grep -m1 '^geany_1.29-1()'
++ sort
++ exit 0
...
++ user_pkgs_list=/root/.packages/user-installed-packages
++ '[' true '!=' true -a -f /root/.packages/devx-only-installed-packages ']'
++ '[' true '!=' true ']'
++ '[' '!' '' ']'
++ cut -f1 '-d|' /root/.packages/user-installed-packages
++ grep -vE '^\$|^pkg\-'
++ return 0
+ '[' yes = yes -a 'file_5.30-1+deb9u2_i386
libmagic1_5.30-1+deb9u2_i386
libsystemd0_232-25+deb9u11_i386' '!=' '' ']'
+ clean_pkgs
+ rm /tmp/pkg//PKGSDONE
+ LANG=en_CA.UTF-8
+ LC_ALL=
+ exit 0
+ cleanup 1 0
+ rm -f '/tmp/pkg/missing_dep*' '/tmp/pkg/installed_pkg*' '/tmp/pkg/all_dep*' /tmp/pkg/DEP_DONE /tmp/pkg/list_deps_busy /tmp/pkg/pkg_file_list /tmp/pkg//dependents_list /tmp/pkg/DEP_DONE /tmp/pkg/ldd_file_list
...
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].
Now if I delete the downloaded file and do the following command:
I get output like and an infinite loop.
I think what I see being printed is from these lines:
https://gitlab.com/sc0ttj/Pkg/blob/mast ... /pkg#L4923
It looks like that one needs the package version to break the loop but the pkg version is in the file name. Also the download was sucesfull so it could look inside the package (i.e. the control file) to get the version.
The issue here might in part due to that in devian/devuan package names are seperated with an underscore character ("_") whereas in other pkg files package names are seperated by a dash ("-") in the file name. PKG should not need to look in the pkg database files for the version because the version is contained in the file name.
I also see that it is not looking in Packages-devuan-ascii-contrib and I see that I'm missing woof-installed-packages (I think I forgot to sync).
Anyway, I'll try syncing and see if I get the same error. I'll Also check why it isn't looking for files like "Packages-devuan-ascii-contrib"
Edit 1
/ # sync_pet_specs_fm_dpkg.sh
P.S. I'll look into why sync_pet_specs_fm_dpkg.sh failed in my build script.
Code: Select all
pkg --get geany_1.29-1
Code: Select all
Install package geany_1.29-1_i386:
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/woof-installed-packages: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/woof-installed-packages: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/woof-installed-packages: No such file or directory
I think what I see being printed is from these lines:
Code: Select all
# get pkg size, category and description
[ "$PKGCAT" = '' ] && PKGCAT=`LANG=C grep -m1 "|${PKGNAME_ONLY}|" "${HOME}/.packages/${REPOFILE}" 2>/dev/null | cut -f5 -d'|' | head -1`
[ "$PKGCAT" = '' ] && PKGCAT=`LANG=C grep -m1 "^${PKGNAME}|" "${HOME}/.packages/${REPOFILE}" 2>/dev/null | cut -f5 -d'|' | head -1`
[ "$PKGDESC" = '' ] && PKGDESC=`LANG=C grep -m1 "|${PKGNAME_ONLY}|" "${HOME}/.packages/${REPOFILE}" 2>/dev/null| cut -f10 -d'|' | head -1`
[ "$PKGDESC" = '' ] && PKGDESC=`LANG=C grep -m1 "^${PKGNAME}|" "${HOME}/.packages/${REPOFILE}" 2>/dev/null| cut -f10 -d'|' | head -1`
[ "$PKGSIZE" = '' ] && PKGSIZE=`LANG=C du -s -k ${CURDIR}/${PKG} 2>/dev/null | cut -f1`
# get pkg version
PKGVER="`LANG=C echo "$PKGNAME" | sed -e 's/^[^0-9]*-//g'`"
It looks like that one needs the package version to break the loop but the pkg version is in the file name. Also the download was sucesfull so it could look inside the package (i.e. the control file) to get the version.
The issue here might in part due to that in devian/devuan package names are seperated with an underscore character ("_") whereas in other pkg files package names are seperated by a dash ("-") in the file name. PKG should not need to look in the pkg database files for the version because the version is contained in the file name.
I also see that it is not looking in Packages-devuan-ascii-contrib and I see that I'm missing woof-installed-packages (I think I forgot to sync).
Anyway, I'll try syncing and see if I get the same error. I'll Also check why it isn't looking for files like "Packages-devuan-ascii-contrib"
Edit 1
/ # sync_pet_specs_fm_dpkg.sh
Code: Select all
...
/ # pkg --get geany_1.29-1
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
Package geany already installed.
Use the -f option to force installation: pkg add geany -f
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].
I think that pkg might be sourcing the wrong pkgrc file.
I see the following code;
here is what I have:
/usr/sbin/pkg#L2055
Here is what I have or /root/.pkg/pkgrc
Looking more at the code I see that PKGRC is set here:
/usr/sbin/pkg#L46
This part looks relevant:
/usr/sbin/pkg#L754
doing some more searching:
/usr/sbin/pkg#L1178
I checked and my $HOME variable is valid. Here is my /root/.pkg/sources file:
anyway... I'm going to take a break for this issue from now and report a new issue.
I see the following code;
here is what I have:
Code: Select all
# get current repo ($REPOFILE)
. ${PKGRC}
Here is what I have or /root/.pkg/pkgrc
Code: Select all
WORKDIR=/root/pkg
REPONAME=ascii-main
EX=deb
REPOFILE=Packages-devuan-ascii-main
REPOURL1=http://deb.devuan.org/merged/
REPOURL2=
REPOURL3=
REPOURL4=
PKGSEARCH="list_pkg_names"
PKGSEARCHEXACT="pkg -ne"
DEPSEARCH="list_all_pkg_names"
DEPSEARCHEXACT="pkg -nea"
REPOFALLBACKS="noarch common ascii ascii-backports ascii-contrib ascii-multimedia ascii-non-free stretch-main stretch-backports stretch-contrib stretch-multimedia dpup upup "
PKGSCOPE="one"
DEPSCOPE="all"
BLEDGE="no"
RDCHECK="yes"
AUTOCLEAN="yes"
BUILDTOOL=petbuild
Code: Select all
[ -z "$PKGRC" ] && export PKGRC=${HOME}/.pkg/pkgrc # config file for this script
This part looks relevant:
Code: Select all
local all_supported_repofiles
# all repo files, full paths
all_supported_repofiles=`repo_file_list | sed "s#^#$HOME/.packages/#" | tr '\n' ' '`
doing some more searching:
Code: Select all
repo_file_list(){ # list available repo files, $1 optional FUNCLIST
# we need to list these repos in the order defined in the RC file
# so Pkg can 'fall back' to other repos in that order
# get current config
. ${PKGRC}
# set vars for this func
local list=''
local repo_file=''
local repo_files=`cut -f3 -d'|' ${HOME}/.pkg/sources`
local current_fallback_list=`grep "^$REPONAME|" ${HOME}/.pkg/sources | cut -f8 -d'|' | grep -v "^\$"`
# get current repo fallback list order.. note if repo not listed in fallback list, it will be appended after
for line in $current_fallback_list
do
# get the repo file
repo_file="`grep "^$line|" ${HOME}/.pkg/sources | cut -f3 -d'|'`"
# add it to the list
[ "$repo_file" != "" ] && list="$list$repo_file "
done
# now add all other avail repos to the end of fallback list
for repo_file in $repo_files
do
#if not blank, not already in the repo list and not the current repo ($REPONAME from rc file) then add to list
[ "$repo_file" != "" -a "`echo "$list" | grep "$repo_file "`" = "" -a "$repo_file" != "$REPOFILE" ] && list="$list$repo_file "
done
# list the current repo first
echo $REPOFILE
# then the other repos
echo "$list" | tr ' ' '\n' | grep -v "^\$"
}
I checked and my $HOME variable is valid. Here is my /root/.pkg/sources file:
Code: Select all
ascii-main|deb|Packages-devuan-ascii-main|http://deb.devuan.org/merged/||||noarch common ascii ascii-backports ascii-contrib ascii-multimedia ascii-non-free stretch-main stretch-backports stretch-contrib stretch-multimedia dpup upup
noarch|pet|Packages-puppy-noarch-official|http://ftp.nluug.nl/os/Linux/distr/puppylinux/pet_packages-noarch/|http://distro.ibiblio.org/puppylinux/pet_packages-noarch/|||common32 common64 common quirky wary5 wary53x wary51x lucid dpup akita puppy5 puppy4 puppy3 puppy2 slacko slacko14
common|pet|Packages-puppy-common-official|http://ftp.nluug.nl/os/Linux/distr/puppylinux/pet_packages-common/|http://distro.ibiblio.org/puppylinux/pet_packages-common/|||noarch quirky wary5 wary53x wary51x lucid dpup akita puppy5 puppy4 puppy3 puppy2 slacko slacko14 saluki
ascii-contrib|deb|Packages-devuan-ascii-contrib|http://deb.devuan.org/merged/|http://|||noarch common common32 common64 ascii ascii-main ascii-backports ascii-multimedia ascii-non-free stretch-main stretch-backports stretch-contrib stretch-multimedia dpup upup
ascii-non-free|deb|Packages-devuan-ascii-non-free|http://deb.devuan.org/merged/||||noarch common common32 common64 ascii ascii-main ascii-backports ascii-contrib ascii-multimedia stretch-main stretch-backports stretch-contrib stretch-multimedia dpup upup
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].
Here is some output for a different issue:
Note that libc6 shouldn't be downloaded and we still have the issue with the pkg database files here.
Code: Select all
/ # pkg -f --get geany_1.29-1
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
Download geany from ascii-main repo:
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
Downloading geany_1.29-1_i386.deb. Please wait: 100%
Downloaded: /root/pkg/geany_1.29-1_i386.deb
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
Install package geany_1.29-1_i386:
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
Installed: geany_1.29-1_i386
cut: /root/.packages/Packages-puppy-noarch-official: No such file or directory
cut: /root/.packages/Packages-puppy-common-official: No such file or directory
Resolving dependencies..
Dependencies to get: geany-common libc6
Download geany-common from ascii-main repo:
Downloading geany-common_1.29-1_all.deb. Please wait: 100%
Downloaded: /root/pkg/geany-common_1.29-1_all.deb
Install package geany-common_1.29-1_all:
Installed: geany-common_1.29-1_all
Download libc6 from ascii-main repo:
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].
Here is a different issue. PKG might have issues with redirects to mirrors
I think I"m wrong here:
Here is the correct link to the mirror download:
http://cdn-fastly.deb.debian.org/debian ... 5_i386.deb
I get the correct link by copying the entire path except the file name and then I get redirected to the mirror.
Anyway, pkg seems to have installed leafpad and dependencies but it seems to fail at detecting that the package was installed.
I think I"m wrong here:
but I don't see the mirror url in the output:...although this could be due to devuan using countermeasures to prevent people from scraping their site. I'm guessing this because we are using the --spider option in wget.
Code: Select all
bash -x pkg -f --get leafpad 2>&1 | tee pkg_get_leafpad.log
...
++ wget -S --spider http://deb.devuan.org/merged/pool/DEBIAN/main/l/leafpad/leafpad_0.8.18.1-5_i386.deb
++ sort -u /tmp/pkg/all_deps_1
++ grep -m1 'HTTP/1.1 404 Not Found'
...
++ PKGNAME_ONLY=leafpad
++ '[' leafpad_0.8.18.1-5 = '' -o leafpad = '' ']'
+++ find /root/.packages/ -name leafpad_0.8.18.1-5.files
++ check=
++ '[' '' = '' ']'
+++ find /root/.packages/ -name 'leafpad_0.8.18.1-5_*.files'
++ check=/root/.packages/leafpad_0.8.18.1-5_i386.files
++ '[' /root/.packages/leafpad_0.8.18.1-5_i386.files = '' ']'
++ '[' /root/.packages/leafpad_0.8.18.1-5_i386.files = '' ']'
++ '[' /root/.packages/leafpad_0.8.18.1-5_i386.files = '' ']'
++ '[' /root/.packages/leafpad_0.8.18.1-5_i386.files = '' ']'
++ '[' /root/.packages/leafpad_0.8.18.1-5_i386.files = '' ']'
++ '[' /root/.packages/leafpad_0.8.18.1-5_i386.files = '' ']'
++ '[' /root/.packages/leafpad_0.8.18.1-5_i386.files '!=' '' ']'
++ echo true
...
++ get_pkg_name_only leafpad_0.8.18.1-5
+ local PKGNAME_ONLY=leafpad
++ is_builtin_pkg leafpad
+ local pkg_is_builtin=false
++ LANG=C
++ grep -m1 '^leafpad$' /tmp/pkg//PKGSDONE
+ local pkg_already_done=
++ is_blacklisted_pkg ''
+ local 'pkg_is_blacklisted=
Usage: [1mpkg installed PKGNAME[0m
Returns true if PKGNAME is user installed,
or a builtin, or in the devx.
Returns false if package not installed.'
+ '[' false = true -a true = true ']'
+ '[' '
Usage: [1mpkg installed PKGNAME[0m
Returns true if PKGNAME is user installed,
or a builtin, or in the devx.
Returns false if package not installed.' = true ']'
+ '[' '' '!=' '' -a true = false ']'
+ echo -n 'Resolving dependencies..'
Resolving dependencies..+ '[' -f /tmp/pkg/list_deps_busy ']'
+ echo
+ '[' -f /tmp/pkg//leafpad_0.8.18.1-5_dep_list ']'
++ cat /tmp/pkg//leafpad_0.8.18.1-5_dep_list
http://cdn-fastly.deb.debian.org/debian ... 5_i386.deb
I get the correct link by copying the entire path except the file name and then I get redirected to the mirror.
Anyway, pkg seems to have installed leafpad and dependencies but it seems to fail at detecting that the package was installed.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].