PET package search order
May 09, 2009 —
BarryK
I am working on some refinements to the Woof scripts, which is why I held off releasing alpha6.
One refinement is how the scripts locate a PET package. The list of packages that will be used to build a puppy are specified in variable PKGS_SPECS_TABLE which is in file DISTRO_PKGS_SPECS-ubuntu (or -debian, etc.). Each entry in this table can specify whether the package is to be looked for in the Ubuntu repos or the PET repos.
Take as an example, SeaMonkey, and say that the table specifies to use a PET package. The scripts now have a rigorous search algorithm. They search PET repositories in a certain order, and search within each repository to choose the most appropriate package from one or more 'seamonkey' packages.
Field search
My 'pet_packages-woof' directory on ibiblio.org is where I keep all the packages that I am creating for the Woof-puppy builds. All of them, whether for Debian, Ubuntu, Arch, T2 or Slackware. That is no problem however, as the 2nd and 3rd last fields of each database entry specify what environment the package was compiled in and thus intended for. For example, there are currently two SeaMonkey packages in 'pet_packages-woof':
seamonkey-1.1.14-no_mailnews|seamonkey|1.1.14-no_mailnews||Internet|27896K|pet_packages-woof|seamonkey-1.1.14-no_mailnews.pet|+nspr,+nss|browser suite|ubuntu|intrepid|woof|
seamonkey-1.1.14-no_mailnews-pup412|seamonkey|1.1.14-no_mailnews-pup412||Internet||pet_packages-woof|seamonkey-1.1.14-no_mailnews-pup412.pet||browser suite|puppy|412|woof|
You can see that if I build Jaunty-puppy then there is no exact match. I compiled SeaMonkey in the earlier Intrepid version of Ubuntu-puppy, and there is another one that I compiled in Puppy 4.1.2. What if someone wants to do a Karmic-puppy build (Karmic Koala will be the next version of Ubuntu)? There needs to be an algorithm to automatically find the most appropriate package.
The file DISTRO_PKGS_SPECS-ubuntu has a variable:
FALLBACKS_COMPAT_VERSIONS='karmic jaunty intrepid'
...which is obviously going to have different content for the other compat-distro builds.
This variable defines a search order, starting from whatever is the current version being built. In my case it's 'jaunty', so my search order is 'jaunty' then 'intrepid'.
Here is the complete search order, looking at the 2nd and 3rd last fields:
|ubuntu|jaunty|
|ubuntu|intrepid|
|ubuntu||
|puppy|
|||
Repo search
There is also a PET repo search order, which is defined by variable PACKAGELISTS_PET_ORDER in file DISTRO_PET_REPOS. This is what I currently have it set to:
PACKAGELISTS_PET_ORDER="Packages-puppy-woof-official Packages-puppy-4-official"
That is, the scripts will search in the 'Packages-puppy-woof-official' database first, which physically is my PET packages in the 'pet_packages-woof' directory on ibiblio.org.
When we have packages at 'pet_packages-5' in ibiblio.org, then we will have the database file Packages-puppy-5-official' and that can be added to the search list. Or any other repo.
The scripts that do this searching for PET packages are 1download, 2createpackages, /usr/local/petget/findwoofinstalledpkgs.sh.
The scripts do have a fallback mechanism if the package canot be found. For example, they finally resort to looking for any package named 'seamonkey' regardless of where it was compiled -- that is the last resort.
Tags: woof