Pkg - CLI package manager

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#91 Post by peebee »

ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#92 Post by wiak »

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

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#93 Post by s243a »

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 "//".

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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#94 Post by s243a »

Now if I delete the downloaded file and do the following command:

Code: Select all

pkg --get geany_1.29-1
I get output like and an infinite loop.

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'`"
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

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
P.S. I'll look into why sync_pet_specs_fm_dpkg.sh failed in my build script.
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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#95 Post by s243a »

I think that pkg might be sourcing the wrong pkgrc file.

I see the following code;

here is what I have:

Code: Select all

  # get current repo ($REPOFILE)
  . ${PKGRC}
/usr/sbin/pkg#L2055

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
Looking more at the code I see that PKGRC is set here:

Code: Select all

[ -z "$PKGRC" ] && export PKGRC=${HOME}/.pkg/pkgrc      # config file for this script
/usr/sbin/pkg#L46

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' ' '`
/usr/sbin/pkg#L754

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 "^\$"
}
/usr/sbin/pkg#L1178

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
anyway... I'm going to take a break for this issue from now and report a new issue.
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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#96 Post by s243a »

reserved
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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#97 Post by s243a »

Here is some output for a different issue:

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: 
Note that libc6 shouldn't be downloaded and we still have the issue with the pkg database files here.
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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#98 Post by s243a »

Here is a different issue. PKG might have issues with redirects to mirrors

I think I"m wrong here:
...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.
but I don't see the mirror url in the output:

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
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.
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].

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#99 Post by mistfire »

@sc0ttman I sent merge request to your gitlab. I filled some missing parts on your source code

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#100 Post by Lobster »

Is this packaging system compiled/available for 64bit eg Puppy8 BionicPup?

Sounds very useful 8)

Puppy Linux
Smaller, faster, Run Free
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#101 Post by s243a »

Lobster wrote:Is this packaging system compiled/available for 64bit eg Puppy8 BionicPup?

Sounds very useful 8)

Puppy Linux
Smaller, faster, Run Free
I think it's all script based...so no need to compile :)
....
there is one exception though. I does utilize compiled tools from puppies package manager (i.e. petget) to convert a Debian repo database file into the puppy format.
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].

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#102 Post by wiak »

pkg worked to some extent at least in a quick very experimental test in FirstRib:

http://www.murga-linux.com/puppy/viewto ... 49#1029849

I have lots of other things I want to get on with so won't be taking pkg use in FirstRib further, but it does look maybe possible that a FirstRib Puppy flavour could be built using pkg as the package manager rather than Void Linux's xbps package manager. Depends how standalone (from actual Puppy) pkg could be made. As I mention in above thread, it would be nice if pkg could have fewer full util dependencies (i.e. work with busybox alone). Very promising though!

wiak

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#103 Post by s243a »

pkg tries to download the following file (which doesn't exist):

http://deb.devuan.org/merged/pool/DEBIA ... 1_i386.deb

the correct path should be:

http://deb.devuan.org/merged/pool/DEBIA ... 1_i386.deb

This might not be a fault of package but might be instead due to how petget converts the debian package database to the puppy format. The "deb9u1_" might not be part of the version field in the debian package database.

**I'll look into this more later.
Last edited by s243a on Thu 06 Jun 2019, 22:12, edited 1 time in total.
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].

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#104 Post by wiak »

s243a wrote:pkg tries to download the following file (which doesn't exist):

http://deb.devuan.org/merged/pool/DEBIA ... 1_i386.deb

the correct path should be:

http://cdn-fastly.deb.debian.org/debian ... 1_i386.deb

This might not be a fault of package but might be instead due to how petget converts the debian package database to the puppy format.
If that proves to be the case I hope that fix gets appropriately prioritised since that conversion/filter is pretty much mission critical for reliable Debian-based Puppy builds.

wiak

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#105 Post by s243a »

wiak wrote:
s243a wrote:pkg tries to download the following file (which doesn't exist):

http://deb.devuan.org/merged/pool/DEBIA ... 1_i386.deb

the correct path should be:

http://cdn-fastly.deb.debian.org/debian ... 1_i386.deb

This might not be a fault of package but might be instead due to how petget converts the debian package database to the puppy format.
If that proves to be the case I hope that fix gets appropriately prioritised since that conversion/filter is pretty much mission critical for reliable Debian-based Puppy builds.

wiak
Well lets verify this is a legitimate error first. Here is the DB field from the pkgdb file in the devaun ascii repo:

Code: Select all

libwayland-client0|1.12.0-1+deb9u1|libwayland-client0_1.12.0-1+deb9u1_i386.deb|http://deb.devuan.org/merged/pool/DEBIAN/main/w/wayland/libwayland-client0_1.12.0-1+deb9u1_i386.deb|optional|libs|80096899735b1b88bd1fa57042116402|libc6, libffi6,
....
more to come.

Here is the entry in dup stretch:

/root/.packages/Packages-debian-stretch-main

Code: Select all

libwayland-client0_1.12.0-1+deb9u1|libwayland-client0|1.12.0-1+deb9u1||BuildingBlock|71K|pool/main/w/wayland|libwayland-client0_1.12.0-1+deb9u1_i386.deb|+libc6&ge2.10,+libffi6&ge3.0.4|wayland compositor infrastructure - client library|debian|stretch|
So the version looks the same on both devaun ascii and dpup stretch. Now I'll try to download it using petget.

I was able to download this using petget on dpup stretch.
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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#106 Post by s243a »

I need to find a good tutotial on the sort utility. I don't understand:

Code: Select all

# sort and clean the search results
LANG=C cat $TMPDIR/pkglist | sort --field-separator='-' -k1,1df -k2gr -k3gr -k4gr | uniq > $TMPDIR/pkglist1
/usr/sbin/pkg#L2090

Note that pkglist is generated in this line:

Code: Select all

  # create the search results
  cut -f1 -d'|' ${HOME}/.packages/${REPOFILE} 2>/dev/null | grep "^$1" > $TMPDIR/pkglist
/usr/sbin/pkg#L2058

I note that the filed seperator in the sort statment is "-". In my example (i.e. libwayland-client0_1.12.0-1+deb9u1) there are two dashes. I wonder if this causes any issues?

Here is some related strange output:

Code: Select all

bash -x pkg --names libwayland-client0 2>&1 | tee wayland_names.log
....
+ cut -f1 '-d|' /root/.packages/Packages-devuan-ascii-main
+ grep '^libwayland-client0'
+ '[' false = true ']'
+ hide_blacklisted_pkgs_from_search_results
+ '[' false = true ']'
++ echo fbset petget rgb sysfiles sysklogd
++ sed -e 's/ /|/g'
+ blacklisted_pkgs_list='fbset|petget|rgb|sysfiles|sysklogd'
+ cat /tmp/pkg//pkglist
+ grep -v -E ''\''fbset|petget|rgb|sysfiles|sysklogd'\'''
+ mv /tmp/pkg//pkglist_without_blacklisted /tmp/pkg//pkglist
+ rm '/tmp/pkg//pkglist_*'
+ '[' false = false ']'
+ local ALIAS_LIST
+ local ALIAS
+ local ALIAS_RES
+ '[' libwayland-client0 '!=' '' -a -f /tmp/pkg//pkg_aliases ']'
++ grep -m1 libwayland-client0 /tmp/pkg//pkg_aliases
++ tr , ' '
+ ALIAS_LIST=
+ echo
+ read ALIAS
+ '[' '' = '' ']'
+ continue
+ read ALIAS
+ LANG=C
+ cat /tmp/pkg//pkglist
+ sort --field-separator=- -k1,1df -k2gr -k3gr -k4gr
+ uniq
+ mv /tmp/pkg//pkglist1 /tmp/pkg//pkglist
+ '[' -s /tmp/pkg//pkglist ']'
+ cat /tmp/pkg//pkglist
libwayland-client0_1.12.0-1
+ '[' '!' -f /tmp/pkg//pkglist ']'
+ rm /tmp/pkg//pkglist
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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#107 Post by s243a »

s243a wrote:
wiak wrote:
s243a wrote:pkg tries to download the following file (which doesn't exist):

http://deb.devuan.org/merged/pool/DEBIA ... 1_i386.deb

the correct path should be:

http://cdn-fastly.deb.debian.org/debian ... 1_i386.deb

This might not be a fault of package but might be instead due to how petget converts the debian package database to the puppy format.
If that proves to be the case I hope that fix gets appropriately prioritised since that conversion/filter is pretty much mission critical for reliable Debian-based Puppy builds.

wiak
Well lets verify this is a legitimate error first. Here is the DB field from the pkgdb file in the devaun ascii repo:

Code: Select all

libwayland-client0|1.12.0-1+deb9u1|libwayland-client0_1.12.0-1+deb9u1_i386.deb|http://deb.devuan.org/merged/pool/DEBIAN/main/w/wayland/libwayland-client0_1.12.0-1+deb9u1_i386.deb|optional|libs|80096899735b1b88bd1fa57042116402|libc6, libffi6,
....
more to come.

Here is the entry in dup stretch:

/root/.packages/Packages-debian-stretch-main

Code: Select all

libwayland-client0_1.12.0-1+deb9u1|libwayland-client0|1.12.0-1+deb9u1||BuildingBlock|71K|pool/main/w/wayland|libwayland-client0_1.12.0-1+deb9u1_i386.deb|+libc6&ge2.10,+libffi6&ge3.0.4|wayland compositor infrastructure - client library|debian|stretch|
So the version looks the same on both devaun ascii and dpup stretch. Now I'll try to download it using petget.

I was able to download this using petget on dpup stretch.
I should note that the above correct record entry woof libwayland-client0 was from the repo database file grabbed by woof next. I looked at the related one that pkg is using and it's wrong:

Code: Select all

libwayland-client0_1.12.0-1|libwayland-client0|1.12.0-1||BuildingBlock|71K|pool/DEBIAN/main/w/wayland|libwayland-client0_1.12.0-1_i386.deb|+libc6&ge2.10,+libffi6&ge3.0.4|wayland compositor infrastructure - client library|devuan|ascii||
I do know that dpup stretch correctly updated the repo, so maybe I"m missing a needed file to properly update the 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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#108 Post by s243a »

wiak wrote:
s243a wrote:pkg tries to download the following file (which doesn't exist):

http://deb.devuan.org/merged/pool/DEBIA ... 1_i386.deb

the correct path should be:

http://cdn-fastly.deb.debian.org/debian ... 1_i386.deb

This might not be a fault of package but might be instead due to how petget converts the debian package database to the puppy format.
If that proves to be the case I hope that fix gets appropriately prioritised since that conversion/filter is pretty much mission critical for reliable Debian-based Puppy builds.

wiak
My preliminarily investigation suggests that sc0tman's "pkg" didn't properly catch an error about an invalid repo path and instead reported that the repo was updated. Above investigation suggests that petget probably correctly converts the debian repo to puppy format.

My error was likely due to woof-next not properly configuring my DISTRO_SPECS. See post:
http://murga-linux.com/puppy/viewtopic. ... 74#1029974

I agree with you that the DISTRO_COMPAT_REPOS files is more complicated than it should be. As an example in the past I had trouble adding the tor repo to puppylinux:
http://murga-linux.com/puppy/viewtopic. ... 6249dd1e2d
http://li969-200.members.linode.com/pup ... d1e969ef49
http://murga-linux.com/puppy/viewtopic. ... 78#1010478

The third link says how I was able to successfully add the tor repo...a brief look back at this fix and I think it might have been an ugly hack!
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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#109 Post by s243a »

To get more log output:

put at the top of
/usr/local/petget/0setup

Code: Select all

set -x
exec &> >(tee -a "repo_update.log")
Then run the command:

Code: Select all

bash -x pkg --repo-update | tee repo_update.log
...
+ xDLFILE=Packages.xz
+ '[' -f Packages.xz ']'
+ case ${DISTRO_BINARY_COMPAT} in
+ '[' -eq 0 ']'
/usr/local/petget/0setup: line 278: [: -eq: unary operator expected
+ LANG=C
+ echo 'Downloaded file is corrupted. Deleting file and aborting.'
Downloaded file is corrupted. Deleting file and aborting.
The related section in the code:

Code: Select all

	   xDLFILE="$DLFILE"
	   if [ -f $DLFILE ];then
		case ${DISTRO_BINARY_COMPAT} in
...
		esac
		if [ $RETSTAT -eq 0 ];then
		 LANG=${LANGORG} echo "...success."
		else
		 LANG=${LANGORG} echo "Downloaded file is corrupted. Deleting file and aborting."
/woof-code/rootfs-packages/PKG/usr/local/petget/0setup#L279

Note that there is a logfile for 0setup:

Code: Select all

echo -n "" > /var/woof/0setup_fail_report_$RUNNINGPUP #RUNNINGPUP=yes or no. latter if woof.
LANG=${LANGORG} echo "This is a report on the last time the '0setup' script was run.
Date and time '0setup' last run: ${RUNDATE}
Compatible-distro and release-name: ${DISTRO_BINARY_COMPAT}, ${DISTRO_COMPAT_VERSION}
Mostly only errors get logged, so the less seen below, the better.
Log of last run of '0setup':
" >> /var/woof/0setup_fail_report_$RUNNINGPUP
/usr/local/petget/0setup#L214

The above error not only wasn't logged (although possibly due to my process substitution) but the error was incorrectly reported. The db file wasn't corrupted. The issue was that I had the wrong value for "DISTRO_BINARY_COMPAT". The correct value should be devuan.

So anyway, pkg reports that the repo update succeeded but this is mostly due to bad error reporting in 0setup.

Edit: I stand corrected. I eventually did get an error (prior to fixing distro specs). The error was:

Code: Select all

	Failed to download db file: 
	 http://packages.devuan.org/merged/dists//main/binary-/Packages.xz
	...exited from 0setup script.
so pkg could sand this log file for the word "Failed"
Last edited by s243a on Sat 08 Jun 2019, 00:45, edited 1 time in total.
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].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#110 Post by s243a »

I was able to get pkg to properly update the repo by fixing my /etc/DISTRO_SPECS

For more info see:
http://murga-linux.com/puppy/viewtopic. ... 98#1029998
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].

Post Reply