Resolving Non-Slackware Dependencies

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Resolving Non-Slackware Dependencies

Post#1 by Bogomips » 29 Mar 2015, 14:40

Dependencies Resolver

README As of 2015-12-27 16:54:28.
This section of the README can be displayed by invoking XREADME in work directory: XREADME [/<Path to README>[/README]]
  1. This is an abridged README. The complete README is to be found at: "viewtopic.php?f=75&t=4497"
  2. In the Work Directory, apart from this README, are four scripts:
    1. Shell Script 'pakfuncs.sh'
    2. Three AWK Scripts
      a) awk_distro_32bit
      b) awk_distro_64bit
      c) awk_lids
      d) awk_distro, a link to one of a or b, depending on the Architecture.
  3. Ascertain User Agent String nearest to Browser. This is needed for wget, should it hang while accessing 'pkgs.org'.
    1. Get from: http://useragentstring.com/pages/useragentstring.php
      for IE: "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko"
    2. cd to Work Directory
      a) Append Statement 'ua=<User Agent String>' to 'pakfuncs.sh' thus:
      echo ua='"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko"' >> pakfuncs.sh
      (Using IE string as the Example)
  4. Invocation
    1. In new Terminal Tab: cd to Work Directory
    2. Enter Command: source pakfuncs.sh
    3. Enter Command: pakorg <package name>
      (Package should already be one that has been found in pkgs.org, for which dependencies have to be determined.)
  5. Running
    1. Within Invocation of USM Ctl+C (^C) must not be used, as this will prematurely terminate the whole run.
    2. Unless for good reason not to, the USM option should be taken if there is a 14.1 Slackware Package Dependency.
    3. The resultant USM module should be activated if there is a prompt for Activation.
    4. Output is verbose, but this should not really matter, as terminal ouput can be logged to a file for later inspection.
    5. If there is a version requirement, the procedure will try to prompt to enable a suitable package to be chosen.
  6. Usage
    1. Basic with Fixed Choices:
      1) Select by Type
      2) Select by Distro
      3) Select by Package
    2. Advanced with Floating Choices:
      4) Set Default Package by Distro/Type
      5) Package Info
      6) Skip Package
      7) Last Selected Package
  7. Upon Successful Run
    1. 'Binaries.lst' Holds list of dependency Packages
    2. 'Binaries.url' The Corresponding URLs
    3. 'Slack.lst' List of Activated Slackware Packages obtained by USM
      Successful Run also Produces a '<package Name>.pak' file, encapsulating the Run.

    Further Details, etc. (In Full README)
    Module resolver-0.1.0-noarch-1.xzm
    ====
    Always deactivate this Module after Activation.(Reactivate Module to Reload/Refresh Files)

    Module Scripts
    =========

    Code: Select all

    guest@porteus:~$ ls -ilh fkr/opt/pak
    total 104K
    19673 -rw-r--r-- 1 guest guest 3.1K Dec 30 22:13 README
    19680 -rwxr-xr-x 1 guest guest  592 Dec 30 21:40 XREADME*
    19670 -rw-r--r-- 2 guest guest 2.8K Apr 24  2015 awk_distro
    19670 -rw-r--r-- 2 guest guest 2.8K Apr 24  2015 awk_distro_32bit
    19674 -rw-r--r-- 1 guest guest 3.1K Sep 22 22:36 awk_distro_64bit
    19671 -rw-r--r-- 1 guest guest 1.8K Sep 16 02:40 awk_lids
    19672 -rw-r--r-- 1 guest guest  77K Dec 31 00:31 pakfuncs.sh
    
    [19673 -rw-r--r-- 1 guest guest 3.1K Dec 31 00:45 fkr/opt/pak/README]
    19680 -rwxr-xr-x 1 guest guest  592 Dec 30 21:40 XREADME*
    
    [/size]
  8. Dependencies Determined (Next Steps)
    1. Upgrade C++ Library from .18 to .20 (needed by most of later programs):

      Code: Select all

      root@porteus:/home/guest# ls -lh /usr/lib/libstdc++.so.6
      lrwxrwxrwx 1 root root 19 Dec  2  2014 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.18*
      root@porteus:/home/guest# installpkg p10/Por/Komodo/dfd/libstdc++6-gcc49-4.9.0+r211729.2.1.7-i586-1.txz
      ...
      root@porteus:/home/guest# ls -lh /usr/lib/libstdc++.so.6
      lrwxrwxrwx 1 root root 19 Jul 13 13:28 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.20*
      
      (Package installed following rpm2txz conversion.)
      1. Appropriate Package
      2. Slackware Package rpm2txz OR Module rpm2xzm
      3. Install Package OR Activate Module
      (Found to be sufficiently stable as to be Installed)
    2. Dependencies Download Just needs a simple wget statement. In following example wget downloads to directory 'rar', which will be created if non-existent:

      Code: Select all

      guest@porteus:~$ wget -nv -i- -P rar < pak/Binaries.url 
      2016-01-03 19:31:54 URL:http://mirror.rosalab.ru/rosa/rosa2012lts/repository/i586/contrib/updates/retroarch-0.9.9-2-rosa.lts2012.0.i586.rpm [213681/213681] -> "rar/retroarch-0.9.9-2-rosa.lts2012.0.i586.rpm" [1]
      2016-01-03 19:31:57 URL:http://mirror.rosalab.ru/rosa/rosa2012lts/repository/i586/non-free/release/libcg0-3.0.0007-0.1-rosa.lts2012.0.i586.rpm [1732200/1732200] -> "rar/libcg0-3.0.0007-0.1-rosa.lts2012.0.i586.rpm" [1]
      2016-01-03 19:31:58 URL:http://mirror.rosalab.ru/rosa/rosa2012lts/repository/i586/main/release/libopenal1-1.13-1-rosa.lts2012.0.i586.rpm [96225/96225] -> "rar/libopenal1-1.13-1-rosa.lts2012.0.i586.rpm" [1]
      2016-01-03 19:31:58 URL:http://mirror.rosalab.ru/rosa/rosa2012lts/repository/i586/contrib/updates/libretro-20130608-1-rosa.lts2012.0.i586.rpm [4693/4693] -> "rar/libretro-20130608-1-rosa.lts2012.0.i586.rpm" [1]
      FINISHED --2016-01-03 19:31:58--
      Total wall clock time: 4.6s
      Downloaded: 4 files, 2.0M in 3.9s (508 KB/s)
    3. Creating txz Slackware Conformant Packages
      1. Purpose made scripts come into play here. And there is some overlap here with system scripts. These Quick Scripts create packages which have, for their description, just the name of the original binary package, be it rpm, deb or xz. Verbosity of output during package creation, being controllable through the -nv non-verbose switch. Using this switch, all the extra output will be redirected to a directory in /tmp with a 'day_time' name. So if there is the need to check the files in a certain package, these are available in the /tmp directory.
      2. For example, if quick script has been saved in a file xz2txz.sh, then copy this to /home/guest:

        Code: Select all

        ln xz2txz.sh deb2txz.sh; ln xz2txz.sh rpm2txz.sh
        for t in xz deb rpm; do sh $t2txz.sh -nv rar; done;    # Will process any of each binary type
        
        guest@porteus:~$ ls rar
        libcg0-3.0.0007-0.1-rosa.lts2012.0.i586.rpm  libretro-20130608-1-rosa.lts2012.0.i586.rpm
        libopenal1-1.13-1-rosa.lts2012.0.i586.rpm    retroarch-0.9.9-2-rosa.lts2012.0.i586.rpm
        
        guest@porteus:~$ for t in xz deb rpm; do sh ${t}2txz.sh -nv rar; done;
        None Found for 'rar/*.xz'!
        Installation Files List: /tmp/Tue_13:05/xz_4231.lst
        None Found for 'rar/*.deb'!
        Installation Files List: /tmp/Tue_13:05/deb_4235.lst
        
        18698 blocks
        ->  libcg0-3.0.0007.rosa.lts2012.0-i586-0.1.txz
        <slack-desc>
        libcg0: 3.0.0007 (libcg0-3.0.0007-0.1-rosa.lts2012.0.i586.rpm)
        Slackware package maker, version 3.14159.
        ...
        Slackware package /home/guest/rar/retroarch-0.9.9.rosa.lts2012.0-i586-2.txz created.
        Installation Files List: /tmp/Tue_13:05/rpm_4238.lst
      [/size]
Self-reference:
  • Backup

    Code: Select all

    guest@porteus:~$ ls -sh Kom_020116.bz2 
    1.6M Kom_020116.bz2
    guest@porteus:~$ md5sum Kom_020116.bz2 
    63f501719f3a5faa4304d88648774f2a  Kom_020116.bz2
    
    [/size]
Last edited by Bogomips on 05 Jan 2016, 13:06, edited 14 times in total.
Reason: Restructuring
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Resolving Non-Slackware Dependencies

Post#2 by Bogomips » 08 Apr 2015, 15:15

Post of 29-03-15
Resolving Non-Slackware Dependencies in PKGS.ORG

In the next week or so, I hope to be able to present a procedure for resolving dependencies in pkgs.org.
Call for beta testers :friends:

It would be much appreciated, if any interested, could register their interest, in which case I'll PM them when I post the procedure here.

P.S. Functioning USM needed for best results :)

Post of 8-04-15
Dearth of beta testers, "Everyone here for the beer?", I ask myself. :Search:

Anyway if anyone is interested, do have a look at colord package in pkgs.org, which is a fairly simple example with no more than three levels of dependency, with most branches ending in Slackware, where USM can take over. To get a feel for the procedure, just follow dependencies for Arch Linux, where the documentation is pretty exhaustive and the packages are easy to modularise for testing, and later to convert if so required.


Update 9-10-15

Prerequisites
  • Dedicated Directory e.g. apak

    Code: Select all

    guest@porteus:~$ tree -d apak
    apak
    └── wrk
  • Browser User Agent String
  • Awk Scripts

    Code: Select all

    guest@porteus:~$ ls -l apak/awk_{distro,lids}
    -rw-r--r-- 1 guest guest 2808 Aug 19 17:26 apak/awk_distro
    -rw-r--r-- 1 guest guest 1806 Sep 16 23:11 apak/awk_lids
    
  • Append User Agent statement ua="User Agent String " to pakfuncs.sh thus:

    Code: Select all

    echo ua='"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko"' >> /<Path to>/pakfuncs.sh
    using as example IE user string.
  • Source the Script

    Code: Select all

    source /<Path to>/pakfuncs.sh
Invocation
  • First

    Code: Select all

    cd   <Dedicated Directory>
    pakorg  <package name>
  • Subsequent: In New Terminal Tab

    Code: Select all

    cd   <Dedicated Directory>
    pakorg  <package name>
resolver version 0.0.1

Files
  • pakfuncs.sh on 11-6-2015: pakfuncs.sh.bz2 (Own ref: Kom_110615.bz2 )(Click on button with downward arrow)

    Code: Select all

    guest@porteus:~$ md5sum pakfuncs.sh.bz2 
    b471e0522c3925455a6da66bc25a1e6a  pakfuncs.sh.bz2
    
  • awk_lids

    Code: Select all

    # Library Dependencies		2015-01-31 00:14:56
    # Generates
    # reqmts.html:	Used to download distros file for each requirement
    # reqmts:	->	'req' local array driving the recursion
    # ulibs:	Just lib name without trailing space RE " ".* or RE (.*$
    # Files: <pkg>"~"<ulibs element from 'ulb' vector>	(Informative only)
    # Amended: . <- [.]	2015-03-29 16:25:32
    # Corrected: Amendment Error	2015-04-10 15:04:38
    # Restricting Library Names to Containing Alphanueric and '.'. Not yet allowing for hyphenated names.	2015-09-15 22:04:31
    # Filtering out lines without Anchors by Pattern Selection	2015-09-16 02:40:08
    # N.B. Pattern has to Precede Procedure on Same Line
    BEGIN{lb="!!!";}
    /<a href=.+<\/a>/ {
    split($0,a,">"); split(a[3],a,"<"); #split(a[1],a)	# Assume no embedded sp
    dsc=a[1]; gsub(">",">",dsc); gsub("<","<",dsc);	# Substitute html tokens 2015-03-29 15:52:08 
    if ($0 !~ "[.]so[.]" || index(dsc,lb)==0) {
      print dsc>"reqmts"; print > "reqmts.html"; if ($0 !~ "[.]so[.]") next;
      split(dsc,a,"[^.[:alnum:]]"); dsc=a[1];	# Not yet allowing for hyphenated lib names	2015-09-15 22:04:31
      lb=dsc; cnt[m]=0; l[m++]=lb	# Implement repeat count
      }
    #print dsc>"libs"; cnt[m-1]++
    # Redirecting from file to vector.
    lib[m-1,cnt[m-1]++]=dsc;
    }
    END{print "LIBS\n====";
    if (m=="") {print "None\n===="; exit;}	# Added 2015-04-19 02:03:54 Upd:2015-03-26 17:18:44	No Libraries Present.
    #print "m="m	Commented out	2015-04-19 02:05:02
    #for (i=0; i<m; i++) print "cnt["i"]="cnt[i];
    #print "lib[0,0]="lib[0,0]
    #exit;
    for (i=0; i<m; i++) {
      print cnt[i]" x "l[i];
      # Strip of trailing /" ".*$/ or /(.*$/
      split(l[i],a,"("); split(a[1],a); ulb=a[1];
      for (j=0; cnt[i]>1 && j<cnt[i]; j++)	{
        print lib[i,j];
    #    print lib[i,j]>pan"~"l[i];
        print lib[i,j]>pan"~"ulb;
        if (j==0)  print ulb>"ulibs";
        }
      }
    }
  • awk_distro

    Code: Select all

    # One dimensional array 'dis' has Distros
    # 2nd dimension has Repos
    # 3rd dimension has Links
    # Array 'cnt' has corresponding counts in the various dimensions.
    # Array 'typ' corresponds to One dimensional array 'dis'
    
    # File o/p  ->  _[dis]ar.rep	Repos file	_[dis]ar.lst	Diagnostics
    
    BEGIN {dis[0]=0; cnt[0]=0;  # Distro & Distro Count
    dis[1]=0; xz[0]=1; xz[1]="Arch"; s="Fedora OpenMandriva ROSA Mageia"; rpm[0]=split(s,rpm); deb[0]=1; deb[1]="Ubuntu";
    }
    
    /class="repo"/||/data-name=/||/<li>/ {
    # DISTRO
    if ($0 ~ "data-name") {split($0,ar,">"); split(ar[2],ar,"<"); distro=ar[1]; split(ar[1],ar); if (dis[cnt[0]-1]!=ar[1]) {dis[cnt[0]]=ar[1];
    # Initialise Repo Count & Post Increment Distro Count
    cnt[cnt[0]++,0]=0;}}
    # REPO
    if ($0 ~ "repo") {split($0,ar,">"); split(ar[2],ar,"<"); split(ar[1],ar,":"); repo=ar[1];	# Enter Repo & Update Repo Count
    dis[cnt[0]-1,cnt[cnt[0]-1,0]]=distro":"repo;
    # Initialise Links Count
    dis[cnt[0]-1,cnt[cnt[0]-1,0]++,0]=0;
    }
    # LINKS
    if  ($0 ~ "<li>") {split($0,ar,"\""); m=split(ar[2],ar0,"/");
    if (ar0[m]!~"x86_64" && ar0[m]!~"amd64") {#print ar[2];
      # Create offsets
      dx=cnt[0]-1; rx=cnt[cnt[0]-1,0]-1;
      # Set the Type
      if (! typ[dx]) {m=split(ar[2],z,"."); typ[dx]=z[m-1];}
      dis[dx,rx,cnt[dx,rx,0]++]=ar[2];	# Increment Links Count
      }
     }
    }
    # Package Type array of Distros in Preferential Order 'par'
    # Corresponding type string 'pat': one of xz/rpm/deb
    function dist (par,pat) {
    for (t=0; t<par[0]; t++)
      for (i=0; i<cnt[0]; i++)
        if (!dfl[i] && typ[i]==pat && dis[i]==par[t+1])
          {dfl[i]=1; ord[orc++]=i; break;}
    # Enter remaining xz/rpm/debs
    for (i=0; i<cnt[0]; i++)
      if (!dfl[i] && typ[i]==pat)	{dfl[i]="0"; ord[orc++]=i;}
    }
    
    END {	# Set up Filenames: _ar.rep & _ar.lst
    m=split(FILENAME,a,"/"); n=index(a[m],"_dis"); s=a[m]"_";
    if (n>0) s=substr(s,1,n); fir=s"ar.rep"; fil=s"ar.lst";
    print "dis\n===">fil; #print dis[2,2,1],dis[2,2,2];
    print "cnt[0]="cnt[0]>fil;
    #for (i=0; i<cnt[0]; print dis[i++]>fil);
    # List Repos
    for (i=0; i<cnt[0]; print toupper(typ[i]),dis[i++]>fil)
      for (j=0; j<cnt[i,0]; print dis[i,j++]>fil)
      # List Links
        for (k=0; k<cnt[i,j,0]; print dis[i,j,k++]>fil);
    # Implement Preferential Order
    #	Array 'ord' and var 'orc' element count
    #	Array 'dfl' flagging if assigned order
    orc=0;
    dist(xz,"xz");
    dist(rpm,"rpm");
    dist(deb,"deb");
    # Anything else
    for (i=0; i<cnt[0]; i++)
      if (!dfl[i])	{dfl[i]=0; ord[orc++]=i;}
    # Output New Order
    print "ord\n===">fil; for (i=0; i<orc; print dfl[ord[i]],ord[i],dis[ord[i++]]>fil);
    # Reverse Repos		2015-01-21 00:37:41
    print toupper("Reversed Repos">fil);
    for (i=0; i<cnt[0]; i++) {
      dx=ord[i]; print dis[dx]>fir; for (j=0; j<cnt[dx,0]; j++) {
        rx=cnt[dx,0]-1-j; print dis[dx,rx]>fir; for (k=0; k<cnt[dx,rx,0]; k++) {
          lx=cnt[dx,rx,0]-1-k; print dis[dx,rx,lx]>fir;
          }
        }
      }
    }
  • awk_distro[_64bit]

    Code: Select all

    # Enhanced selection for non-arch-dep pkgs. 	2015-08-23 14:09:23
    #	[-.]noarch[-.]		Added		2015-09-22 22:33:56
    # One dimensional array 'dis' has Distros
    # 2nd dimension has Repos
    # 3rd dimension has Links
    # Array 'cnt' has corresponding counts in the various dimensions.
    # Array 'typ' corresponds to One dimensional array 'dis'
    # 64 bit Package File Select	2015-03-22 21:46:17
    # File o/p  ->  _[dis]ar.rep	Repos file	_[dis]ar.lst	Diagnostics
    
    BEGIN {dis[0]=0; cnt[0]=0;  # Distro & Distro Count
    dis[1]=0; xz[0]=1; xz[1]="Arch"; s="Fedora OpenMandriva ROSA Mageia"; rpm[0]=split(s,rpm); deb[0]=1; deb[1]="Ubuntu";
    }
    
    /class="repo"/||/data-name=/||/<li>/ {
    # DISTRO
    if ($0 ~ "data-name") {split($0,ar,">"); split(ar[2],ar,"<"); distro=ar[1]; split(ar[1],ar); if (dis[cnt[0]-1]!=ar[1]) {dis[cnt[0]]=ar[1];
    # Initialise Repo Count & Post Increment Distro Count
    cnt[cnt[0]++,0]=0;}}
    # REPO
    if ($0 ~ "repo") {split($0,ar,">"); split(ar[2],ar,"<"); split(ar[1],ar,":"); repo=ar[1];	# Enter Repo & Update Repo Count
    dis[cnt[0]-1,cnt[cnt[0]-1,0]]=distro":"repo;
    # Initialise Links Count
    dis[cnt[0]-1,cnt[cnt[0]-1,0]++,0]=0;
    }
    # LINKS
    if  ($0 ~ "<li>") {split($0,ar,"\""); m=split(ar[2],ar0,"/");
    if (ar0[m]~"x86_64" || ar0[m]~"amd64" || ar0[m]~"[-.]any[.-]" || ar0[m]~"[-.]all[.-]" || ar0[m]~"[-.]noarch[.-]")
      {	# Enhanced selection 	2015-08-23 14:09:23	print ar[2];	2015-03-22 21:59:21
      # Create offsets
      dx=cnt[0]-1; rx=cnt[cnt[0]-1,0]-1;
      # Set the Type
      if (! typ[dx]) {m=split(ar[2],z,"."); typ[dx]=z[m-1];}
      dis[dx,rx,cnt[dx,rx,0]++]=ar[2];	# Increment Links Count
      }
     }
    }
    # Package Type array of Distros in Preferential Order 'par'
    # Corresponding type string 'pat': one of xz/rpm/deb
    function dist (par,pat) {
    for (t=0; t<par[0]; t++)
      for (i=0; i<cnt[0]; i++)
        if (!dfl[i] && typ[i]==pat && dis[i]==par[t+1])
          {dfl[i]=1; ord[orc++]=i; break;}
    # Enter remaining xz/rpm/debs
    for (i=0; i<cnt[0]; i++)
      if (!dfl[i] && typ[i]==pat)	{dfl[i]="0"; ord[orc++]=i;}
    }
    
    END {	# Set up Filenames: _ar.rep & _ar.lst
    m=split(FILENAME,a,"/"); n=index(a[m],"_dis"); s=a[m]"_";
    if (n>0) s=substr(s,1,n); fir=s"ar.rep"; fil=s"ar.lst";
    print "dis\n===">fil; #print dis[2,2,1],dis[2,2,2];
    print "cnt[0]="cnt[0]>fil;
    #for (i=0; i<cnt[0]; print dis[i++]>fil);
    # List Repos
    for (i=0; i<cnt[0]; print toupper(typ[i]),dis[i++]>fil)
      for (j=0; j<cnt[i,0]; print dis[i,j++]>fil)
      # List Links
        for (k=0; k<cnt[i,j,0]; print dis[i,j,k++]>fil);
    # Implement Preferential Order
    #	Array 'ord' and var 'orc' element count
    #	Array 'dfl' flagging if assigned order
    orc=0;
    dist(xz,"xz");
    dist(rpm,"rpm");
    dist(deb,"deb");
    # Anything else
    for (i=0; i<cnt[0]; i++)
      if (!dfl[i])	{dfl[i]=0; ord[orc++]=i;}
    # Output New Order
    print "ord\n===">fil; for (i=0; i<orc; print dfl[ord[i]],ord[i],dis[ord[i++]]>fil);
    # Reverse Repos		2015-01-21 00:37:41
    print toupper("Reversed Repos">fil);
    for (i=0; i<cnt[0]; i++) {
      dx=ord[i]; print dis[dx]>fir; for (j=0; j<cnt[dx,0]; j++) {
        rx=cnt[dx,0]-1-j; print dis[dx,rx]>fir; for (k=0; k<cnt[dx,rx,0]; k++) {
          lx=cnt[dx,rx,0]-1-k; print dis[dx,rx,lx]>fir;
          }
        }
      }
    }
Self-reference:
  • AWK

    Code: Select all

    guest@porteus:~$ ls -l awk_{lids,distro{,_64bit}}
    -rw-r--r-- 1 guest guest 2808 Apr 24 23:31 awk_distro
    -rw-r--r-- 1 guest guest 3103 Sep 22 22:36 awk_distro_64bit
    -rw-r--r-- 1 guest guest 1806 Sep 16 02:40 awk_lids
    
  • Functions

    Code: Select all

    guest@porteus:~$ ls -l pakfuncs.sh 
    -rw-r--r-- 1 guest guest 55954 Jun 11 22:11 pakfuncs.sh
    
  • Backup

    Code: Select all

    guest@porteus:~$ md5sum Kom_110615.bz2 
    a717c8e6d7ca6006688c068414a7e4ee  Kom_110615.bz2
    
Last edited by Bogomips on 01 Jan 2016, 20:53, edited 1 time in total.
Reason: Restructuring
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
wread
Module Guard
Module Guard
Posts: 1108
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Resolving Non-Slackware Dependencies

Post#3 by wread » 08 Apr 2015, 17:30

I can give it a try. Post it where I can download it, please!

Regards!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Resolving Non-Slackware Dependencies

Post#4 by Bogomips » 08 Apr 2015, 21:03

wread wrote:I can give it a try. Post it where I can download it, please!

Regards!
Good. Will PM you with details in the next hours. Cheers.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
francois
Contributor
Contributor
Posts: 5116
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Resolving Non-Slackware Dependencies

Post#5 by francois » 09 Apr 2015, 18:09

I am in too. :)
Voltaire: Le mieux est l'ennemi du bien.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Resolving Non-Slackware Dependencies

Post#6 by Bogomips » 20 Apr 2015, 01:33

Just before the New Year had to track down 20 debs and 5 of other types on pkgs.org in order to make a package for. winforms. Since then toyed with the idea of formalising the method used, as a procedure. Especially mindful of Murphys's 2nd Law of Misadventure decided to do this as a backburner project, which has been going on since January. End of February saw comments on forum, and thought could come in handy for others. So trying to get procedure test ready (32 bit) and ironing out last glitches from code written in January. Following upon tester feedback I feel confident enough to present the setup for this, for anyone else who wishes to participate.

Prerequisites
  • User Agent string compatible with your Browser. Needed for wget. Otherwise one seems to wait forever, presumably because pkgs.org think they are dealing with a bot here. Get user agent string nearest to your browser from http://useragentstring.com/pages/useragentstring.php. IE, for example, "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko"
  • Functioning USM for best outcome
Environment
  1. An empty directory on a real filesystem. Preserving contents will save on bandwidth.
  2. Architecture dependent awk file to be copied into above directory. Choose awk file 32/64 bit, paste into text editor, Keep It Somewhere Safe and call it 'awk_distro'. Also adhering to KISS principle, name the above directory pak, and copy awk_distro to this directory.
  3. Change directory to pak. Then copy the file pkget.sh and paste it in at the command prompt, in order to load bash function pkget(). Or the script file can be pasted into a text editor and saved as pkget.sh in directory pak, after which it will have to be sourced. If you are a script guru, you'll know where I'm coming from, otherwise
    . filename [arguments]
    source filename [arguments]
    Read and execute commands from filename in the current shell
    environment and return the exit status of the last command
    executed from filename. If filename does not contain a slash,
    file names in PATH are used to find the directory containing
    filename. The file searched for in PATH need not be executable.
    So, at the command prompt: source pkget.sh
    • At the command prompt: ua="User Agent string of your Browser"
    Verifying the Setup
    1. Invoke pkget with any of gtk3, nautilus, colord, systemd :wink: , like so: pkget <package name>, or if unsure of the package name, paste in http://pkgs.org/download/<package name> from browser navigation bar, and invoke like so: pkget http://pkgs.org/download/<package name>
    2. Invocation Examples

      Code: Select all

      guest@porteus:~/pak$ pkget nemo
      2015-04-20 01:46:34 URL:http://pkgs.org/download/nemo [13927] -> "wrk/nemo_dis" [1]
      0
      guest@porteus:~/pak$ ls 
      awk_distro  nemo_ar.lst  nemo_ar.rep  wrk/
      
      guest@porteus:~/pak$ pkget http://pkgs.org/download/handbrake
      2015-04-20 02:01:03 URL:http://pkgs.org/download/handbrake [14260] -> "wrk/handbrake_dis" [1]
      0
      guest@porteus:~/pak$ ls -sh
      total 20K
      4.0K awk_distro        4.0K handbrake_ar.rep  4.0K nemo_ar.rep
      4.0K handbrake_ar.lst  4.0K nemo_ar.lst          0 wrk/
      
      guest@porteus:~/pak$ ls -sh wrk
      total 32K
      16K handbrake_dis  16K nemo_dis
      
    3. Verify the setup by checking the '.rep' data file only contains package file names of your architecture. The '.lst' file is just a diagnostics file. Cannot vouch for the 64 bit retrieval, and you will just have to ensure that:
      1. Data file only contains 64bit package filenames
      2. Ensure that all 64bit package files in 'pkgs.org/download/<package>' page are also in generated data file.
    Finally, to gain an idea of the procedure I would urge you to just follow dependencies for colord package in pkgs.org, only complying with Arch package requirements.
    The Procedure will be described in detail in the following post, in which there will be two more files needing the same treatment, laying down the ground work, after which we can get cracking! :Yahoo!: IMHO although this will be a test version, it will probably do the job. 8)

    Files
    • pkget.sh

      Code: Select all

      pkget () 
      { 
          rq=${1##*/};
          u=http://pkgs.org/download/$rq;
          [[ $rq != "$1" ]] && [[ "$1" != $u ]] && { 
              echo "Incorrect URL Argument";
              return 1
          };
          [[ ! -d wrk ]] && mkdir wrk;
          [[ ! -f wrk/${1##*/}_dis ]] && { 
              wget --user-agent="$ua" -nv -nc -O wrk/${1##*/}_dis $u;
              if (($?)); then
                  echo "wget '${1##*/}_dis' fail! ";
                  return 1;
              fi
          };
          awk -f awk_distro wrk/${1##*/}_dis
      }
      
    • awk_distro 32 bit

      Code: Select all

      # One dimensional array 'dis' has Distros
      # 2nd dimension has Repos
      # 3rd dimension has Links
      # Array 'cnt' has corresponding counts in the various dimensions.
      # Array 'typ' corresponds to One dimensional array 'dis'
      
      # File o/p  ->  _[dis]ar.rep	Repos file	_[dis]ar.lst	Diagnostics
      
      BEGIN {dis[0]=0; cnt[0]=0;  # Distro & Distro Count
      dis[1]=0; xz[0]=1; xz[1]="Arch"; s="Fedora OpenMandriva ROSA Mageia"; rpm[0]=split(s,rpm); deb[0]=1; deb[1]="Ubuntu";
      }
      
      /class="repo"/||/data-name=/||/<li>/ {
      # DISTRO
      if ($0 ~ "data-name") {split($0,ar,">"); split(ar[2],ar,"<"); distro=ar[1]; split(ar[1],ar); if (dis[cnt[0]-1]!=ar[1]) {dis[cnt[0]]=ar[1];
      # Initialise Repo Count & Post Increment Distro Count
      cnt[cnt[0]++,0]=0;}}
      # REPO
      if ($0 ~ "repo") {split($0,ar,">"); split(ar[2],ar,"<"); split(ar[1],ar,":"); repo=ar[1];	# Enter Repo & Update Repo Count
      dis[cnt[0]-1,cnt[cnt[0]-1,0]]=distro":"repo;
      # Initialise Links Count
      dis[cnt[0]-1,cnt[cnt[0]-1,0]++,0]=0;
      }
      # LINKS
      if  ($0 ~ "<li>") {split($0,ar,"\""); m=split(ar[2],ar0,"/");
      if (ar0[m]!~"x86_64" && ar0[m]!~"amd64") {#print ar[2];
        # Create offsets
        dx=cnt[0]-1; rx=cnt[cnt[0]-1,0]-1;
        # Set the Type
        if (! typ[dx]) {m=split(ar[2],z,"."); typ[dx]=z[m-1];}
        dis[dx,rx,cnt[dx,rx,0]++]=ar[2];	# Increment Links Count
        }
       }
      }
      # Package Type array of Distros in Preferential Order 'par'
      # Corresponding type string 'pat': one of xz/rpm/deb
      function dist (par,pat) {
      for (t=0; t<par[0]; t++)
        for (i=0; i<cnt[0]; i++)
          if (!dfl[i] && typ[i]==pat && dis[i]==par[t+1])
            {dfl[i]=1; ord[orc++]=i; break;}
      # Enter remaining xz/rpm/debs
      for (i=0; i<cnt[0]; i++)
        if (!dfl[i] && typ[i]==pat)	{dfl[i]="0"; ord[orc++]=i;}
      }
      
      END {	# Set up Filenames: _ar.rep & _ar.lst
      m=split(FILENAME,a,"/"); n=index(a[m],"_dis"); s=a[m]"_";
      if (n>0) s=substr(s,1,n); fir=s"ar.rep"; fil=s"ar.lst";
      print "dis\n===">fil; #print dis[2,2,1],dis[2,2,2];
      print "cnt[0]="cnt[0]>fil;
      #for (i=0; i<cnt[0]; print dis[i++]>fil);
      # List Repos
      for (i=0; i<cnt[0]; print toupper(typ[i]),dis[i++]>fil)
        for (j=0; j<cnt[i,0]; print dis[i,j++]>fil)
        # List Links
          for (k=0; k<cnt[i,j,0]; print dis[i,j,k++]>fil);
      # Implement Preferential Order
      #	Array 'ord' and var 'orc' element count
      #	Array 'dfl' flagging if assigned order
      orc=0;
      dist(xz,"xz");
      dist(rpm,"rpm");
      dist(deb,"deb");
      # Anything else
      for (i=0; i<cnt[0]; i++)
        if (!dfl[i])	{dfl[i]=0; ord[orc++]=i;}
      # Output New Order
      print "ord\n===">fil; for (i=0; i<orc; print dfl[ord[i]],ord[i],dis[ord[i++]]>fil);
      # Reverse Repos		2015-01-21 00:37:41
      print toupper("Reversed Repos">fil);
      for (i=0; i<cnt[0]; i++) {
        dx=ord[i]; print dis[dx]>fir; for (j=0; j<cnt[dx,0]; j++) {
          rx=cnt[dx,0]-1-j; print dis[dx,rx]>fir; for (k=0; k<cnt[dx,rx,0]; k++) {
            lx=cnt[dx,rx,0]-1-k; print dis[dx,rx,lx]>fir;
            }
          }
        }
      }
      
    • awk_distro 64 bit

      Code: Select all

      # One dimensional array 'dis' has Distros
      # 2nd dimension has Repos
      # 3rd dimension has Links
      # Array 'cnt' has corresponding counts in the various dimensions.
      # Array 'typ' corresponds to One dimensional array 'dis'
      # 64 bit Package File Select	2015-03-22 21:46:17
      # File o/p  ->  _[dis]ar.rep	Repos file	_[dis]ar.lst	Diagnostics
      
      BEGIN {dis[0]=0; cnt[0]=0;  # Distro & Distro Count
      dis[1]=0; xz[0]=1; xz[1]="Arch"; s="Fedora OpenMandriva ROSA Mageia"; rpm[0]=split(s,rpm); deb[0]=1; deb[1]="Ubuntu";
      }
      
      /class="repo"/||/data-name=/||/<li>/ {
      # DISTRO
      if ($0 ~ "data-name") {split($0,ar,">"); split(ar[2],ar,"<"); distro=ar[1]; split(ar[1],ar); if (dis[cnt[0]-1]!=ar[1]) {dis[cnt[0]]=ar[1];
      # Initialise Repo Count & Post Increment Distro Count
      cnt[cnt[0]++,0]=0;}}
      # REPO
      if ($0 ~ "repo") {split($0,ar,">"); split(ar[2],ar,"<"); split(ar[1],ar,":"); repo=ar[1];	# Enter Repo & Update Repo Count
      dis[cnt[0]-1,cnt[cnt[0]-1,0]]=distro":"repo;
      # Initialise Links Count
      dis[cnt[0]-1,cnt[cnt[0]-1,0]++,0]=0;
      }
      # LINKS
      if  ($0 ~ "<li>") {split($0,ar,"\""); m=split(ar[2],ar0,"/");
      if (ar0[m]~"x86_64" || ar0[m]~"amd64") {#print ar[2];	2015-03-22 21:59:21
        # Create offsets
        dx=cnt[0]-1; rx=cnt[cnt[0]-1,0]-1;
        # Set the Type
        if (! typ[dx]) {m=split(ar[2],z,"."); typ[dx]=z[m-1];}
        dis[dx,rx,cnt[dx,rx,0]++]=ar[2];	# Increment Links Count
        }
       }
      }
      # Package Type array of Distros in Preferential Order 'par'
      # Corresponding type string 'pat': one of xz/rpm/deb
      function dist (par,pat) {
      for (t=0; t<par[0]; t++)
        for (i=0; i<cnt[0]; i++)
          if (!dfl[i] && typ[i]==pat && dis[i]==par[t+1])
            {dfl[i]=1; ord[orc++]=i; break;}
      # Enter remaining xz/rpm/debs
      for (i=0; i<cnt[0]; i++)
        if (!dfl[i] && typ[i]==pat)	{dfl[i]="0"; ord[orc++]=i;}
      }
      
      END {	# Set up Filenames: _ar.rep & _ar.lst
      m=split(FILENAME,a,"/"); n=index(a[m],"_dis"); s=a[m]"_";
      if (n>0) s=substr(s,1,n); fir=s"ar.rep"; fil=s"ar.lst";
      print "dis\n===">fil; #print dis[2,2,1],dis[2,2,2];
      print "cnt[0]="cnt[0]>fil;
      #for (i=0; i<cnt[0]; print dis[i++]>fil);
      # List Repos
      for (i=0; i<cnt[0]; print toupper(typ[i]),dis[i++]>fil)
        for (j=0; j<cnt[i,0]; print dis[i,j++]>fil)
        # List Links
          for (k=0; k<cnt[i,j,0]; print dis[i,j,k++]>fil);
      # Implement Preferential Order
      #	Array 'ord' and var 'orc' element count
      #	Array 'dfl' flagging if assigned order
      orc=0;
      dist(xz,"xz");
      dist(rpm,"rpm");
      dist(deb,"deb");
      # Anything else
      for (i=0; i<cnt[0]; i++)
        if (!dfl[i])	{dfl[i]=0; ord[orc++]=i;}
      # Output New Order
      print "ord\n===">fil; for (i=0; i<orc; print dfl[ord[i]],ord[i],dis[ord[i++]]>fil);
      # Reverse Repos		2015-01-21 00:37:41
      print toupper("Reversed Repos">fil);
      for (i=0; i<cnt[0]; i++) {
        dx=ord[i]; print dis[dx]>fir; for (j=0; j<cnt[dx,0]; j++) {
          rx=cnt[dx,0]-1-j; print dis[dx,rx]>fir; for (k=0; k<cnt[dx,rx,0]; k++) {
            lx=cnt[dx,rx,0]-1-k; print dis[dx,rx,lx]>fir;
            }
          }
        }
      }
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    User avatar
    brokenman
    Site Admin
    Site Admin
    Posts: 5651
    Joined: 27 Dec 2010, 03:50
    Distribution: Porteus v3.2rcX all desktops
    Location: Brazil
    Contact:

    Re: Resolving Non-Slackware Dependencies

    Post#7 by brokenman » 20 Apr 2015, 20:00

    awksome work!
    How do i become super user?
    Wear your underpants on the outside and put on a cape.

    Bogomips
    Full of knowledge
    Full of knowledge
    Posts: 2563
    Joined: 25 Jun 2014, 15:21
    Distribution: 3.2.2 Cinnamon & KDE5
    Location: London

    Re: Resolving Non-Slackware Dependencies

    Post#8 by Bogomips » 24 Apr 2015, 01:43

    PROCEDURE PROPER

    Et voila!

    Technical Details of Procedure
    And here I say to script gurus far and wide, in the bashful words of francois :oops: , please don't laugh at an initiate's attempt to write a program in Bash, nor frown on the coding style! :evil: And the Newbie who claimed that the command line is arcane will never really know what arcane is until he/she tries to do something meaningful in Bash. In the immortal words of that famous Belgian, quite a challenge for the little grey cells ... :wall:

    The procedure presented here is essentially the manual procedure, followed for resolving dependencies on pkgs.org, formalised in a programmatic representation. This consists of a suite of bash functions:
    • pakorg() The front end function, taking one argument, which could be one of
      1. package url
      2. package distros list
      3. package name
    • pakdep() The 'workhorse' recursive function
    • Auxiliary functions
    Of Circular Definitions/Dependencies, End Points and Slackware
    1. Circular Definitions/Dependencies were the cause of the biggest headache, and these have definitely been resolved by the Procedure. :x
    2. End Points I have called, for want of knowledge of a better name, the dependencies that are so basic they are bound to be in the system but are known under another name. Also included here are basic libraries of the same name as in the Slackware universe. Such a dependency is then considered the end of a dependency branch. Optionally one could include here higher level packages, which one could get away with, without having.
    3. Slackware can also be considered an end of branch, as there is the possibility of handing over to USM here.
    Role of USM

    If a dependency includes Slackware from recognized repo, there is the option of running USM. In this case a module should be made, whether it is one or many packages in the final download, and then the module should be activated. This is to ensure the registration in the system of any subsidiary packages and any associated libraries. They will then be detected if further on a dependency requires a relevant library. (Only the top level package will have been recorded by the Procedure.)
    brokenman wrote:if you open the /etc/usm/usm.conf file and change:
    MODULES=false to MODULES=true
    all your downloaded packages will be converted to Porteus modules in text or gui mode.
    ...
    The MODULES= variable is not set by Porteus as a universal environment variable. When USM is run the config file is sourced and variables therein are temporarily used for the current USM session only.
    It would be best for our purposes that usm converts all downloaded packages to modules, and it might be advisable to allocate a separate directory for downloads, by changing STORAGE= in usm.conf, so that the normal download directory does not get cluttered up with a lot of test junk.

    A proposed user-friendly solution to switch the usm configuration, without constant editing of or copying to /etc/usm/usm.conf.
    1. Once-off edit with desired option to /etc/usm/usm.conf in a fakeroot directory.
    2. Create micro module from directory
    3. Activate/Deactivate Module to achieve switching of options.
    Illustration:

    Code: Select all

    guest@porteus:~$ mkdir usmod
    guest@porteus:~$ cp --parents /etc/usm/usm.conf usmod
    guest@porteus:~$ vi usmod/etc/usm/usm.conf	# MODULES <- true
    
    root@porteus:/home/guest# dir2xzm usmod/ usmod.xzm
    Parallel mksquashfs: Using 1 processor
    Creating 4.0 filesystem on usmod.xzm, block size 262144.
    [===============================================================================|] 1/1 100%
    
    Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
            compressed data, compressed metadata, compressed fragments, compressed xattrs
            duplicates are removed
    Filesystem size 2.12 Kbytes (0.00 Mbytes)
    
    root@porteus:/home/guest# grep MODULES /etc/usm/usm.conf 
    MODULES=false
    
    root@porteus:/home/guest# activate usmod.xzm              
    Updating shared library links:  /sbin/ldconfig
    root@porteus:/home/guest# grep MODULES /etc/usm/usm.conf 
    MODULES=true
    
    root@porteus:/home/guest# deactivate usmod.xzm 
    Updating shared library links:  /sbin/ldconfig
    root@porteus:/home/guest# grep MODULES /etc/usm/usm.conf 
    MODULES=false
    
    The latest version of USM, when it comes through, could be just the ticket for our testing purposes, creating a module followed by its activation, and would save us the extra step of a separate activation.

    Setup for Running (Adhering to KISS Principle)
    in dedicated directory pak requires that:
    • file awk_distro, if not already there, is copied to the directory
    • file awk_lids, the dependency lister, has also to be copied to the directory
    • file pakfuncs.sh is also copied to the directory
    The ua="User Agent String " statement appended to pakfuncs.sh thus:

    Code: Select all

    echo ua='"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko"' >> pakfuncs.sh
    using as example IE user string.

    Run Procedure
    • In a New Terminal Tab for Each Run
    • As root or using sudo. Otherwise USM is excluded.
    • Ensure USM switched to Creating Modules
    • Change to directory pak
    • Source the Bash Function Suite thus: . pakfuncs.sh
    • Invocation thru pakorg <argument>, where <argument> is one of:
      1. Particular package file url
        http://pkgs.org/<repo>/../<package file>.html (file holds the requirements/dependencies of package)
        e.g. pakorg http://pkgs.org/archlinux/archlinux-cor ... ar.xz.html
      2. Package distros list http://pkgs.org/download/<package name>
        e.g. pakorg http://pkgs.org/download/nemo
      3. Package Name
        e.g. pakorg nautilus
    • Default Option. Normally taken by just hitting Enter.
    • USM. Accept USM If USM has been successful. Before accepting the USM outcome, do ensure that the module so created is activated, before hitting Enter. Activate from:
      • Root Terminal: # activate /<Path to allocated download directory>/<module>.xzm
      • File Manager
    • Test Version. Hence chock-a-block full of explanatory output of a diagnostic nature. This can be progressively phased out.
    • Bash going haywire
      1. Return to command line prompt with Ctl-C
      2. Save output of terminal to file if so desired
      3. Close current terminal tab
      4. Open new terminal tab
      5. Source pakfuncs.sh anew
      6. Restart
    • A <package>.pak file, for testing purposes, will be written out at the end of a successful run. This needs to be given another name so as not to be overwritten in a subsequent run, should it be worth keeping.
    • Logging. Not running in subshell, therefore using terminal menu to save output to a file. Not so au fait on this end of things regarding increasing the size of the Konsole tab output buffer. (File buffer output extends to Just over a thousand of pakorg output lines on Konsole. Looks like a circular buffer of 32 KiB)
    • Dry Run
      • ON This is the default, and binaries are not downloaded, but just recorded in the binaries download list in file 'Binaries.lst'. Corresponding URLs to be found in 'Binaries.url'.
      • OFF Binaries are downloaded on the fly into subdirectory dwn when dry run non-zero switch value is zeroised thus: dry=0. Even after a dry run there is the possibility of getting the binaries using Binaries.url thus:

        Code: Select all

        cat /<Path to>/Binaries.url | wget -nv -i-[ -P <Downloads Directory>]
    In order to facilitate testing, at the end of a successful run a small file with extension '.pak' is created to hold the relevant data of the run. Using the colord example the file is 'colord.pak'. i.e. <package name>.pak. This is so that later when finding dependencies for nemo which has colord as a dependency, all the colord dependencies will have been registered, just in case nemo requires one of them. When saving, the file should be saved as <package name>_*.pak, e.g. openshot_ 2304-1.pak to allow being picked up by the Procedure on the fly, if it still resides in the directory.

    IMPORTANT*IMPORTANT*IMPORTANT
    Prior to using the Procedure in anger, please try to get a feel for it, through
    Familiarization Runs
    Allowing of Procedure Appreciation and Adaptation to the Pace of the Script. Although having written it, the script's behaviour in real time was quite different from that envisaged. If a slight delay is experienced, it is wget in Internet.
    1. The Low Road
      In a a new tab pakorg colord, always hitting Enter for the Arch package file default, is fairly straight forward, and takes around ten minutes (if you know what you are doing), excluding USM time and Activation time. This should generate around 830 lines of output, should not overflow the terminal buffer (Konsole at least), and should result in just the one log file without loss of earlier output. The binaries download list at run end will look something like this:

      Code: Select all

      cat Binaries.lst 
      colord-1.2.9-2-i686.pkg.tar.xz
      libgusb-0.2.4-1-i686.pkg.tar.xz
      systemd-219-4-i686.pkg.tar.xz
      hwids-20150129-1-any.pkg.tar.xz
      libseccomp-2.2.0-1-i686.pkg.tar.xz
      libsystemd-219-4-i686.pkg.tar.xz
      lz4-128-1-i686.pkg.tar.xz
      pam-1.1.8-5-i686.pkg.tar.xz
      cracklib-2.9.1-1-i686.pkg.tar.xz
      libtirpc-0.2.5-1-i686.pkg.tar.xz
      pambase-20130928-1-any.pkg.tar.xz
      
    2. The High Road
      In a new tab pakorg colord, but this time press 1 for Select by Type, and then 2 for RPM. At the prompt hit Enter to suspend the listing, then select the 9th Package. Thereafter hit Enter, taking Default unless contraindicated. In that case Select by Package and take the first acceptable Package. May have to scroll back to get its number. Thereafter just hit Enter for default option.

      In the case of libraries there will be an annoying second confirmation requested for the time being. Also formatting has gone slightly awry after having to take into account the Tags on Versions. There is no need to lose touch with the progress of the run, as one can always scroll back to the last Interaction. Logging the run will mean saving output of terminal at regular intervals. Have managed with 3 files. There is no reason why this can't run as a background task, interleaved with other real-life tasks. Took some 40 minutes wall clock time, as a background real-life task during which time I was getting my supper and having it.

      At the end you will end up with a binaries download list somewhat like this,

      Code: Select all

      colord-1.2.4-4-omv2015.0.i586.rpm
      colord-libs-1.1.8-1.fc20.i686.rpm
      libgusb-0.1.6-2.fc20.i686.rpm
      systemd-libs-208-31.fc20.i686.rpm
      pam-1.1.8-2.fc20.i686.rpm
      audit-libs-2.4.1-1.fc20.i686.rpm
      cracklib-dicts-2.9.0-5.fc20.i686.rpm
      cracklib-2.9.0-5.fc20.i686.rpm
      libdb-5.3.28-1.fc20.i686.rpm
      libpwquality-1.2.3-1-i686.pkg.tar.xz
      libselinux-2.2.1-6.fc20.i686.rpm
      libsepol-2.1.9-2.fc20.i686.rpm
      rpm-helper-0.24.12-3-omv2013.0.noarch.rpm
      chkconfig-1.3.63-1.fc20.i686.rpm
      setup-2.8.71-3.fc20.noarch.rpm
      shadow-utils-4.1.5.1-8.fc20.i686.rpm
      libsemanage-2.1.10-14.fc20.i686.rpm
      ustr-1.0.4-15.fc20.i686.rpm
      systemd-units-208-8-omv2013.0.i586.rpm
      
      and you will have been successful if you had cracklib-2.9.0-5.fc20.i686.rpm among the binaries. :good:
    Am well travelled on both roads :) So should easily iron out any difficulties encountered, or deal with situations not understood.

    Rationale of Prioritization
    1. Priority Of Distro Types
      1. Arch with it's exhaustive description, ease of modularization for testing, and ease of later conversion to package, I have given first place.
      2. The broad spectrum of RPMs. And here have given priority to the individual distros. in their display, dependent on how useful they have been to me.
      3. DEBs have gotten the lowest priority, as there is also the package manager SPMDebian available to deal with them
    2. Priority of package Versions. Again have found that the lowest versions seemed to have the best compatibility with Slackware 14.1, So, the lowest versions have the highest priority, as far as their display is concerned.
    3. Versioned Libraries are beyond the pale :(
    Non-architecture-dependent Files following in continuation Post
    • awk_lids Listing the Dependencies/Requirements of a Package
    • pakfuncs.sh The Suite of Bash Functions
    EPILOG

    Replacement/Upgrade of System/Slackware Packages
    This may be needed by certain applications, even though the crucial dependencies have been resolved. A case in point being those based on GTK+, a particular example of which is illustrated by Arch gimp package: gimp-2.8.14-1-i686.pkg.tar.xz.

    Code: Select all

    guest@porteus:~$ ldd /usr/bin/gimp|grep not
    guest@porteus:~$ gimp
    gimp: symbol lookup error: gimp: undefined symbol: g_option_context_parse_strv
    Upon consulting the Internet,

    Code: Select all

    guest@porteus:~$ gimp -v
    GNU Image Manipulation Program version 2.8.14
    git-describe: GIMP_2_8_12-2-ge62e6fe
    
    using GEGL version 0.2.0 (compiled against version 0.2.0)
    using GLib version 2.36.4 (compiled against version 2.40.0)
    using GdkPixbuf version 2.28.2 (compiled against version 2.30.8)
    using GTK+ version 2.24.20 (compiled against version 2.24.24)
    using Pango version 1.34.1 (compiled against version 1.36.6)
    using Fontconfig version 2.10.93 (compiled against version 2.11.1)
    using Cairo version 1.12.16 (compiled against versionn 1.12.16)
    it can be seen from the above that some of the program versions being used, lag behind the compilation time versions. So, short of doing a complete compilation with the latest source versions of above-mentioned programs, there is the possibility of finding the offending program and replacing it with the latest available version.

    Since Pango was singled out as a culprit with the same undefined symbol in an Internet instance, there was no reason not to try a latest available version replacement of Pango:

    Code: Select all

    guest@porteus:~$ gimp -v
    GNU Image Manipulation Program version 2.8.14
    git-describe: GIMP_2_8_12-2-ge62e6fe
    
    using GEGL version 0.2.0 (compiled against version 0.2.0)
    using GLib version 2.36.4 (compiled against version 2.40.0)
    using GdkPixbuf version 2.28.2 (compiled against version 2.30.8)
    using GTK+ version 2.24.20 (compiled against version 2.24.24)
    using Pango version 1.36.8 (compiled against version 1.36.6)
    using Fontconfig version 2.10.93 (compiled against version 2.11.1)
    using Cairo version 1.12.16 (compiled against version 1.12.16)
    guest@porteus:~$ gimp
    gimp: symbol lookup error: gimp: undefined symbol: g_option_context_parse_strv
    
    Anyway, happening upon the GTK+ website was able to find the context of the offending undefined symbol, ascertaining it was introduced at version 2.40, and then extrapolate to the gimp compilation time GLib version 2.40.0. Corresponding package for GLib eventually tracked down as glib2. GLib updated to latest Arch version:

    Code: Select all

    porteus:~$ gimp -v
    GNU Image Manipulation Program version 2.8.14
    git-describe: GIMP_2_8_12-2-ge62e6fe
    
    using GEGL version 0.2.0 (compiled against version 0.2.0)
    using GLib version 2.44.0 (compiled against version 2.40.0)
    using GdkPixbuf version 2.28.2 (compiled against version 2.30.8)
    using GTK+ version 2.24.20 (compiled against version 2.24.24)
    using Pango version 1.36.8 (compiled against version 1.36.6)
    using Fontconfig version 2.10.93 (compiled against version 2.11.1)
    using Cairo version 1.12.16 (compiled against version 1.12.16)
    guest@porteus:~$ gimp
    /usr/lib/gimp/2.0/plug-ins/web-page: error while loading shared libraries: libwebkitgtk-1.0.so.0: cannot open shared object file: No such file or directory
    
    (gimp:28959): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
    Traceback (most recent call last):
      File "/usr/lib/gimp/2.0/plug-ins/text-brush.py", line 20, in <module>
        from gimpfu import *
      File "/usr/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
        import gimp
    ImportError: /usr/lib/gimp/2.0/python/gimp.so: undefined symbol: PyUnicodeUCS4_SetDefaultEncoding
    
    Application now running. There is however an unresolved dependency and an error warning, which one could try ignoring for starters.
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    Bogomips
    Full of knowledge
    Full of knowledge
    Posts: 2563
    Joined: 25 Jun 2014, 15:21
    Distribution: 3.2.2 Cinnamon & KDE5
    Location: London

    Re: Resolving Non-Slackware Dependencies

    Post#9 by Bogomips » 24 Apr 2015, 22:32

    Verifying the Transferred Files
    Verified. Sat Apr 25 02:16:10 UTC 2015 Seems alright. Copied, pasted, completed run without hitches.

    awk_lids Lists the Dependencies of a Package File
    To be copied, pasted into text editor and saved as awk_lids

    Code: Select all

    # Library Dependencies		2015-01-31 00:14:56
    # Generates
    # reqmts.html:	Used to download distros file for each requirement
    # reqmts:	->	'req' local array driving the recursion
    # ulibs:	Just lib name without trailing space RE " ".* or RE (.*$
    # Files: <pkg>"~"<ulibs element from 'ulb' vector>	(Informative only)
    # Amended: . <- [.]	2015-03-29 16:25:32
    # Corrected: Amendment Error	2015-04-10 15:04:38
    BEGIN{lb="!!!";} 
    {
    split($0,a,">"); split(a[3],a,"<"); #split(a[1],a)	# Assume no embedded sp
    dsc=a[1]; gsub(">",">",dsc); gsub("<","<",dsc);	# Substitute html tokens 2015-03-29 15:52:08 
    if ($0 !~ "[.]so[.]" || index(dsc,lb)==0) {
      print dsc>"reqmts"; print > "reqmts.html"; if ($0 !~ "[.]so[.]") next;
      lb=dsc; cnt[m]=0; l[m++]=lb	# Implement repeat count
      }
    #print dsc>"libs"; cnt[m-1]++
    # Redirecting from file to vector.
    lib[m-1,cnt[m-1]++]=dsc;
    }
    END{print "LIBS\n====";
    if (m=="") {print "None\n===="; exit;}	# Added 2015-04-19 02:03:54 Upd:2015-03-26 17:18:44	No Libraries Present.
    #print "m="m	Commented out	2015-04-19 02:05:02
    #for (i=0; i<m; i++) print "cnt["i"]="cnt[i];
    #print "lib[0,0]="lib[0,0]
    #exit;
    for (i=0; i<m; i++) {
      print cnt[i]" x "l[i];
      # Strip of trailing /" ".*$/ or /(.*$/
      split(l[i],a,"("); split(a[1],a); ulb=a[1];
      for (j=0; cnt[i]>1 && j<cnt[i]; j++)	{
        print lib[i,j];
    #    print lib[i,j]>pan"~"l[i];
        print lib[i,j]>pan"~"ulb;
        if (j==0)  print ulb>"ulibs";
        }
      }
    }
    
    pakfuncs.sh The Bash Functions Suite
    To be copied, pasted into text editor and saved as pakfuncs.sh

    Code: Select all

    # PAKFUNCS.SH  as of Fri Apr 24 22:19:46 UTC 2015
    ## Slackware Show Approved Repos		2015-03-01 19:09:08
    slw()
    {
      local rx;	# Preserve pakdep() index variable  =>  Every function called directly has this! 2015-04-07 14:30:27
          [[ $rel$ver ]] && echo "$sp30${sp30:0:15}($rel $ver)"; # 2015-03-28 22:11:53
          ret=1;		# Return Switch		2015-03-29 15:15:57
          # Approved Slackware Repos	2015-02-19 13:49:05
          for (( i=0; i<${#slr[*]}; i++ ));
          do
    	s=${slr[i]};
    	# /Path/<Slackware Package>.t?z.html
    	# 'appr' Approved for USM set within loop; 'apver' An Approved Version
    	[[ $appr ]] && ! [[ ${s%%/*} ]] && { p=${s##*/}; p=${p%.t?z.html}; v=$(gsv $s);
    	printf "%s\t\t%s" $p $v;
    	[[ $ver ]] && { c=$(vcmp $v $ver); printf "\t%c %s" $c $ver; ok="NO";
    	(( $(expr index $c $rel) )) && ok=OK; printf "\t%s" "$ok"; apver=$v; }
    	echo; continue;
    	}
    	# Approved Repo?
    	appr=""; r=${s#*:}; r=${r% *}; r=${r,,};	# 'Alien[ Bob]' 2015-03-30 00:32:18Compare in lower case
    	for t in ${repos[*]};
    	do
    	  if [ $t == "$r" ]; then	appr=$r; ret=0;
    	    echo ${s#*:}: ${s%:*};
    	    break;
    	  fi
    	done
          done
          ((ret)) && echo ^^^ No Recognised Repos Found ^^^; echo ;
          return $ret;	# 2015-03-29 15:16:23
    }
    ## 	Handling Slackware & USM
    slw_func()
    {
      local rx;	# Preserve pakdep() index variable  =>  Every function called directly has this! 2015-04-07 14:30:27
          # USM Download
          # Expect $rq to still be name of package.
          kpc "Run USM" "Skip USM"
          if ! (($?)); then	# Check for Update
    	[[ $sudo ]] && [[ ${PATH##*:/} != sbin ]] && PATH+=:/sbin;	# 2015-03-28 16:44:29
    	if ! ((usm_up)); then kpv "Run USM Update"; r=$?;	# 2015-04-04 00:17:17
    	! ((r)) && { eval $(echo $sudo) usm -u all; usm_up=1; }	# Corrected Switch to Numeric 2015-04-06 14:40:34	Amended 2015-03-28 16:44:51
    	usm_up=1;	# Don't bother again. Implemented	2015-04-07 19:15:50
    	fi
    	false; until ! (($?))	# Changing Default around
    	do
    	  echo usm -g $rq
    	  eval $(echo $sudo) usm -g $rq
    	  kpv "Finished Invoking USM";	# Changed around Default	2015-04-06 14:51:46
    	done
    	kpc "Accept USM" "Reject USM";	# Precede with reasons for doing so
    	# pkg element:	pkg[<pkg sub>]
    	#	"<pkg><space><ver>["<=>"<rqv>][<space>{sys slw usm}]]"	# Upd:2015-04-06 16:19:24
    	! (($?)) && { pkg[$rq]="$1 $rel$ver usm"; return 1; }	# Amended: Unless Module activated version not known. (Could insert Slackware 14.1 Version) Upd:2015-03-25 22:11:03 Und:2015-04-06 16:15:13
          fi	# USM Download END
          kpc "Process Package" "Skip Package Processing"
          (($?)) && { pkg[$rq]="$1 $rel$ver slw"; return 1; }	# Upd:2015-03-25 22:11:45 Und:2015-04-06 16:17:53
          return 0;		# Necessary due to Immediately Preceding Test	2015-04-06 16:16:56
    }
    ## pkg_func()	Gets version stipulation, if any, and filters out packages.
    ## Invocation: pkg_func <package name from 'pakdep' invocation> <Index of Requirement 'rx'>  2015-04-08 00:33:01
    pkg_func()
    {
      local rx=$2;	# Preserve pakdep() index variable 'rx'  =>  Every function called directly has this! 2015-04-07 14:30:27
    #______________________________________________________________________________
    #______________________________________________________________________________
      s=${req[rx]#$rq}; t=${s#*(}; t=${t#*(}; t=${t%%)*};	# Remove parantheses
      w=$t;		# 2015-03-29 00:48:14
      read x y z <<< "$w";	# <rel op>[ <rel op>] <version>
      rel=""; ver="";
      if ((${#x}));	then	# Not set to null string
        if (($(expr index "$x" "<=>"))); then rel=$x; ver=$y;	# Rel op[s]
          (($(expr index "$y" "<=>"))) && { rel+=$y; ver=$z; }
        else		# Test for Version only by retrieving numeric string
          rel="=="; ver=$x;	# No Relational Op  =>  Version only	2015-04-08 21:17:55
        fi
        # Version specified?  =>  '== version'
        vs=$ver;
        ns=$(expr "$ver" : '\([0-9.]*\)'); ns=${ns%.}; # Remove trailing '.'
        tg=${ver#$ns-}; tg=$(expr "$tg" : '\([0-9]*\)');
        ver=$ns; [[ $tg ]] && ver+=-$tg;		# Added 2015-04-08 21:38:29
        ! ((${#ns})) && { rel=""; ver=""; }	#  =>  No ver specified. Amended 2015-04-08 21:38:29
      fi
      svn="";		# System Version Switch Added 'pkv' 2015-04-08 22:15:44
      # Scan Sys for Package
      svn=$(ver $rq); #pkv=$svn;
    #______________________________________________________________________________
    #______________________________________________________________________________
      r=0; [[ ${pkg[$rq]+z} ]] && z=${pkg[$rq]#*:};	# Null if Skipped or End Pt.	2015-04-23 21:44:55
      ! [[ $ver ]] || ! [[ $z ]] && { prepak $1; r=$?; }	# Amended to keep Return Value	2015-04-23 22:00:31	Dispose of Package if Possible
        ((r)) && return 1;			# ->  Next Requirement
    #______________________________________________________________________________
      # Log Requirement
      rql[$rq]="$1 $rel$ver%${req[rx]}";	# Original Requirement Line  2015-04-11 00:11:25
    #______________________________________________________________________________
    #______________________________________________________________________________
      # Package already under process?	# Reinstated	2015-04-23 23:30:33
      if [[ ${pkg[$rq]+z} ]]; then r=0; 	# Retrieve package version: pkv
        s=${pkg[$rq]#* }; pkv=$(expr "$s" : '\([0-9.-]*\)'); c=$(vcmp $pkv $ver);
        (($(expr index $rel $c))) && { prepak $1; r=$?; }
        ((r)) && return 1;			# ->  Next Requirement
      fi
      return 0;
      if [[ ${qrq[$rq]+x} ]]; then		# Clear iffy requirement with user
        echo Requirement Clarification
        echo Computed: $rq$rel$ver
        echo Unabridged: ${req[$rx]}
        echo Agree hit Enter
        echo Otherwise please enter without spaces Revised Computed
        kpc "Agree hit Enter" "Correcting Computed"
        echo "Please enter one of >, <, >= ,<=, == followed by version number"
        echo -n 'e.g. "> 10.3.2" or just hit Enter if no version required'
        while (( $? ))
        do
          read -p ": " -a ar
          r=""; for e in ${ar[*]}; do r+=$e; done
          qrq[$rq]=${rql[$rq]}%$r; echo "Computed Input: '$r'";
          kpv "Confirm Input"	# Verify
        done
        qr=$r;		# Queried Requirement
      fi
      # Version Compliance
      if [[ ${qrq[$rq]+x} ]]; then 
        rel=$(expr "$qr" : '\([<=>]*\)');
        ver=${qr#$rel}; ver=$(expr "$ver" : '\([0-9.]*\)');
      fi
      # Compare and Check
      [[ $ver ]] && cs=$(vcmp $pkv $ver);
      if (($(expr index cs "$rel"))) || ! [[ $v ]]; then 
        # Request verification
        pro=Processing; [[ $svn ]] && pro=System;
        echo Package: $rq $pkv $rel $ver in $pro
        kpc "Accept Package Version" "Search for Another Package"
        if ! (($?)); then
          [[ $svn ]] && pkg[$rq]="$1:$rq $pkv$rel$ver sys";	# Upd:2015-03-25 21:54:57
          return 1;	#  ->  Next Requirement		2015-04-02 01:26:40
        fi
      fi	# Compare and Check END
          # Fall through to Packages Distros	2015-02-15 01:57:54
      return 0;	# Correction for ((dbg))	2015-04-03 02:47:25
    }
    ##	Getting Package Numbers: Slackware 'xz' 'rpm' 'deb'
    sep()
    {
      local rx;	# Preserve pakdep() index variable  =>  Every function called directly has this! 2015-04-07 14:30:27
      type=""; count=0; dt=0; unset ptp;   # XZ or RPM or DEB type; Vector of Package Types
      unset xz; unset rpm; unset deb   # 2015-03-11 20:55:10
      k=0; j=0; unset nsr; unset slr; distro="";   # Initial Setting
      unset dis; unset num; cnt=0; snu=0;   # Initialise Stats
      for (( i=0; i<${#rps[*]}; i++ )); 
      do
        s=${rps[i]};
        if ! [ "${s%%/*}" ]; then		# Package File	2015-03-28 21:26:38
          if [ "$distro" != Slackware ]; then
    	let k+=d; nsr[k++]=$s; let num[cnt-1]++;
    	t=${s%.html}; t=${t##*.};   # 'ptp' Vector of Package Types 2015-03-01 15:13:42
    	if [ "$t" != "$type" ]; then type=$t; count=0; ptp[${#ptp[*]}]=$type:$i; fi
    	let off=cnt-1; if (( dt )); then eval $type[count++]=$distro:$off; fi
    	dt=0   # Reset (new distro) Switch
          else
    	let j+=d; slr[j++]=$s; let snu++;
          fi
          d=0; continue
        fi
        t=${s#*:};
        if [ "$t" != "$s" ]; then
          if [ "$distro" == Slackware ]; then	# 2015-03-28 21:31:45
    	slr[j]=$s; d=1;
          else
    	nsr[k+dd]=$s; let d=1+dd; dd=0;
          fi
          continue;
        fi
        distro=$s;
        if [ $s != Slackware ]; then nsr[k]=$s; dd=1; dis[cnt++]=$distro:$i;
          dt=1;   # Change of Distro Switch
        fi
      done
    }
    ##	2015-02-27 00:31:25	Show all packages that could meet criteria.
    shw_all()
    {
      local rx;	# Preserve pakdep() index variable  =>  Every function called directly has this! 2015-04-07 14:30:27
      sp30="                              ";
      tot=0; for i in ${num[*]}; do let tot+=i; done;
      echo $'\t'Packages on Offer:"    "$tot
      unset dcount; declare -A dcount;
      for (( i=0; i<${#dis[*]}; i++ ));
      do
        dcount[${dis[i]%:*}]=${num[i]};   # Set up Assoc Array
      done
      for t in ${ptp[@]};
      do
        t=${t%:*};   # 2015-03-01 15:45:06
        tt=0; for d in $(eval echo \${$t[@]});   # Get distro element from 'xz' 'rpm' 'deb' vectors.
        do
          d=${d%:*};   # 2015-03-11 21:16:50
          let tt+=dcount[$d];
        done
        echo ${t^^} Packages: $tt
        for d in $(eval echo \${$t[@]});   # Distro Name
        do
          d=${d%:*};   # 2015-03-11 21:16:50
          s=$d$sp30; s=${s:0:24};   # Formatting
          echo "${sp30:0:4}${s}${dcount[$d]}"
        done
      done
    }
    ##	Create '<package name>.pak' file.
    pak()
    {
      echo "$1 ${pkg[$1]}" > $1.pak	# Prepended <pkg><sp><pro pkg> <version>	2015-04-12 21:46:11
      i=0; for x in ${!pkg[*]}; do ! [[ ${pkg[$x]} ]] && let i++; done      
      let nn=${#pkg[*]}-i;		# of Non-Null Elements
      echo pkg[*]:$nn >> $1.pak	# Amended	2015-04-12 21:46:34
      for x in ${!pkg[*]}; do 
        [[ ${pkg[$x]} ]] && printf "%s\n%s\n" $x "${pkg[$x]}" >> $1.pak;
      done
      echo pkg$'\t'$'\t'$nn
      i=0; for x in ${!lib[*]}; do ! [[ ${lib[$x]} ]] && let i++; done      
      let nn=${#lib[*]}-i; 		# of Non-Null Elements
      echo lib[*]:$nn >> $1.pak                                         
      for x in ${!lib[*]}; do 
        [[ ${lib[$x]} ]] && printf "%s\n%s\n" $x "${lib[$x]}" >> $1.pak;
      done 
      echo lib$'\t'$'\t'$nn
    }
    ##	upak <Package Name>	2015-04-11 22:13:42
    upak()
    {
      readarray -t vec < <(cat $1.pak)
      [[ ${vec[0]%% *} != $1 ]] && { echo "Error: File Header '${vec[0]%% *}' mismatch with '$1' Filename";
        return 1; }
      m=${vec[1]#*:};	# Header: <pkg><sp><pro pkg> <version>		2015-04-12 23:12:26
      for ((k=0; k<m; k++)); do pkg[${vec[2*k+2]}]=${vec[2*k+3]}; done
      echo pkg$'\t'$'\t'${#pkg[*]}
      m=${vec[2*k+2]#*:}; let n=2*k+3;	# Incremented for Header	2015-04-12 23:12:34
      for ((k=0; k<m; k++)); do lib[${vec[n+2*k]}]=${vec[n+2*k+1]}; done
      echo lib$'\t'$'\t'${#lib[*]}
    }
    ## Diagnotic Printout of Elements and Element Statistics	2015-04-22 22:22:55
    title()			# 2015-04-23 21:09:32
    {
      local t; local l; local u;
      l=${#1}; u=${eqs:0:l}; t="$'\n'$u$'\n'${1:0:l}$'\n'$u$'\n'"
      eval echo $t
    }
    diagprt()		# 2015-04-23 21:09:32
    {
      eqs="============================================================"
      title "Package Elements of Assoc. Array 'pkg'"
      for x in ${!pkg[*]}; do echo  $x$'\t'$'\t'${pkg[$x]}; done
      title "Library Elements of Assoc. Array 'lib'"
      for x in ${!lib[*]}; do echo  $x$'\t'$'\t'${lib[$x]}; done
      title "Requirements Log Elements of Assoc. Array 'rql'"
      for x in ${!rql[*]}; do echo  $x$'\t'$'\t'${rql[$x]}; done
      title "Query Requirements Elements of Assoc. Array 'qrq'"
      for x in ${!qrq[*]}; do echo  $x$'\t'$'\t'${qrq[$x]}; done
      title "${#pkl[*]} Elements Comprising Packages Sequential Log 'pkl'"
      echo ${pkl[*]}
      title "Enumeration of All Packages"
      echo ${!pkg[*]}
      title "Enumeration of All Libraries"
      echo ${!lib[*]}
      title "Binaries Download List"; cat Binaries.lst
    }
    ## Get Slackware Package Version		2015-02-18 20:59:46
    gsv ()
    {
      local s; local t;
      s=${1##*/};	# Basename
      s=${s%-*-*};	# -Arch -Tag
      s=${s##*-};	# Version left justified
      s=$(expr "$s" : '\([0-9.]*\)'); s=${s%.};	# Remove hanging '.'
      # Get Tag
      t=${1##*-}; t=$(expr "$t" : '\([0-9]*\)');
      echo $s-$t;
    }
    ## Version in System of Package	2015-02-18 21:00:10
    ver () 
    { 
        local s; local a;
        local w=/var/log/packages/$1*;
        for s in $w;
        do
                [[ "${s##*\*}" == "" ]] && return;
                # -Ver -Arch -Tag
                a=${s##*/}; [[ ${a%-*-*-*} != $1 ]] && continue;
                echo $(gsv $s);
        done
    }
    ## Version Compare  v1 :: v2	2015-02-19 22:58:48
    vcmp(){
      local i; local m
      i=0; t=""; s=${1%-*};
      while [[ $s != $t ]]; 
        do t=${s%%.*}; s=${s#*.}; let v1[i]=t; let i++; done
      i=0; t=""; s=${2%-*};
      while [[ $s != $t ]]; 
        do t=${s%%.*}; s=${s#*.}; let v2[i]=t; let i++; done
      m=${#v1[*]}; [[ m -lt ${#v2[*]} ]] && m=${#v2[*]};
      for ((i=0; i<m; i++))
      do
        let a=v1[i]; let b=v2[i]; [[ a -ne b ]] && break;
      done
      if [[ i -eq m ]]; then	# Compare tags
        a=0; s=${1#*-}; [[ $s != $1 ]] && a=$(expr "$s" : '\([0-9]*\)'); 
        b=0; t=${2#*-}; [[ $t != $2 ]] && b=$(expr "$t" : '\([0-9]*\)'); 
      fi
      [[ a -gt b ]] && echo ">" && return
      [[ a -lt b ]] && echo "<" && return
      echo "="
    }
    ## 2015-03-16 17:00:55	Show all Distros with Menu Selection Entries
    shw_dis()
    {
      unset mnu; m=0;
      echo "${sp30:0:24}Packages"
      for t in ${ptp[@]};
      do
        t=${t%%:*}; echo "${sp30:0:10}${t^^}";
        for d in $(eval echo \${$t[@]});   # Get distro element from 'xz' 'rpm' 'deb' vectors.
        do
          mnu[m]=${d#*:}; let m++;
          s="$m) ${d%%:*}$sp30"; s=${s:0:24};   # Formatting
          echo "${sp30:0:4}${s}${num[${mnu[m-1]}]}"
        done
      done
    }
    ## Verification by Key Press		2015-02-12 00:11:36 
    kpv ()
    {
    local nu; local k;
        while (( 1 ))
        do
          read -s -n1 -p "$1? [Y/n]" k
          case $k in
          "$nu"	)	echo ""; return 0;;
          [yY]	)	echo ""; return 0;;
          [nN]	)	echo ""; return 1;;
    	*	)  echo $'\n'"Invalid Key '$k'"
          esac
        done
    }
    ## Key Press with Confirmation
    kpc ()
    {
    local k; local nu; local ms;
    nu=""; r=1; ms="->  $1"
    false;
      while (( $? ))
      do
        while (( 1 ))
        do
          read -s -n1 -p "$1? [Y/n]" k
          case $k in
          "$nu"	)	echo $'\n'$ms; return 0;;
          [yY]	)	echo $'\n'$ms; return 0;;
          [nN]	)	echo ""; break;;
    	*	)	echo $'\n'"Invalid Key '$k'"
          esac
        done
        kpv "Confirm: $2"
      done
      echo "->  $2"$'\n'
      return 1;
    }
    ## Key Press with Confirmation x 2
    kpcc ()
    {
    local k; local r; local nu; local ms; local f;
    nu=""; r=1; ms="->  $1"; f=1;
    false;
      while (( $? ))
      do
        kpc "$1" "$2"; ! (( $? )) && return 0;
        kpv "Confirm: $2"
      done
      echo $'\n'"->  $2"
      return 1;
    }
    ## Display Package Files of Distro
    disprt()
    {
      local i; local j; local k;  # Visible to called functions!
      de=${dis[$1]}; dx=${de#*:};   # Distro Entry & Offset in 'rps' vector.
      np=${num[$1]};   # Package Files in Distro
      buf0=${rps[dx]}; # Allowing for 'Empty' Distro	2015-04-01 22:32:37
      let k=0;   # Package File Count
      buf1="";	# Initialise Buffer	2015-04-01 01:48:03
      for (( i=dx+1; k<np && i<${#rps[*]}; i++ ))	# 2015-04-01 01:56:55
      do
     #   [[ "${rps[i]%%/*}" ]] && { echo; echo ${rps[i]}; continue; }   # Non-Package File
        [[ "${rps[i]%%/*}" ]] && { buf1=${rps[i]}; continue; }   # Non-Package File
        f=${rps[i]##*/};   # Local file name
        if ! [ ${rpv+x} ]; then
          if [ ! -f wrk/$f ]; then
    	wget  --user-agent="$ua" -q -nc -P wrk http://pkgs.org${rps[i]}; r=$?; fi # Corrected such that 'r' gets wget error return. 2015-04-17 21:08:23
          ((r)) && { echo Failed: "wget  --user-agent='$ua' -q -nc -P wrk http://pkgs.org${rps[i]}"; term=disprt; return $r; }
          # Retrieve Package Version 'pkv' with awk. Also Package Name 'pkn'
          w=$(awk '/class="params"/, /name/{if ($0!~"name") next; print}' wrk/$f)
          w=${w##*:* }; pkn=${w%<*};
          w=$(awk '/class="params"/, /version/{if ($0!~"version") next; print}' wrk/$f)
          w=${w##*:* }; pkv=${w%<*};
          rpv[i]=$pkv:$pkn;   # 'rpv' Version vector corres. to 'rps' element
        else
          pkn=${rpv[i]#*:}; pkv=${rpv[i]%:*};
        fi
          if [[ "${f#$rq?$pkv}" != "$f"  ]] || [[ $lb ]]; then   # Most likely name disagrees. Corrected added library skip 2015-04-06 to be in line with default() code.
    	[[ $buf0 ]] && { echo -n $'\n'$buf0; buf0=""; }	# Allowing for 'Empty' Distro 	2015-04-01 22:37:33
    	[[ $buf1 ]] && { echo; echo $buf1; buf1=""; }	# Allowing for 'Empty' Repo 	310315
    	# Sort out the Tag
    	w=${f#$pkn?$pkv}; t=${w#-}; [[ $t != $w ]] && # Once through the test, pkn & pkv Valid. 2015-04-17 21:14:18 Append Tag 2015-03-30 23:13:00
    	{ t=$(expr "$t" : '\([0-9]*\)'); pkv+=-$t; rpv[i]=$pkv:$pkn; }
    	mnu[sel_seq]="$i:"; let sel_seq++;   # Formatted Package Info Line to be Appended
      	s="${sel_seq}) $f$sp30$sp30"; s=${s:0:60}$pkv;
      	# Append Version Comparison to Formatted Line if Required
    	[[ $ver ]] && { c=$(vcmp $pkv $ver); s+=$sp30; s="${s:0:75}$c $ver"; ok="NO";
    	(( $(expr index $c $rel) )) && ok=OK; s+=${sp30:0:8}$ok; }
    	mnu[sel_seq-1]+=$s; echo "$s";   # Output Formatted Line
          fi
          let k++;   # Increment Package file count
      done
      [[ $buf0 ]] && { echo -n $'\n'$buf0; echo $'\n'"--- No Selectable Package Identified ---"; }
      return 0;
    }
    ## Select Number of Packages being printed at a Time
    sel()
    {
      local i; local j; local k;  # Visible to called functions!
      eq30="=============================="; tm="Package File";
      if ! ((dvec_off)); then  s="$tm$sp30$sp30"; echo "${s:0:60}"Ver;
      s=${eq30:0:${#tm}}$sp30$sp30; echo -n "${s:0:60}===";
      unset mnu;
      fi
      while [[ dvec_off -lt ${#dvec[*]}  ]];	# Loop Introduced	2015-03-21 23:44:52
      do
        tot=0;
        for (( i=dvec_off; i<${#dvec[*]}; i++ ))
        do
          let ptot=tot;
          let tot+=num[dvec[i]]; [[ tot -gt ${1:-$p_lmt} ]] && break;	# Corrected num[..] 2015-03-21 21:40:56
        done
        let dnum=i-dvec_off;   # of distros in sequential order
        # If distro has more packages than the set display limit	2015-04-03 21:02:49
        [[ dnum -eq 0 && i -lt ${#dvec[*]} ]] && dnum=1;	# Push it through!	2015-04-03 21:12:44
        # Iterate through Distros
        for (( i=0; i<dnum; i++ ))
        do
          # Call by Value, not Image!
          disprt ${dvec[dvec_off+i]};	# Display a Distro with Formatted o/p etc. & 'mnu' offset
          r=$?; ((r)) && return $r;		# Fatal 'wget' Error	2015-04-18 17:35:42
        done
        let dvec_off+=dnum; 
        rem=0; for (( i=dvec_off; i<${#dvec[*]}; i++ )) do let rem+=num[dvec[i]]; done
        [[ rem -eq 0 ]] && return;	# 2015-03-22 21:15:42
        echo $'\n'There still remain $rem packages to list.; kpv "Suspend Listing"
        [[ $? -eq 0 ]] && return;	# Introduced smoother transistion	2015-03-22 00:14:03
      done
    }
    declare -A pkg;		# Package Subscripting Array: <pkg sub>
    declare -A lib;		# Library Subscripting Array: <lib sub>
    declare -A qrq;		# Query requirement. <pkg>: <pkg sub> <computed>%<original>%<user data>
    declare -A rql;		# Requirements Log <pkg>: <pkg sub> <computed>%<original>
    declare -a pkl;		# Sequential package log
    declare -a pakre;	# Packages Recursion Vector
    ## Front End function 'pakorg' { <package file url> | [http://pkgs.org/download/]<package> } 2015-03-31 19:18:27
    pakorg()
    {
    ## Example: http://pkgs.org/archlinux/archlinux-core-i686/gcc-4.9.2-4-i686.pkg.tar.xz.html
      date
      dfl=(${dry:=1} ${dbg:=0} ${p_lmt:=12} ${depth:=12} ${term_depth:=2})
      sudo="";		# Flag
      [[ $(whoami) != root ]] && kpv "Not running as 'root'. Use 'sudo'" && sudo=sudo;	# 2015-03-28 16:52:11
      ! [[ $sudo ]] && [[ $(whoami) != root ]] && return;	# 2015-03-28 16:59:09
      recur=-1;		# Recursion Level
      unset pakre; unset pkl;	# Upd:2015-03-27 02:25:10
      repos=(slackware slackwarepatches slacky salix alien ponce);	# Recognised Repositories
      # Set up 'end points'	2015-03-24 18:33:54
      e_pkg=(bzip2-libs awk grep gawk rtld glibc libc6 multiarch-support filesystem linux-api-headers libx11 gcc)
      e_lib=(libm.so.6 libz.so.1 libc.so.6 libstdc++.so.6)
      for v in ${e_pkg[*]}; do pkg[$v]=""; done	# Amended to Null String Initlzn. 2015-04-07 01:29:41 Corrected 310315
      for v in ${e_lib[*]}; do lib[$v]=""; done	# Amended to Null String Initlzn. 2015-04-07 01:29:41 
      [[ -f Binaries.lst ]] && rm Binaries.lst;	# Clear binaries download list	2015-03-28 16:04:57
      [[ -f Binaries.url ]] && rm Binaries.url;	# Clear binaries URL list	2015-04-07 16:56:58
      [[ ! -d wrk ]] && mkdir wrk;			# 2015-04-04 18:06:52
      # Sort out Arguments				2015-03-31 21:33:40
      if [[ ${1##*.} == html ]]; then	# Particular Package File (with reqmts.) 2015-03-31 21:42:24
        pakver $1; r=$?; ((r)) && return $r;	# Global var: $pkv $pkn $f Enhancement 2015-03-31 03:24:14 Obtain version & name
      else		# [http://pkgs.org/download/]<package>	2015-03-31 21:43:58
        selpak $1; (($?)) && return;	# Added Slackware 2015-04-03 01:53:15
        version=${rpv[cx]%%:*};   		# Correcting Omission 2015-04-11 01:58:25 Espected by 'pakdep'	2015-03-20 13:13:08
        pkn=${rpv[cx]#*:}; f=${rps[cx]##*/};	# Correcting Omission 2015-04-11 01:58:25
      fi
      unset term;				# TERMINATOR	2015-04-13 22:46:19
      version=$pkv; pakdep $pkn $f; (($?)) && { echo Run Completed with Errors!; return 1; }	# Error Return (awk)	2015-04-13 20:33:39
      echo Congrats on Surfacing!
      pkn=${pakre[0]};
      pak $pkn;				# Package Data: 'pkg' & 'lib'	2015-04-12 01:35:41
      echo $pkn.pak written out.; echo Run Completed.; date
    }
    pakdep ( )	# Recursive function 'pakdep' <pkg name>  <pkg local file>.html
    {
    ## Author: Bogomips
    ## ©2015 GPL
      ! [[ recur -lt depth ]] && return 2;	# Flagging depth return. Amended ret value 2015-04-06 01:04:00
      let recur++; pakre[recur]=$1;
      # Announcement of Entry: Recursion Level	Recursion Vector
      echo "pakdep()";
      printf "%s\t\t\t%s\n%s\t\t\t%s\n" "Recursion Level" "Package" "===============" "=======";
      for ((i=0; i<recur+1; i++)); do printf "\t%d\t\t\t%s\n" $i ${pakre[i]}; done	# Corrected to Reflect Package Recursion Level 2015-04-07 01:16:59
      pkl[${#pkl[*]}]=$1;	# Logged on Entry	2015-02-25 19:16:30
      # Download Binary	2015-01-27 01:25:08
      dld=$(awk '/id="download"/,/<a/{FS="\""; if (/<a/) print $2}' wrk/$2);
      (($?)) && { term=awk; return 1; }; r=0;	# Error Return (awk) 2015-04-13 20:30:17 Upd:2015-03-28 01:32:40
      ! [[ -f wrk/${2%.html}_bin.html ]] && { wget -nv -nc --user-agent="$ua" http://pkgs.org$dld -O wrk/${2%.html}_bin.html; r=$?; } # Upd:2015-03-26 23:44:59
      ((r)) && { echo "wget 'http://pkgs.org$dld' failed!"; term=wget; return 1; }	# Upd:2015-03-26 23:48:17
      u=$(awk '/class=.*Binary/ {FS="\""; getline; print $4;}' wrk/${2%.html}_bin.html)
      (($?)) && return 1;	# Error Return (awk)	2015-04-13 20:33:39
      w=${u##*/};	# Correction	2015-03-23 21:19:10
      ! ((dry)) && { wget --user-agent="$ua" -nv -nc -P dwn $u; r=$?;	# {xz rpm deb} bin ext.	Amended	2015-03-23 21:20:06
          if ((r)); then echo "wget '$u' fail!"; term=wget; return $r; fi }	# Upd:2015-03-27 00:25:23
      echo ${u##*/} >> Binaries.lst		# Binaries Download List 2015-03-28 16:38:02
      echo $u >> Binaries.url		# Binaries URLs		2015-04-07 16:54:52
      pp=pakorg; ((recur)) && pp=${pakre[recur-1]};		# Added Previous/Processing Package	2015-04-12 22:10:41
      pkg[$1]="$pp $version";	# Req. 'ver' set before binary download. Upd:2015-03-27 00:23:26
    #______________________________________________________________________________
    ##			REQUIREMENTS
    #______________________________________________________________________________
      # Requirements	2015-01-27 00:53:42
      s=$(grep  "<h2>Requires</h2>" wrk/$2);	# kompozer-0.8b3-15-i686.pkg.tar.xz.html
      ! ((${#s})) && { echo "No Dependencies Listed. Return to Previous Level."; return 0; }	# Exhausted Requirements. Recursion level reduced upon Returning. 2015-04-06 01:08:29
      # Obtain required dependencies & Process them
      [[ -f ulibs ]] &&  rm ulibs;	# Upd:2015-03-26 18:13:41 In case not generated
      awk '/<h2>Requires<\/h2>/,/<\/ul>/ {if (/^<li>/) print;}' wrk/$2 | awk -v pan=$1 -f awk_lids;
      r=$?; ((r)) && { term=awk_lids; return $r; };	# Error Return (awk)	2015-04-13 20:33:39
      # Generated Files: 
      # reqmts.html:	Used to download distros file for each requirement
      # reqmts:	->	'req' local array driving the recursion
      # ulibs:	Just lib name without trailing space RE " ".* or RE (.*$
      # Files: <pkg>"~"<ulibs element from 'ulb' vector>	(Informative only)
      local req;	# Vector of Requirements
      local rfi;	# Vector of Corresponding Packages
      local ulb;	# Vector of Unique Libray Names of Multiple Libraries
      # Create Vectors
      readarray -t req   < <( cat reqmts )
      readarray -t rfi   < <( cat reqmts.html )
      [[ -f ulibs ]] && readarray -t ulb   < <( cat ulibs )		# Upd:2015-03-26 18:22:51 Conditionally generated file
      local rx;	# Preserve index variable  =>  Every function called directly has this! 2015-04-07 14:30:27
      local up=0;	# Switched on upon return to this Level. Display Remaining Reqmts.
      local ms;	# Message String
      # Display Dependencies	2015-04-07 15:33:20
      dul="------------";
      dps="$dul$'\n'Dependencies$'\n'$dul"; eval echo $dps
      cat reqmts; echo $dul
    #______________________________________________________________________________
    ##			DEPENDENCIES LOOP
    #______________________________________________________________________________
      for ((rx=0; rx < ${#req[*]} ; rx++));		# Looping through Dependencies 
      do		# Dependencies Loop
        if ((up)); then n=${#req[*]}; let m=n-rx;	# Rem. Reqmts.
          eval echo $dps; echo Last $m of $n; up=0;	# Switch off
          for ((i=rx; i<n; i++)); do echo ${req[i]}; done
          echo $dul
        fi
        lb=""; s=${req[rx]}; t=${s%%(*}; rq=${t%% *}	# Remove (...) then Remove Trailing Spaces
        # First Priority: End Point Check		2015-04-07 14:15:49
        [[ ${pkg[$rq]+x}  ]] && ! [[ ${pkg[$rq]} ]] && { echo -n $rq Elected as End. Pt.; 
          echo "  ->  Next Requirement"; continue; }
        [[ ${lib[$rq]+x}  ]] && ! [[ ${lib[$rq]} ]] && { echo -n $rq Elected as End. Pt.; 
          echo "  ->  Next Requirement"; continue; }
        # Check for Shared Library
        echo PROCESSING $rq;			# Package/Library 2015-03-30 00:27:47
    #______________________________________________________________________________
    ## PROCESS PHASE:	SHARED OBJECT FILE
    #______________________________________________________________________________
        # Relevant for Libraries
        if [[ "${rq%.so.*}" != "$rq" ]] || [[ "${rq%.so*}" != "$rq" && ${rq:0:3} == lib ]]; then
          lb=$rq; echo $'\t'$'\t'$'\t'$'\t'$'\t'"SHARED OBJECT FILE";	# Display Altered 2015-04-08 20:51:00
        # Check if registered in 'lib'	Upd:2015-03-25 22:21:24 Und:2015-04-05 20:28:54
        # lib element: 2015-03-20 14:08:32	Update
        #1)	"<pkg>:" 		Skipped in named Package; 
        #2)	"<pkg>:<req pkg>:" 	Skipped because Library Package Provider skipped
        #3)	"<pkg>:/<Path to Lib>/<Lib> sys"	Found in System as Reqmt of [Current] <pkg>  Upd: 2015-04-05 20:50:26
        #4)	""	Null String. End Point  =>  Installed (no check)
        #5)	"<pkg>:<pkg provider>"	Being provided by named Package
        # Check if registered in 'lib'
          if ! [[ ${lib[$lb]+x} ]]; then r=$(whereis -b $lb);
    	# System?
    	if [ "${r%$lb*}" != "$r" ]; then s=${r%$lb*}; t=${r##*$lb};	# 'libc.so: /lib/libc.so.6' ?? 2015-04-13 14:23:07
    	  s=${s##* }; t=${t%% *}; t+=" sys"; lib[$lb]=$1":$s$lb$t";	# "<pkg>:/<path to>/<shared object file><sp>sys"
    	fi
          fi
          # Do lib prompting
          # Registered
          if [[ ${lib[$lb]+x} ]]; then s=${lib[$lb]#*:}; ms="";	# Initialise 'ms'	2015-04-16 00:57:13
    	((0)) && echo s=${lib[$lb]#*:};
    	if ! [[ $s ]]; then 
    	  if [[ ${lib[$lb]} ]]; then
    	  ms="Library processing skipped in Package ${s%:}";	# (1) Upd:2015-03-25 21:30:45 Und:2015-04-05 20:41:29
    	  else
    	  ms="End Point  =>  Installed";			# (4) 2015-04-08 20:12:50
    	  fi
    	else	# Upd:2015-03-25 21:31:17 Und:2015-04-05 20:41:58
    	  ((0)) && echo "${lib[$lb]#*:} =~ :.+[^:]\$" or "${lib[$lb]} =~ ^.+:.+:\$" and p=${lib[$lb]%:}; 
    	  [[ ${lib[$lb]} =~ .+:.+[^:]$ ]] && ms="Being provided by Package: ${lib[$lb]#*:} in Package ${lib[$lb]%:*}";	# (5) Amended 2015-04-16 01:18:14 Corrected 2015-04-08 20:42:04
    	  [[ ${lib[$lb]} =~ ^.+:.+:$ ]] && { p=${lib[$lb]%:}; 
    	    ms="Skipped in Package ${p%:*} as Package Provider ${p#*:} was skipped."; }	# (2) Corrected 2015-04-08 20:47:00
    	  ! [[ ${lib[$lb]#* sys} ]] && { p=${lib[$lb]% sys}; q=${p%:*}; w=$q; [[ $w == $1 ]] && w=Current;
    	    ms="Reqmt. of $w Package found in System: ${p#*:}."; }	# (3) Msg Altered 2015-04-08 20:32:13
    	fi	# Und:2015-04-05 20:49:02
    	echo $ms;	# Pause for Breathing Space
    	((0)) && read -s -n1 -p "When ready hit any key  ->  Next Reqmt."; # Switched Out 2015-04-14 01:47:34	
    	echo "  ->  Next Reqmt."; continue; # -> next reqmt. of current package
          fi
          # Display all lib conditionals if they exist
          for u in ${ulb[*]};
          do
    	[[ ! $u == $lb ]] && continue;  readarray -t fi < <( cat $1~$lb );	# Amended 2015-03-29 17:55:06
    	for v in ${fi[*]}; do printf "\t\t\t%s\n" $v; done; break;
          done
          kpcc "Process Library: $lb" "Skip Library: $lb";	# Amendment 2015-04-15 21:51:47
          if (($?)); then lib[$lb]="$1:"; continue; fi	#  ->  Next Reqmt  Upd:2015-03-25 21:41:41 Und:2015-04-05 21:34:41
          # Drop through to Requirements !!!
          # $lb, but lib[$lb] not set.
        fi	# Relevant for Libraries END	SHARED OBJECT FILE
        # All Requirements		2015-02-09 21:17:04 2015-04-06 17:48:04
        # Packages + Libraries needing Packages
        # pkg element:	pkg[<pkg sub>]
        #1)	"<pkg><space><ver>["<=>"<rqv>][<space>{sys slw usm}]]"	2015-04-06 17:49:32
        # <pkg>		Package requiring dependency <pkg sub>
        # <pkg sub>		Package subscript of 'pkg' Element
        # <ver>		Version of Package satisfying
        # <rqv>		Required Version with Relationship '<=>'
        #2)	"<pkg>:" 		Skipped in named Package; 	2015-04-06 17:50:03
        #3) ""	Null String. End Point  =>  Installed (no check) Amended 2015-04-06 17:50:26 Updated:2015-03-20 14:06:37
    #______________________________________________________________________________
    ## PROCESS PHASE:	PACKAGE
    #______________________________________________________________________________
        if ! [[ $lb ]]; then			# Packages only
          pkg_func $1 $rx;		#  $rx 2015-04-08 00:34:18 Propagate $1. 2015-04-06 23:23:01 Rename: pak_func <- pkg_func 2015-04-03 01:27:47 (->  pkg_func.sh) Upd:2015-03-28 17:13:11 
          (($?)) && continue;		# 'continue <- return'	2015-04-02 01:28:21
        fi		# Packages only END
        # Requirements '$rq_dis'
        # Download Package Distros File
        ! [[ -f wrk/${rq}_dis ]] && { wget --user-agent="$ua" -nv -i- -F -B http://pkgs.org  -O wrk/${rq}_dis <<< "${rfi[rx]}"
          r=$?; if ((r)); then echo "wget '${rq}_dis' fail!"; term=wget_dis; return $r; fi }	# Upd:2015-03-27 00:01:33
        # Display Brief Package Info					"	Commented out 2015-04-04 15:21:21      
        s=$(awk '/class="repo"/,/<li>/ {if ($0 !~ /<span>/) next; print; exit;}' wrk/${rq}_dis);
        (($?)) && return 1;	# Error Return (awk)	2015-04-13 20:33:39
        s=${s#*<span>}; echo "{${s%</span>*}}";		# Quoted 2015-04-15 21:55:38
    #______________________________________________________________________________
    ##	LIBRARIES EXTRA
    #______________________________________________________________________________
        if [[ $lb ]]; then elmop $1; r=$?;	# Corrected call to pass Package Name	2015-04-22 22:00:51Implemented 180415
          case $r in
          1	)	term=elmop; return 1;;
          2	)	echo -n "Library Package Provider "; echo -n $pkn skipped in Package ${pkg[$pkn]%%:*};
    		kpv "Skip Library Package Provider"; ! (($?)) && { echo "->  Next Requirement"; continue; };;
          3	)	echo -n "Library Package Provider "; pkn=${lib[$lb]#*:}; w=${pkg[$pkn]%% *};	# Package processing Package Provider	2015-04-22 01:31:22
    		[[ $w == $1 ]] && w=Current; echo Processed in $w Package.;
    		echo "->  Next Requirement"; continue;;
          esac
        fi
      # Heuristically ...	2015-04-05 18:44:23
      if ((0)); then
        # Package for Library		2015-04-05 18:50:44
        if [[ $lb ]]; then	r=1;	# Check for End Pt. or Being Processed flag
          ! [[ ${pkg[$pkn]} ]] && echo -n $pkn Elected as End. Pt.;
          ! [[ ${pkg[$pkn]##*:} ]] && echo -n $pkn skipped in Package ${pkg[$pkn]%%:*};
          [[ "${pkg[$pkn]#* }" != "${pkg[$pkn]}" ]] && echo -n Processed in Package ${pkg[$pkn]%% *};
          ! [[ ${pkg[$pkn]+x}  ]] && r=0;
          ((r)) && { echo "->  Next Requirement"; continue; }
        fi				# 2015-04-05 19:53:19
      fi
    #______________________________________________________________________________
    #______________________________________________________________________________
        kpc "Process Package" "Skip Package"	# Added 2015-04-01 20:53:18
        if (($?)); then
          pkg[$rq]="$1:$rq:"; continue;	# Skipped in named Package
        fi
        awk -f awk_distro wrk/${rq}_dis; r=$?; ((r)) && { term=awk_distro; return $r; }	# Error Return (awk)	2015-04-13 20:33:39
        # Check for Slackware			2015-02-18 01:55:39
        # rps	All Repos
        # slr	Slackware Repos
        # nsr	Non-Slackware Repos
        # Expect 'rel'(rel op) & 'ver'(reqd version) to have been set, respectively 		# Slackware Array  <-  Relevant Elements
        readarray -t rps   < <( cat ${rq}_ar.rep )	# <- Repositories <- awk_distro
        sep   # sep() Separates Slackware from other Distros, Removes empty repos
    #______________________________________________________________________________
    ## PROCESS PHASE:	SLACKWARE
    #______________________________________________________________________________
        # Slackware Packages
        [[ ${slr+x} ]] && echo Found Slackware Package Versions && slw;	# 2015-03-29 14:58:28 Rename: sws <- slw	2015-04-03 01:09:26
        if ! (($?)); then   # Show Slackware Approved Repos Upd:2015-03-29 14:58:56
          slw_func $1;		# Propagating $1 2015-04-06 23:09:36. -> slw_func.sh 2015-04-03 01:38:17
          (($?)) && continue;	# 2015-04-03 01:41:54
        # Drop through to find Package in other Distro
        fi	# Slackware Packages END
        # Set up Non-Slackware Repos Display
        # Total # of Packages on Offer
        # Distro | # of Packages
        # 'snu' # of Slackware Packages. 'dis' Vector of other Distros. 'cnt Count of Distros
        # 'num' Vector element:  # of Packages for corres. Distro
    #______________________________________________________________________________
    ## PROCESS PHASE:	NON-SLACKWARE
    #______________________________________________________________________________
        shw_all;   # Shows Packages Counts under Types (XZ RPM DEB) for resp. Distro.
        # Set Up Default Package. First file of first Distro.
        # Set Up 'defent' Default entry for 'mnu'.
        # ->  defent:<package file offset in 'rps'>:<Formatted Line>
        # Initialise: 'rpv'
        default;	# 2015-03-23 17:14:22
        r=$?; [[ ${term+x} ]] && return $r;		# Fatal Error Termination
        if ! [[ $defent ]]; then let term=1; return 3; fi   # Default Entry Not Found Amended Ret Val 2015-04-06 01:09:58
        menu;   # Returns 'cx' Chosen Index into 'rps'
        # From here on $rq unreliable.	2015-04-04 18:09:30
        ((0)) && echo lb=$lb cx=$cx rq=${rpv[cx]#*:}
        if [[ $lb ]]; then	rq=${rpv[cx]#*:};	# Dispose of Package for Libray if Possible
          lib[$lb]="$1:$rq";		# Register the Library	2015-04-15 22:16:12
          svn=""; prepak $1; (($?)) && continue;	# ->  Next Requirement.	Reset 'svn' 2015-04-15 17:49:48
          kpcc "Process Package $rq for $lb" "Skip Package $rq for $lb";	# TO BE superseded by menu option 2015-04-17 23:00:50
          (($?)) && { lib[$lb]="$1:$rq:"; continue; }	# Skipped in named Package 2015-04-15 22:15:58
        fi
        version=${rpv[cx]%%:*};   # Espected by 'pakdep'	2015-03-20 13:13:08
        pakdep ${rpv[cx]#*:} ${rps[cx]##*/}; r=$?;		# Amended 2015-04-06 01:13:10
        [[ ${term+x} ]] && return $r;	# Amended 2015-04-06 01:15:28 Unconditional Return to Level 0. 2015-03-08 20:55:05
        ((r)) && return $r;		# 1:wget 2:Out of Depth 2015-04-06 01:18:53
        let recur--; up=1;	# Recursion level reduced from Callee Level. Reqmts. Display. 2015-04-15 17:43:12
        # Announcement of Re-entry: Recursion Level	Recursion Vector. Added 2015-04-06 14:34:57
        echo  "  <-  pakdep()"
        printf "%s\t\t\t%s\n%s\t\t\t%s\n" "Recursion Level" "Package" "===============" "=======";
        for ((i=0; i<recur+1; i++)); do printf "\t%d\t\t\t%s\n" $i ${pakre[i]}; done	# Corrected to Reflect Package Recursion Level 2015-04-07 01:16:59
      done		# Dependencies Loop END
      return 0;		# Just to be on safe side	2015-04-06 01:20:23
    }  
        # pkg element:	pkg[<pkg sub>]
        #1)	"<pkg><space><ver>["<=>"<rqv>][<space>{sys slw usm}]"	2015-04-06 17:49:32
        # <pkg>		Package requiring dependency <pkg sub>
        # <pkg sub>		Package subscript of 'pkg' Element
        # <ver>		Version of Package satisfying
        # <rqv>		Required Version with Relationship '<=>'
        #2)	"<pkg>:" 		Skipped in named Package; 	2015-04-06 17:50:03
        #3) ""	Null String. End Point  =>  Installed (no check) Amended 2015-04-06 17:50:26 Updated:2015-03-20 14:06:37
    ## Intervention to, if possible, Eliminate Package from being Processed
    prepak()	# 2015-04-06 19:04:39
    {
          ((0)) && echo rq=$rq
          ms=""; [[ $svn ]] && ! [[ ${pkg[$rq]+x} ]] && { pkg[$rq]="$1 $svn sys";
    	ms="Requirement of Current Package. Found in System"; }	# Prevent overwrite of an existing Package Element	2015-04-23 01:04:12
          ! [[ ${pkg[$rq]+x}  ]] && return 0;	# Not Set.
          ! [[ ${pkg[$rq]} ]] && ms="$rq Elected as End. Pt.";	# (3)
          ! [[ ${pkg[$rq]#*:} ]] && ms="$rq skipped in Package ${pkg[$rq]%%:*}";	# (2)
          if ! [[ $ms ]]; then w=${pkg[$rq]}; s=${w% ???}; t=${w#$s }; ts=""; # Reset trailing info. 2015-04-14 17:49:48
          ((0)) && echo "w=${pkg[$rq]}; s=${w% ???}; t=${w#$s };"
    	[[ "$s" != "$w" ]] &&
    	case $t in
    	  sys) ts="Found in System";;
    	  usm) ts="Found by USM";;
    	  slw) ts="Available as Slackware";;
    	    *) ts="";;
    	esac
    	s=${w#* }; v=${s%% *}; opt=${w#*$v};	# Optional part could be empty
    	[[ $ts ]] && opt=${opt% ???};		# Extract flag
    	w=${pkg[$rq]%% *}; [[ $w == $1 ]] && w=Current;
    	ms="$rq $v$opt Processed in $w Package. $ts";
          fi
          echo -n $ms;
          echo "  ->  Next Requirement"
          return 1;
    }
    ##	Eliminate Mother Package of Library if Possible
    elmop()
    {
    readarray -t any < <(awk '/class="repo"/,/<li>/ {if ($0 ~ /class="repo"/) {split($0,a,":"); split(a[1],a,">"); print a[2];}
          if($0 ~ /<li>/) {split($0,a,">"); print a[3],match(a[3],"-[0-9]+[.-]")-1;}}' wrk/${rq}_dis)
          (($?)) && return 1;	# Error Return (awk)	2015-04-13 20:33:39
          pp=1;			# Provider Package Switch
          for ((i=0; i<${#any[*]}; i++)); do
    	k=${any[i]#*</a }; [[ $k == ${any[i]} || k -lt 0 ]] && continue;	# Added test for no match being found	2015-04-23 16:39:52
    	((0)) && echo ${any[i]:k} $'\t' pkn=${any[i]:0:k};
    	pkn=${any[i]:0:k}; ! [[ ${pkg[$pkn]} ]] && continue;
    	! [[ ${pkg[$pkn]##*:} ]] && { lib[$rq]="$1:$pkn:"; return 2; }		# Created 'lib' Element: Skipped	2015-04-22 00:18:28
    	v=${pkg[$pkn]#* }; v=$(expr "$v" : '\([0-9.-]*\)'); nav=$pkn-$v; 
    	if [[ ${any[i]#$nav} != ${any[i]} ]]; then 	# Reqd. Package Processed Previously	2015-04-18 21:03:33
    	  ((pp)) && { pp=0; echo Possible Package Provider/s with Version $v for Library $rq;
    	    lib[$rq]=$1:$pkn; }		# Created 'lib' element.	2015-04-22 00:09:18
    	  echo ${any[i]%</a*}
    	fi
          done	
          ! ((pp)) && return 3;	# Processed Previously	2015-04-18 21:03:33
          return 0;			# No Exception Detected.
    }
    ## Get Package
    pget () 
    { 
        [[ ! -f wrk/${1##*/}_dis ]] && { wget --user-agent="$ua" -nv -nc  -O wrk/${1##*/}_dis $1;
          if (($?)); then echo "wget '${1##*/}_dis' fail! "; return 1; fi }	# Upd:2015-03-31 21:55:48
        awk -f awk_distro wrk/${1##*/}_dis
    }    
    ## First Time package display and Selection of Package
    selpak()
    {
      rq=${1##*/}; u=http://pkgs.org/download/$rq
      # Check out given URL
      [[ $rq != "$1" ]] && [[ "$1" != $u ]] && { echo "Incorrect URL Argument"; return 1; }
      pget $u; r=$?; ((r)) && return $r;		# 2015-03-31 21:59:22
      readarray -t rps   < <( cat ${rq}_ar.rep )
      sep
        # Slackware added	2015-04-03 01:54:31
        [[ ${slr+x} ]] && echo Found Slackware Package Versions && slw;	# 2015-03-29 14:58:28 Rename: sws <- slw	2015-04-03 01:09:26
        if ! (($?)); then   # Show Slackware Approved Repos Upd:2015-03-29 14:58:56
          slw_func;		# -> slw_func.sh 2015-04-03 01:38:17
          r=$?; ((r)) && return 2;	# 2015-04-03 01:41:54
        # Drop through to find Package in other Distro
        fi	# Slackware Packages END
      shw_all
      default
      menu
    }
    ## Retrieve Package Version 'pkv' with awk. Also Package Name 'pkn' 2015-03-31 03:15:15
    pakver()
    {
      f=${1##*/}; r=0;	# Upd:2015-03-28 01:35:05
      if [ ! -f wrk/$f ]; then wget  --user-agent="$ua" -q -nc -P wrk $1; r=$?; fi	# Upd:2015-03-27 00:14:09
      ((r)) && { echo Failed: "wget  --user-agent='$ua' -q -nc -P wrk $1"; term=1; return $r; }	# Terminate on Fatal Error 2015-04-18 15:31:30
      # Retrieve Package Version 'pkv' with awk. Also Package Name 'pkn'
      w=$(awk '/class="params"/, /name/{if ($0!~"name") next; print}' wrk/$f)
      w=${w##*:* }; pkn=${w%<*};
      w=$(awk '/class="params"/, /version/{if ($0!~"version") next; print}' wrk/$f)
      w=${w##*:* }; pkv=${w%<*};
    }  
    ## Set up First Valid Entry found as the Default Package
    default()
    {
      local rx;	# Preserve pakdep() index variable  =>  Every function called directly has this! 2015-04-07 14:30:27
         de=${dis[0]}; dx=${de#*:};   # Distro Entry & Offset in 'rps' vector.
         np=${num[0]};   # Package Files in Distro
         unset rpv; defent="";
         let k=0;   # Package File Count
         for (( i=dx+2; k<np && i<${#rps[*]}; i++ ))
         do
          [[ "${rps[i]%%/*}" ]] && { echo; echo ${rps[i]}; continue; }   # Non-Package File
          pakver http://pkgs.org${rps[i]}; r=$?; ((r)) && { term=default; return $r; }	# Enhanced 2015-03-31 03:24:14
    	rpv[i]=$pkv:$pkn;   # 'rpv' Version vector corres. to 'rps' element
    	if [[ "${f#$rq?$pkv}" != "$f"  ]] || [[ $lb ]]; then   # Most likely name disagrees 
    	  # Sort out the Tag
    	  w=${f#$pkn?$pkv}; t=${w#-}; [[ $t != $w ]] &&	# Once through the test, pkn & pkv Valid. 2015-04-17 21:14:18 Append Tag 2015-03-30 23:13:00
    	  { t=$(expr "$t" : '\([0-9]*\)'); pkv+=-$t; rpv[i]=$pkv:$pkn; }
    	  let sqn++; defent="$i:";   # Formatted Package Info Line to be Appended
    	  s="0) $f$sp30$sp30"; s=${s:0:60}$pkv;
    	  # Append Version Comparison to Formatted Line if Required
    	  [[ $ver ]] && { c=$(vcmp $pkv $ver); s+=$sp30; s="${s:0:75}$c $ver"; ok="NO";
    	  (( $(expr index $c $rel) )) && ok=OK; s+=${sp30:0:8}$ok; }
    	  defent+=$s; break;
    	fi
        done   # Default Entry END
    }
    ##	'ptp_tot'[ele]<Package File Total for thie Type>
    typtot()
    {
      unset ptp_tot;
      for ((j=0; j<${#ptp[*]}; j++))
      do
        t=${ptp[j]%%:*}; tt=0;
        for d in $(eval echo \${$t[@]})
        do let tt+=num[${d#*:}]; done
        let ptp_tot[j]=tt
      done
    }
    menu()
    {
      local rx;	# Preserve pakdep() index variable  =>  Every function called directly has this! 2015-04-07 14:30:27
      local nu; local k; local m; local rm=1; local rt; local rd;
      dvec_off=0; unset dvec;	# Initialise	2015-04-14 02:25:28
      while ((rm))
      do
        m=1;
        if [[ dvec_off -lt ${#dvec[*]} ]]; then   # Display Zero Option
          echo "0) Continue Previous Unfinished Listing"; m=0; fi
        w=""
        for v in ${ptp[@]}; do w+=${v%:*},; done
        echo $'\n'"Main Menu";
        echo "1) Select by Type (${w%,})"
        echo "2) Select by Distro"
        echo "3) Select by Package";   # 2015-03-19 13:24:02
        # Show default package file
        echo Hit Enter for Default Package File:
        echo "Def)${defent#*)}";
        read -n1 -p "Press a Key"$'\n'"#? " k
        case $k in
        "$nu"	)	let k=-1; rm=0;;
        [0-9]	)	[[ k -gt 3 || k -lt m ]] && { echo $'\n'Error: $'\n'"Invalid Entry Number: $k"; echo; continue; }; rm=0; echo;;
          *		)  echo $'\n'Error: $'\n'"Non-Numeric '$k'"; echo; continue;;
        esac
        let m_ent=k   # of Menu Entry Selected
        [[ m_ent -ne 0 ]] && { dvec_off=0; unset dvec; }
        if [[ m_ent -eq 1 ]]; then   # Display Package Type Menu
          typtot; let rt=1; 
          while ((rt))
          do
    	echo $'\n'"0)  ->  Main Menu"
    	s="${sp30:0:6}Type$sp30"; echo "${s:0:20}Packages";
    	for ((i=0; i<${#ptp_tot[*]}; i++));
    	do
    	  let m=i+1; w=${ptp[i]%%:*};
    	  s="$m) ${w^^}$sp30"; s=${s:0:24};   # Formatting
    	  echo "$s${ptp_tot[i]}"
    	done
    	read -n1 -p "#? " k
    	case $k in
    	0		)	rm=1; echo $'\n'"MAIN SELECTION"; continue 2;;
    	[1-9]	)	[[ k -gt ${#ptp[*]} ]] && { echo $'\n'Error: $'\n'"Invalid Entry: $k"; echo; continue; }; rt=0; echo;;
    	  *	)  	echo $'\n'Error: $'\n'"Non-Numeric '$k'"; echo;;
    	esac
          done
          # Set up Vector of Distros 'dvec'.
          let m=k-1; t=${ptp[m]%%:*};   # Package Type
          z=$(eval echo \${#$t[@]});   # of Distros
          for ((i=0; i<z; i++));
          do
    	dvec[i]=$(eval echo \${$t[i]#*:})
          done
          echo ${t^^};   # Title
        fi  # Select Type  END
        # Select Distros	2015-03-16 23:37:25
        if [[ m_ent -eq 2 ]]; then	rd=1
          echo "0)  ->  Main Menu"; shw_dis;   # 'mnu' <- Entry # less 1. Zero base.
          while ((rd ))
          do
    	echo Enter space separated numbers, if more than one selection required.
    	read -p "#/s? " -a a   # Array a  <-  Number/s
    	[[ ${#a[*]} -eq 1 && a -eq 0 ]] && { rm=1; continue 2; };   #  ->  Main Menu
    	# Check for Non-Numeric
    	ems=$'\n'"Error!"$'\n'; enu="Non-Numeric: ";
    	s=$(expr "${a[*]}" : '\([0-9 ]*\)'); w=${a[*]}; sp=$sp30$sp30;
    	if [[ ${#s} -lt ${#w} ]]; then
    	  echo $ems; echo "$enu$w"; echo "${sp:0:${#enu}}${sp:0:${#s}}^"
    	  continue;
    	fi
    	# Check for Duplicates		2015-03-17 15:29:20
    	x=$(printf "%s\n" "${a[@]}"|sort|uniq -d)
    	if ((${#x})); then	echo $ems; echo "Duplicate Entry: $x"
    	  continue;
    	fi
    	# Out of Range?
    	rd=0; es="";
    	for v in ${a[@]};
    	do
    	  [[ v -gt ${#mnu[*]} ]] && { es+="$v "; rd=1; }	# Corrected menu #  2015-03-21 22:28:01
    	done
    	if ((rd)); then echo $ems; echo "Out of Range Entry: $es"; continue; fi	# 2015-03-21 20:30:22
    	for ((i=0; i<${#a[*]}; i++)); do let dvec[i]=${a[i]}-1; done	# Zero base. 2015-03-21 20:34:18
    	echo SELECTED DISTROS;
          done
        fi  # Select Distros END
        # All Distros	2015-03-19 13:43:14
        if [[ m_ent -eq 3 ]]; then	let m=${#dis[*]}-1;
          for v in $(eval echo "{0..$m}"); do dvec[$v]=$v; done
          echo ALL DISTROS
        fi   # All Distros END
          if [[ m_ent -gt 0 ]]; then let sel_seq=0;   # -> Initialisation	2015-03-18 19:28:25
    	echo $'\n'"0)  ->  Main Menu"; 
          fi
          if [[ m_ent -ge 0 ]]; then   #  Display for Selection [Remaining} Package Files
    	sel 9; r=$?; ((r)) && return $r;  # Show 9 Packages at a Time
    	echo $'\n'Select Package File Entry, or
    	echo "0)  ->  Main Menu, or"
    	echo Hit Enter for Default Package File:
    	w=${defent#*:}; v=${w:0:60}; dm=${v#* }$sp30; dm=${dm:0:56}"Ver. "${w:60}; # 2015-03-31 00:26:45
    	echo "$dm";
    	rp=1; while ((rp))
    	do
    	  read -p "#? " s
    	  if ! [ $s ]; then let sel_ent=-1; rp=0; continue; fi  # Default Value
    	  w=$(expr "$s" : '\([0-9]*\)');
    	  if [[ ${#w} -lt ${#s} ]]; then   # Non-Numeric i/p
    	  echo "$ems"; echo "$enu$s"; echo "${sp:0:${#enu}}${sp:0:${#w}}^"
    	  continue;	fi
    	  if [[ s -gt ${#mnu[*]} ]]; then echo $ems;	# Selectable Package file # starts at mnu[0]	Corrected 2015-04-11 16:10:02
    	  echo "Out of Range Entry: "$s; continue;	fi
    	  if ! ((s)); then rm=1; echo $'\n'"MAIN SELECTION"; continue 2; fi   # -> Main Menu 2015-03-21 20:11:53 
    	  rp=0; let sel_ent=s;
    	done
          fi
          [[ m_ent -lt 0 ]] && let sel_ent=-1;   # Default from main Menu
          # Confirm Package Choice
          rm=1;	# If -ve resume main loop
          cfm="Def)${defent#*)}"; cx=${defent%%:*};   # Index of Choice in 'rps'
          [[ sel_ent -gt 0 ]] && { cfm=${mnu[sel_ent-1]#*:}; cx=${mnu[sel_ent-1]%%:*}; }
          kpc "$cfm  " "Main Menu Select"
          if ! (($?)); then rm=0; fi   # Choice confirmed
      done   # Main Menu
      return 0;	# 2015-04-03 01:59:18
    }
    
    Enjoy!
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    User avatar
    francois
    Contributor
    Contributor
    Posts: 5116
    Joined: 28 Dec 2010, 14:25
    Distribution: kde xfce porteus manjaro kubun
    Location: Enfin l'été, le changement climatique attendu: le soleil.

    Re: Resolving Non-Slackware Dependencies

    Post#10 by francois » 19 May 2015, 01:40

    Hello bogomips. I have followed your instructions and I do not get the expected results. I will come back to report. :(
    Voltaire: Le mieux est l'ennemi du bien.

    Bogomips
    Full of knowledge
    Full of knowledge
    Posts: 2563
    Joined: 25 Jun 2014, 15:21
    Distribution: 3.2.2 Cinnamon & KDE5
    Location: London

    Re: Resolving Non-Slackware Dependencies

    Post#11 by Bogomips » 19 May 2015, 12:23

    Hi francois, do let me know how far you have got, and we can see if something more has to be added to the directions.
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    User avatar
    francois
    Contributor
    Contributor
    Posts: 5116
    Joined: 28 Dec 2010, 14:25
    Distribution: kde xfce porteus manjaro kubun
    Location: Enfin l'été, le changement climatique attendu: le soleil.

    Re: Resolving Non-Slackware Dependencies

    Post#12 by francois » 30 May 2015, 01:15

    Resolving pkgs.org non-Slackware Dependencies with bogomips method in root mode.

    Ingredients:
    Files needed in a newly created pak folder
    - awk_distro
    - pkget.sh
    - pakfuncs.sh
    - awk_lids

    1.0. Environment (bogomips I am appropriating your instructions):

    1.1. Created a folder on the hdd in which all the necessary files will be stored:
    /root/pak

    1.2. Prepare USM:
    1.2.1 /etc/usm/usm.conf file setting has to be changed:
    MODULES=false to MODULES=true (I have created the module to do so with your above instructions)
    1.2.2 USM updated database

    Code: Select all

    root@porteus:~# usm -u all
    1.3. Files preparations: awk_distro, pkget.sh and pakfuncs.sh preparation:
    1.301 Created awk_distro (copy/paste the content you made available) file new version available bnsdr see page two of thread
    ,
    1.311. Created pkget.sh (copy/paste the content you made available) with executable script properties.
    1.312. Sourced it with command:

    Code: Select all

    root@porteus:~/pak# source pkget.sh
    root@porteus:~/pak#
    1.321. Created pakfuncs.sh (copy/paste the content you made available) file new version available bnsdr, see page two of thread with executable script properties.
    1.322 Finding and inserting user agent (ua) for the browser
    1.3221 In my case the browser is google-chrome
    1.32211 Use the following link to find your ua:
    http://useragentstring.com/index.php
    1.32212 Insert the ua into the pakfuncs.sh with the following command:

    Code: Select all

    root@porteus:~/pak# echo ua='"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.65 Safari/537.36"' >> pakfuncs.sh
    root@porteus:~/pak#
    1.323 Source it with command:

    Code: Select all

    root@porteus:~/pak# source pakfuncs.sh
    root@porteus:~/pak#
    1.4. Between each run with the same package or new package:
    Reset:
    Close terminal tab Ctl+d, if in a tab. Open new tab.

    Code: Select all

    cd pak  # If needed
    source pakfuncs.sh
    1.5 Definitions:
    pakorg () pakorg is a convention to get to pkgs.org url, will be used in a practical example that you present later.
    pakdep () pakdep is a convention , will be used in a practical example that you present later.


    ********************************************************
    2.0 Verifying example:

    2.1 Run procedure:
    Accepting the default option works. However, e.g. pakorg http://pkgs.org/archlinux/archlinux-cor ... ar.xz.html, this link does not seem to work no more.
    I am finding some html files linked to the packages that I have choosen to download. But not the packages themselves. OK. You explain it later:
    ON This is the default, and binaries are not downloaded, but just recorded in the binaries download list in file 'Binaries.lst'. Corresponding URLs to be found in 'Binaries.url'.

    I was not able to complete the procedure for nemo
    USM. Accept USM If USM has been successful. I do not understand what is supposed to happen here. OK. While using:

    Code: Select all

    pakorg http://pkgs.org/download/fotoxx
    USM will come up. However, when I do use USM option, as there is a package from slacky, but as it is not in the package list for USM, pakorg command will abort:

    Code: Select all

    root@porteus:~/pak# pakorg http://pkgs.org/download/fotoxx
    Fri May 29 21:06:20 EDT 2015
    0
    Found Slackware Package Versions
    Slacky: Slackware 13.37
    fotoxx-12.01.2-x86_64-1sl               12.01.2-1
    Slacky: Slackware 14.0
    fotoxx-13.01.2-x86_64-1sl               13.01.2-1
    
    Run USM? [Y/n]
    Confirm: Skip USM? [Y/n]
    Run USM? [Y/n]
    -> Run USM
    usm -g fotoxx
    
     Nothing found for:  fotoxx 
    
    Finished Invoking USM? [Y/n]
    Accept USM? [Y/n]
    -> Accept USM
    root@porteus:~/pak#
    I got further with fotoxx. However, at some point the procedure aborted too:

    Code: Select all

    Downloaded: 1 files, 16K in 0.1s (116 KB/s)
    {Perl module for manipulating EXIF data}
    Process Package? [Y/n]
    -> Process Package
    0
            Packages on Offer:    0
    Run Completed with Errors!
    root@porteus:~/pak#
    I will try to have a complete run with a simpler package.

    Thanks. This is very interesting! It opens interesting possibilities in terms of package provision. :)
    Voltaire: Le mieux est l'ennemi du bien.

    User avatar
    francois
    Contributor
    Contributor
    Posts: 5116
    Joined: 28 Dec 2010, 14:25
    Distribution: kde xfce porteus manjaro kubun
    Location: Enfin l'été, le changement climatique attendu: le soleil.

    Re: Resolving Non-Slackware Dependencies

    Post#13 by francois » 30 May 2015, 01:35

    Error message for photoprint package (in pkgs.org, a slackware version 14.1 is available):

    Code: Select all

    root@porteus:~/pak# pakorg http://pkgs.org/download/photoprint
    Fri May 29 21:37:11 EDT 2015
    0
    cat: photoprint_ar.rep: No such file or directory
            Packages on Offer:    0
    
    Main Menu
    1) Select by Type ()
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def)
    Press a Key
    #? 
    Def)  ? [Y/n]
    -> Def)
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0
    awk: warning: command line argument `wrk/' is a directory: skipped
    bash: pkg[$1]: bad array subscript
    root@porteus:~/pak# 
    Voltaire: Le mieux est l'ennemi du bien.

    Bogomips
    Full of knowledge
    Full of knowledge
    Posts: 2563
    Joined: 25 Jun 2014, 15:21
    Distribution: 3.2.2 Cinnamon & KDE5
    Location: London

    Re: Resolving Non-Slackware Dependencies

    Post#14 by Bogomips » 30 May 2015, 13:40

    francois wrote:I got further with fotoxx. However, at some point the procedure aborted too:

    Code: Select all

    Downloaded: 1 files, 16K in 0.1s (116 KB/s)
    {Perl module for manipulating EXIF data}
    Process Package? [Y/n]
    -> Process Package
    0
            Packages on Offer:    0
    Run Completed with Errors!
    root@porteus:~/pak#
    I will try to have a complete run with a simpler package.
    francois, thanks for feedback. Arch gimp is simpler. :) So long there has been no response, have not seen the need to post any update. Will post update later. However as they say in the best cooking programmes at the end of the show when the chef announces a dish that's been made earlier and taken out of the oven for all to enjoy:

    Code: Select all

    guest@porteus:~$ cd pk01/
    guest@porteus:~/pk01$ . ../p10/Por/Komodo/funcs.sh
    guest@porteus:~/pk01$ pakorg fotoxx
    Tue May  5 02:11:30 BST 2015
    Not running as 'root'. Use 'sudo'? [Y/n]
    0
    Found Slackware Package Versions
    Slacky: Slackware 13.37
    fotoxx-11.06-i486-1sl           11.06-1
    Slacky: Slackware 14.0
    fotoxx-12.12.1-i486-1sl         12.12.1-1
    
    Run USM? [Y/n]
    Skip USM? [Y/n]
    ->  Skip USM
    Other Distro? [Y/n]
    -> Other Distro
    Process Package? [Y/n]
    -> Process Package
            Packages on Offer:    27
    RPM Packages: 18
        Fedora                  4
        OpenMandriva            5
        ROSA                    5
        Mageia                  2
        ALT                     1
        CentOS                  1
    DEB Packages: 9
        Ubuntu                  6
        Debian                  3
    
    Main Menu
    1) Select by Type (rpm,deb)
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def) fotoxx-13.04-4.fc20.i686.rpm.html                        13.04-4
    Press a Key
    #? 1
    
    0)  ->  Main Menu
          Type          Packages
    1) RPM                  18
    2) DEB                  9
    #? 2
    DEB
    
    0)  ->  Main Menu
    Package File                                                Ver    
    ============                                                ===
    Ubuntu
    Ubuntu 12.04 LTS:Ubuntu Universe
    1) fotoxx_12.01.2-0ubuntu1_i386.deb.html                    12.01.2-0
    
    Ubuntu 12.04 LTS:GetDeb Apps
    2) fotoxx_14.04.1-1~getdeb1_i386.deb.html                   14.04.1-1
    
    Ubuntu 14.04 LTS:Ubuntu Universe
    3) fotoxx_12.01.2-0ubuntu3_i386.deb.html                    12.01.2-0
    
    Ubuntu 14.04 LTS:GetDeb Apps
    4) fotoxx_15.05-1~getdeb1_i386.deb.html                     15.05-1
    
    Ubuntu 14.10:Ubuntu Universe
    5) fotoxx_14.07.1-1_i386.deb.html                           14.07.1-1
    
    Ubuntu 14.10:GetDeb Apps
    6) fotoxx_15.04.1-1~getdeb1_i386.deb.html                   15.04.1-1
    
    Debian
    Debian Wheezy:Debian Main
    7) fotoxx_11.11.1-1.1_i386.deb.html                         11.11.1-1
    
    Debian Jessie:Debian Main
    8) fotoxx_14.10.2-1_i386.deb.html                           14.10.2-1
    
    Debian Sid:Debian Main
    9) fotoxx_14.10.2-1_i386.deb.html                           14.10.2-1
    
    Select Package File Entry, or
    0)  ->  Main Menu, or
    Hit Enter for Default Package File:
    fotoxx-13.04-4.fc20.i686.rpm.html                       Ver. 13.04-4
    #? 7
    7) fotoxx_11.11.1-1.1_i386.deb.html                         11.11.1-1  ? [Y/n]
    -> 7) fotoxx_11.11.1-1.1_i386.deb.html 11.11.1-1
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
    2015-05-05 02:13:58 URL:http://pkgs.org/debian-wheezy/debian-main-i386/fotoxx_11.11.1-1.1_i386.deb/download/ [6959] -> "wrk/fotoxx_11.11.1-1.1_i386.deb_bin.html" [1]
    LIBS
    ====
    None
    ====
    ------------
    Dependencies
    ------------
    libatk1.0-0 (>= 1.12.4)
    libc6 (>= 2.3.6-6~)
    libcairo2 (>= 1.2.4)
    libfontconfig1 (>= 2.8.0)
    libfreetype6 (>= 2.2.1)
    libgcc1 (>= 1:4.1.1)
    libgdk-pixbuf2.0-0 (>= 2.22.0)
    libglib2.0-0 (>= 2.16.0)
    libgtk2.0-0 (>= 2.14.0)
    libpango1.0-0 (>= 1.18.0)
    libstdc++6 (>= 4.1.1)
    libtiff4 (>> 3.9.5-3~)
    ------------
    PROCESSING libatk1.0-0
    2015-05-05 02:13:58 URL:http://pkgs.org/download/libatk1.0-0 [6613] -> "wrk/libatk1.0-0_dis" [1]
    FINISHED --2015-05-05 02:13:58--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 6.5K in 0.006s (1.12 MB/s)
    {ATK accessibility toolkit}
    Process Package? [Y/n]
    -> Process Package
    0
            Packages on Offer:    6
    DEB Packages: 6
        Ubuntu                  3
        Debian                  3
    
    Main Menu
    1) Select by Type (deb)
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def) libatk1.0-0_2.4.0-0ubuntu1_i386.deb.html                 2.4.0-0        > 1.12.4-1        OK
    Press a Key
    #? 1
    
    0)  ->  Main Menu
          Type          Packages
    1) DEB                  6
    #? 1
    DEB
    
    0)  ->  Main Menu
    Package File                                                Ver   >= 1.12.4-1
    ============                                                ===
    Ubuntu
    Ubuntu 12.04 LTS:Ubuntu Main
    1) libatk1.0-0_2.4.0-0ubuntu1_i386.deb.html                 2.4.0-0        > 1.12.4-1        OK
    
    Ubuntu 14.04 LTS:Ubuntu Main
    2) libatk1.0-0_2.10.0-2ubuntu2_i386.deb.html                2.10.0-2       > 1.12.4-1        OK
    
    Ubuntu 14.10:Ubuntu Main
    3) libatk1.0-0_2.12.0-1ubuntu2_i386.deb.html                2.12.0-1       > 1.12.4-1        OK
    
    Debian
    Debian Wheezy:Debian Main
    4) libatk1.0-0_2.4.0-2_i386.deb.html                        2.4.0-2        > 1.12.4-1        OK
    
    Debian Jessie:Debian Main
    5) libatk1.0-0_2.14.0-1_i386.deb.html                       2.14.0-1       > 1.12.4-1        OK
    
    Debian Sid:Debian Main
    6) libatk1.0-0_2.14.0-1_i386.deb.html                       2.14.0-1       > 1.12.4-1        OK
    
    Select Package File Entry, or
    0)  ->  Main Menu, or
    Hit Enter for Default Package File:
    libatk1.0-0_2.4.0-0ubuntu1_i386.deb.html                Ver. 2.4.0-0        > 1.12.4-1        OK
    #? 4
    4) libatk1.0-0_2.4.0-2_i386.deb.html                        2.4.0-2        > 1.12.4-1        OK  ? [Y/n]
    -> 4) libatk1.0-0_2.4.0-2_i386.deb.html 2.4.0-2 > 1.12.4-1 OK
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libatk1.0-0
    2015-05-05 02:16:33 URL:http://pkgs.org/debian-wheezy/debian-main-i386/libatk1.0-0_2.4.0-2_i386.deb/download/ [6574] -> "wrk/libatk1.0-0_2.4.0-2_i386.deb_bin.html" [1]
    LIBS
    ====
    None
    ====
    ------------
    Dependencies
    ------------
    libatk1.0-data (= 2.4.0-2)
    libc6 (>= 2.2)
    libglib2.0-0 (>= 2.31.2)
    multiarch-support
    ------------
    PROCESSING libatk1.0-data
    2015-05-05 02:16:34 URL:http://pkgs.org/download/libatk1.0-data [5780] -> "wrk/libatk1.0-data_dis" [1]
    FINISHED --2015-05-05 02:16:34--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 5.6K in 0.01s (506 KB/s)
    {Common files for the ATK accessibility toolkit}
    Process Package? [Y/n]
    -> Process Package
    0
            Packages on Offer:    6
    DEB Packages: 6
        Ubuntu                  3
        Debian                  3
    
    Main Menu
    1) Select by Type (deb)
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def) libatk1.0-data_2.4.0-0ubuntu1_all.deb.html               2.4.0-0        < 2.4.0-2        NO
    Press a Key
    #? 2
    0)  ->  Main Menu
                            Packages
              DEB
        1) Ubuntu               3
        2) Debian               3
    Enter space separated numbers, if more than one selection required.
    #/s? 2
    SELECTED DISTROS
    
    0)  ->  Main Menu
    Package File                                                Ver   = 2.4.0-2
    ============                                                ===
    Debian
    Debian Wheezy:Debian Main
    1) libatk1.0-data_2.4.0-2_all.deb.html                      2.4.0-2        = 2.4.0-2        OK
    
    Debian Jessie:Debian Main
    2) libatk1.0-data_2.14.0-1_all.deb.html                     2.14.0-1       > 2.4.0-2        NO
    
    Debian Sid:Debian Main
    3) libatk1.0-data_2.14.0-1_all.deb.html                     2.14.0-1       > 2.4.0-2        NO
    
    Select Package File Entry, or
    0)  ->  Main Menu, or
    Hit Enter for Default Package File:
    libatk1.0-data_2.4.0-0ubuntu1_all.deb.html              Ver. 2.4.0-0        < 2.4.0-2        NO
    #? 1
    1) libatk1.0-data_2.4.0-2_all.deb.html                      2.4.0-2        = 2.4.0-2        OK  ? [Y/n]
    -> 1) libatk1.0-data_2.4.0-2_all.deb.html 2.4.0-2 = 2.4.0-2 OK
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libatk1.0-0
            2                       libatk1.0-data
    2015-05-05 02:18:54 URL:http://pkgs.org/debian-wheezy/debian-main-i386/libatk1.0-data_2.4.0-2_all.deb/download/ [6513] -> "wrk/libatk1.0-data_2.4.0-2_all.deb_bin.html" [1]
    No Dependencies Listed. Return to Previous Level.
      <-  pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libatk1.0-0
    ------------
    Dependencies
    ------------
    Last 3 of 4
    libc6 (>= 2.2)
    libglib2.0-0 (>= 2.31.2)
    multiarch-support
    ------------
    libc6 Elected as End. Pt.  ->  Next Requirement
    PROCESSING libglib2.0-0
    2015-05-05 02:18:54 URL:http://pkgs.org/download/libglib2.0-0 [8483] -> "wrk/libglib2.0-0_dis" [1]
    FINISHED --2015-05-05 02:18:54--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 8.3K in 0.009s (884 KB/s)
    {GLib library of C routines}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    multiarch-support Elected as End. Pt.  ->  Next Requirement
      <-  pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
    ------------
    Dependencies
    ------------
    Last 11 of 12
    libc6 (>= 2.3.6-6~)
    libcairo2 (>= 1.2.4)
    libfontconfig1 (>= 2.8.0)
    libfreetype6 (>= 2.2.1)
    libgcc1 (>= 1:4.1.1)
    libgdk-pixbuf2.0-0 (>= 2.22.0)
    libglib2.0-0 (>= 2.16.0)
    libgtk2.0-0 (>= 2.14.0)
    libpango1.0-0 (>= 1.18.0)
    libstdc++6 (>= 4.1.1)
    libtiff4 (>> 3.9.5-3~)
    ------------
    libc6 Elected as End. Pt.  ->  Next Requirement
    PROCESSING libcairo2
    2015-05-05 02:19:31 URL:http://pkgs.org/download/libcairo2 [14892] -> "wrk/libcairo2_dis" [1]
    FINISHED --2015-05-05 02:19:31--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 15K in 0.09s (155 KB/s)
    {Cairo 2D vector graphics library}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    PROCESSING libfontconfig1
    2015-05-05 02:20:06 URL:http://pkgs.org/download/libfontconfig1 [13049] -> "wrk/libfontconfig1_dis" [1]
    FINISHED --2015-05-05 02:20:06--
    Total wall clock time: 0.5s
    Downloaded: 1 files, 13K in 0.02s (572 KB/s)
    {generic font configuration library - runtime}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    PROCESSING libfreetype6
    2015-05-05 02:20:26 URL:http://pkgs.org/download/libfreetype6 [18516] -> "wrk/libfreetype6_dis" [1]
    FINISHED --2015-05-05 02:20:26--
    Total wall clock time: 0.4s
    Downloaded: 1 files, 18K in 0.09s (195 KB/s)
    {FreeType 2 font engine, shared library files}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    PROCESSING libgcc1
    2015-05-05 02:20:57 URL:http://pkgs.org/download/libgcc1 [14325] -> "wrk/libgcc1_dis" [1]
    FINISHED --2015-05-05 02:20:57--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 14K in 0.09s (159 KB/s)
    {GCC shared support library}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    PROCESSING libgdk-pixbuf2.0-0
    2015-05-05 02:21:08 URL:http://pkgs.org/download/libgdk-pixbuf2.0-0 [7163] -> "wrk/libgdk-pixbuf2.0-0_dis" [1]
    FINISHED --2015-05-05 02:21:08--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 7.0K in 0.02s (321 KB/s)
    {GDK Pixbuf library}
    Process Package? [Y/n]
    -> Process Package
    0
            Packages on Offer:    7
    DEB Packages: 7
        Ubuntu                  4
        Debian                  3
    
    Main Menu
    1) Select by Type (deb)
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def) libgdk-pixbuf2.0-0_2.26.1-1ubuntu1.1_i386.deb.html       2.26.1-1       > 2.22.0-2        OK
    Press a Key
    #? 
    Def) libgdk-pixbuf2.0-0_2.26.1-1ubuntu1.1_i386.deb.html       2.26.1-1       > 2.22.0-2        OK  ? [Y/n]
    -> Def) libgdk-pixbuf2.0-0_2.26.1-1ubuntu1.1_i386.deb.html 2.26.1-1 > 2.22.0-2 OK
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libgdk-pixbuf2.0-0
    2015-05-05 02:21:45 URL:http://pkgs.org/ubuntu-12.04/ubuntu-updates-main-i386/libgdk-pixbuf2.0-0_2.26.1-1ubuntu1.1_i386.deb/download/ [6916] -> "wrk/libgdk-pixbuf2.0-0_2.26.1-1ubuntu1.1_i386.deb_bin.html" [1]
    LIBS
    ====
    None
    ====
    ------------
    Dependencies
    ------------
    libc6 (>= 2.11)
    libgdk-pixbuf2.0-common (= 2.26.1-1ubuntu1.1)
    libglib2.0-0 (>= 2.31.18)
    libjasper1
    libjpeg8 (>= 8c)
    libpng12-0 (>= 1.2.13-4)
    libtiff4
    libx11-6
    multiarch-support
    ------------
    libc6 Elected as End. Pt.  ->  Next Requirement
    PROCESSING libgdk-pixbuf2.0-common
    2015-05-05 02:21:45 URL:http://pkgs.org/download/libgdk-pixbuf2.0-common [6102] -> "wrk/libgdk-pixbuf2.0-common_dis" [1]
    FINISHED --2015-05-05 02:21:45--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 6.0K in 0.008s (785 KB/s)
    {GDK Pixbuf library - data files}
    Process Package? [Y/n]
    -> Process Package
    0
            Packages on Offer:    7
    DEB Packages: 7
        Ubuntu                  4
        Debian                  3
    
    Main Menu
    1) Select by Type (deb)
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def) libgdk-pixbuf2.0-common_2.26.1-1ubuntu1.1_all.deb.html   2.26.1-1       = 2.26.1-1        OK
    Press a Key
    #? 
    Def) libgdk-pixbuf2.0-common_2.26.1-1ubuntu1.1_all.deb.html   2.26.1-1       = 2.26.1-1        OK  ? [Y/n]
    -> Def) libgdk-pixbuf2.0-common_2.26.1-1ubuntu1.1_all.deb.html 2.26.1-1 = 2.26.1-1 OK
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libgdk-pixbuf2.0-0
            2                       libgdk-pixbuf2.0-common
    2015-05-05 02:22:36 URL:http://pkgs.org/ubuntu-12.04/ubuntu-updates-main-i386/libgdk-pixbuf2.0-common_2.26.1-1ubuntu1.1_all.deb/download/ [6601] -> "wrk/libgdk-pixbuf2.0-common_2.26.1-1ubuntu1.1_all.deb_bin.html" [1]
    No Dependencies Listed. Return to Previous Level.
      <-  pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libgdk-pixbuf2.0-0
    ------------
    Dependencies
    ------------
    Last 7 of 9
    libglib2.0-0 (>= 2.31.18)
    libjasper1
    libjpeg8 (>= 8c)
    libpng12-0 (>= 1.2.13-4)
    libtiff4
    libx11-6
    multiarch-support
    ------------
    PROCESSING libglib2.0-0
    libglib2.0-0 libatk1.0-0:libglib2.0-0: Processed in libatk1.0-0:libglib2.0-0: Package.  ->  Next Requirement
    PROCESSING libjasper1
    2015-05-05 02:22:36 URL:http://pkgs.org/download/libjasper1 [16930] -> "wrk/libjasper1_dis" [1]
    FINISHED --2015-05-05 02:22:36--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 17K in 0.09s (186 KB/s)
    {JasPer JPEG-2000 runtime library}
    Process Package? [Y/n]
    -> Process Package
    0
            Packages on Offer:    32
    RPM Packages: 21
        OpenMandriva            4
        ROSA                    3
        Mageia                  5
        openSUSE                9
    DEB Packages: 11
        Ubuntu                  6
        Debian                  5
    
    Main Menu
    1) Select by Type (rpm,deb)
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def) libjasper1-1.900.1-20-omv2013.0.i586.rpm.html            1.900.1-20
    Press a Key
    #? 1
    
    0)  ->  Main Menu
          Type          Packages
    1) RPM                  21
    2) DEB                  11
    #? 2
    DEB
    
    0)  ->  Main Menu
    Package File                                                Ver    
    ============                                                ===
    Ubuntu
    Ubuntu 12.04 LTS:Ubuntu Updates Main
    1) libjasper1_1.900.1-13ubuntu0.2_i386.deb.html             1.900.1-13
    
    Ubuntu 12.04 LTS:Ubuntu Main
    2) libjasper1_1.900.1-13_i386.deb.html                      1.900.1-13
    
    Ubuntu 14.04 LTS:Ubuntu Updates Main
    3) libjasper1_1.900.1-14ubuntu3.2_i386.deb.html             1.900.1-14
    
    Ubuntu 14.04 LTS:Ubuntu Main
    4) libjasper1_1.900.1-14ubuntu3_i386.deb.html               1.900.1-14
    
    Ubuntu 14.10:Ubuntu Updates Main
    5) libjasper1_1.900.1-debian1-2ubuntu0.2_i386.deb.html      1.900.1-
    
    Ubuntu 14.10:Ubuntu Main
    6) libjasper1_1.900.1-debian1-2_i386.deb.html               1.900.1-
    
    There still remain 5 packages to list.
    Suspend Listing? [Y/n]
    
    Debian
    Debian Wheezy:Debian Security Updates Main
    7) libjasper1_1.900.1-13+deb7u3_i386.deb.html               1.900.1-13
    
    Debian Wheezy:Debian Proposed Updates Main
    8) libjasper1_1.900.1-13+deb7u3_i386.deb.html               1.900.1-13
    
    Debian Wheezy:Debian Main
    9) libjasper1_1.900.1-13+deb7u2_i386.deb.html               1.900.1-13
    
    Debian Jessie:Debian Main
    10) libjasper1_1.900.1-debian1-2.4_i386.deb.html            1.900.1-
    
    Debian Sid:Debian Main
    11) libjasper1_1.900.1-debian1-2.4_i386.deb.html            1.900.1-
    
    Select Package File Entry, or
    0)  ->  Main Menu, or
    Hit Enter for Default Package File:
    libjasper1-1.900.1-20-omv2013.0.i586.rpm.html           Ver. 1.900.1-20
    #? 7
    7) libjasper1_1.900.1-13+deb7u3_i386.deb.html               1.900.1-13  ? [Y/n]
    -> 7) libjasper1_1.900.1-13+deb7u3_i386.deb.html 1.900.1-13
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libgdk-pixbuf2.0-0
            2                       libjasper1
    2015-05-05 02:24:21 URL:http://pkgs.org/debian-wheezy/debian-security-updates-main-i386/libjasper1_1.900.1-13+deb7u3_i386.deb/download/ [7059] -> "wrk/libjasper1_1.900.1-13+deb7u3_i386.deb_bin.html" [1]
    LIBS
    ====
    None
    ====
    ------------
    Dependencies
    ------------
    libc6 (>= 2.7)
    libjpeg8 (>= 8c)
    multiarch-support
    ------------
    libc6 Elected as End. Pt.  ->  Next Requirement
    PROCESSING libjpeg8
    2015-05-05 02:24:22 URL:http://pkgs.org/download/libjpeg8 [13473] -> "wrk/libjpeg8_dis" [1]
    FINISHED --2015-05-05 02:24:22--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 13K in 0.02s (760 KB/s)
    {Independent JPEG Group's JPEG runtime library}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    multiarch-support Elected as End. Pt.  ->  Next Requirement
      <-  pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libgdk-pixbuf2.0-0
    ------------
    Dependencies
    ------------
    Last 5 of 9
    libjpeg8 (>= 8c)
    libpng12-0 (>= 1.2.13-4)
    libtiff4
    libx11-6
    multiarch-support
    ------------
    PROCESSING libjpeg8
    libjpeg8 libjasper1:libjpeg8: Processed in libjasper1:libjpeg8: Package.  ->  Next Requirement
    PROCESSING libpng12-0
    2015-05-05 02:24:39 URL:http://pkgs.org/download/libpng12-0 [9095] -> "wrk/libpng12-0_dis" [1]
    FINISHED --2015-05-05 02:24:39--
    Total wall clock time: 0.2s
    Downloaded: 1 files, 8.9K in 0.008s (1.09 MB/s)
    {Compatible layer for install official Skype package for OpenSUSE}
    Process Package? [Y/n]
    -> Process Package
    0
            Packages on Offer:    11
    RPM Packages: 5
        ALT                     1
        openSUSE                4
    DEB Packages: 6
        Ubuntu                  3
        Debian                  3
    
    openSUSE
    
    openSUSE 13.1:openSUSE Update
    
    Main Menu
    1) Select by Type (rpm,deb)
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def) libpng12-0-1.2.50-6.4.1.i586.rpm.html                    1.2.50-6       > 1.2.13-4        OK
    Press a Key
    #? 3
    ALL DISTROS
    
    0)  ->  Main Menu
    Package File                                                Ver   >= 1.2.13-4
    ============                                                ===
    ALT
    --- No Selectable Package Identified ---
    
    openSUSE
    openSUSE 13.1:openSUSE Update
    1) libpng12-0-1.2.50-6.4.1.i586.rpm.html                    1.2.50-6       > 1.2.13-4        OK
    
    openSUSE 13.1:openSUSE Oss
    2) libpng12-0-1.2.50-6.1.2.i586.rpm.html                    1.2.50-6       > 1.2.13-4        OK
    
    openSUSE 13.2:openSUSE Oss
    3) libpng12-0-1.2.51-3.1.2.i586.rpm.html                    1.2.51-3       > 1.2.13-4        OK
    
    openSUSE Factory:openSUSE Oss
    4) libpng12-0-1.2.53-1.1.i586.rpm.html                      1.2.53-1       > 1.2.13-4        OK
    
    Ubuntu
    Ubuntu 12.04 LTS:Ubuntu Main
    5) libpng12-0_1.2.46-3ubuntu4_i386.deb.html                 1.2.46-3       > 1.2.13-4        OK
    
    Ubuntu 14.04 LTS:Ubuntu Main
    6) libpng12-0_1.2.50-1ubuntu2_i386.deb.html                 1.2.50-1       > 1.2.13-4        OK
    
    Ubuntu 14.10:Ubuntu Main
    7) libpng12-0_1.2.51-0ubuntu3_i386.deb.html                 1.2.51-0       > 1.2.13-4        OK
    
    There still remain 3 packages to list.
    Suspend Listing? [Y/n]
    
    Debian
    Debian Wheezy:Debian Main
    8) libpng12-0_1.2.49-1_i386.deb.html                        1.2.49-1       > 1.2.13-4        OK
    
    Debian Jessie:Debian Main
    9) libpng12-0_1.2.50-2+b2_i386.deb.html                     1.2.50-2       > 1.2.13-4        OK
    
    Debian Sid:Debian Main
    10) libpng12-0_1.2.50-2+b2_i386.deb.html                    1.2.50-2       > 1.2.13-4        OK
    
    Select Package File Entry, or
    0)  ->  Main Menu, or
    Hit Enter for Default Package File:
    libpng12-0-1.2.50-6.4.1.i586.rpm.html                   Ver. 1.2.50-6       > 1.2.13-4        OK
    #? 8
    8) libpng12-0_1.2.49-1_i386.deb.html                        1.2.49-1       > 1.2.13-4        OK  ? [Y/n]
    -> 8) libpng12-0_1.2.49-1_i386.deb.html 1.2.49-1 > 1.2.13-4 OK
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libgdk-pixbuf2.0-0
            2                       libpng12-0
    2015-05-05 02:26:11 URL:http://pkgs.org/debian-wheezy/debian-main-i386/libpng12-0_1.2.49-1_i386.deb/download/ [6446] -> "wrk/libpng12-0_1.2.49-1_i386.deb_bin.html" [1]
    LIBS
    ====
    None
    ====
    ------------
    Dependencies
    ------------
    libc6 (>= 2.11)
    multiarch-support
    zlib1g (>= 1:1.1.4)
    ------------
    libc6 Elected as End. Pt.  ->  Next Requirement
    multiarch-support Elected as End. Pt.  ->  Next Requirement
    PROCESSING zlib1g
    2015-05-05 02:26:11 URL:http://pkgs.org/download/zlib1g [6656] -> "wrk/zlib1g_dis" [1]
    FINISHED --2015-05-05 02:26:11--
    Total wall clock time: 0.2s
    Downloaded: 1 files, 6.5K in 0.004s (1.56 MB/s)
    {compression library - runtime}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
      <-  pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
            1                       libgdk-pixbuf2.0-0
    ------------
    Dependencies
    ------------
    Last 3 of 9
    libtiff4
    libx11-6
    multiarch-support
    ------------
    PROCESSING libtiff4
    2015-05-05 02:26:37 URL:http://pkgs.org/download/libtiff4 [5982] -> "wrk/libtiff4_dis" [1]
    FINISHED --2015-05-05 02:26:37--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 5.8K in 0.007s (795 KB/s)
    {Library of functions for manipulating TIFF format image files}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    PROCESSING libx11-6
    2015-05-05 02:26:47 URL:http://pkgs.org/download/libx11-6 [7901] -> "wrk/libx11-6_dis" [1]
    FINISHED --2015-05-05 02:26:47--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 7.7K in 0.008s (958 KB/s)
    {X11 client-side library}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    multiarch-support Elected as End. Pt.  ->  Next Requirement
      <-  pakdep()
    Recursion Level                 Package
    ===============                 =======
            0                       fotoxx
    ------------
    Dependencies
    ------------
    Last 5 of 12
    libglib2.0-0 (>= 2.16.0)
    libgtk2.0-0 (>= 2.14.0)
    libpango1.0-0 (>= 1.18.0)
    libstdc++6 (>= 4.1.1)
    libtiff4 (>> 3.9.5-3~)
    ------------
    PROCESSING libglib2.0-0
    libglib2.0-0 libatk1.0-0:libglib2.0-0: Processed in libatk1.0-0:libglib2.0-0: Package.  ->  Next Requirement
    PROCESSING libgtk2.0-0
    2015-05-05 02:27:00 URL:http://pkgs.org/download/libgtk2.0-0 [7785] -> "wrk/libgtk2.0-0_dis" [1]
    FINISHED --2015-05-05 02:27:00--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 7.6K in 0.006s (1.26 MB/s)
    {GTK+ graphical user interface library}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    PROCESSING libpango1.0-0
    2015-05-05 02:27:16 URL:http://pkgs.org/download/libpango1.0-0 [7943] -> "wrk/libpango1.0-0_dis" [1]
    FINISHED --2015-05-05 02:27:16--
    Total wall clock time: 0.2s
    Downloaded: 1 files, 7.8K in 0.004s (1.71 MB/s)
    {Layout and rendering of internationalized text}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    PROCESSING libstdc++6
    2015-05-05 02:27:25 URL:http://pkgs.org/download/libstdc++6 [16318] -> "wrk/libstdc++6_dis" [1]
    FINISHED --2015-05-05 02:27:25--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 16K in 0.09s (187 KB/s)
    {GNU Standard C++ library}
    Process Package? [Y/n]
    Skip Package? [Y/n]
    ->  Skip Package
    PROCESSING libtiff4
    libtiff4 libgdk-pixbuf2.0-0:libtiff4: Processed in libgdk-pixbuf2.0-0:libtiff4: Package.  ->  Next Requirement
    Congrats on Surfacing!
    pkg             19
    lib             0
    fotoxx.pak written out.
    Run Completed.
    Tue May  5 02:27:40 BST 2015
    guest@porteus:~/pk01$ cp fotoxx.pak fotoxx_0505_02:27.pak
    guest@porteus:~/pk01$ 
    
    This route did not get to a Perl module.
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    Bogomips
    Full of knowledge
    Full of knowledge
    Posts: 2563
    Joined: 25 Jun 2014, 15:21
    Distribution: 3.2.2 Cinnamon & KDE5
    Location: London

    Re: Resolving Non-Slackware Dependencies

    Post#15 by Bogomips » 30 May 2015, 20:18

    francois wrote:Error message for photoprint package:

    Code: Select all

    root@porteus:~/pak# pakorg http://pkgs.org/download/photoprint
    Fri May 29 21:37:11 EDT 2015
    0
    cat: photoprint_ar.rep: No such file or directory
            Packages on Offer:    0
    
    Main Menu
    1) Select by Type ()
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Def)
    Press a Key
    #? 
    Def)  ? [Y/n]
    -> Def)
    pakdep()
    Recursion Level                 Package
    ===============                 =======
            0
    awk: warning: command line argument `wrk/' is a directory: skipped
    bash: pkg[$1]: bad array subscript
    root@porteus:~/pak# 
    francois, as we are stuill at an experimental stage, I have left things open. So, even though it's in the directions, do remember to reset before every new package run. Reset:
    • Close terminal tab Ctl+d, if in a tab. Open new tab.
    • Code: Select all

      cd pak  # If needed
      source pakfuncs.sh
      
    This is what I get:

    Code: Select all

    guest@porteus:~/pk01$ pakorg photoprint
    Sat May 30 19:13:58 BST 2015
    Not running as 'root'. Use 'sudo'? [Y/n]
    2015-05-30 19:14:01 URL:http://pkgs.org/download/photoprint [15515] -> "wrk/photoprint_dis" [1]
    0
    Found Slackware Package Versions
    ^^^ No Recognised Repos Found ^^^
    
            Packages on Offer:    19
    RPM Packages: 12
        Fedora                  4
        OpenMandriva            3
        ROSA                    3
        ALT                     1
        CentOS                  1
    DEB Packages: 7
        Ubuntu                  4
        Debian                  3
    
    Main Menu
    1) Select by Type (rpm,deb)
    2) Select by Distro
    3) Select by Package
    Hit Enter for Default Package File:
    Dft) photoprint-0.4.2-0.12.pre2.fc20.i686.rpm.html          0.4.2-0 
    Press a Key
    #? 
    ## New Run following Reset ##
    guest@porteus:~/pk01$ pakorg http://pkgs.org/download/photoprint
    Sat May 30 20:59:18 BST 2015
    Not running as 'root'. Use 'sudo'? [Y/n]
    2015-05-30 20:59:20 URL:http://pkgs.org/download/photoprint [15515] -> "wrk/photoprint_dis" [1]
    0
    Found Slackware Package Versions
    ^^^ No Recognised Repos Found ^^^
    
            Packages on Offer:    19
    etc.
    
    francois wrote:(in pkgs.org, a slackware version 14.1 is available)
    This is freestylers, which USM does not do. :pardon:

    If resetting does not do the trick, try the update which I'll be posting later and see if it behaves better.

    Edit Sun May 31 18:35:47 UTC 2015
    francois wrote:Run procedure:
    Accepting the default option works. However, e.g. pakorg http://pkgs.org/archlinux/archlinux-cor ... ar.xz.html, this link does not seem to work no more.
    Problem of stale links. :pardon: Been updated to be gotten always fresh.
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    Post Reply