woof

the Puppy Package Manager


Page partially updated 12 October. 2009

For an overview of package management concepts in Puppy, please read this page:

Introduction to package management

Background

In November 2008 I decided to take a back-seat from my front-line role as leader of the Puppy Linux project, and let other keen members of our Puppy-community take control of developing future versions of Puppy.

After releasing Puppy 4.1.2 I took "time out" to follow some other interests.  What I wanted was the time and freedom to explore new ideas ...the first of these was named Woof:

Woof: the "Puppy Builder"

Development of Woof is ongoing, but I have also been working on another project, the Puppy Package Manager, that runs in a Puppy built by Woof.

In a nutshell, I wanted to extend the Package Manager to transparently handle packages from almost any other distribution, not just PET packages, and also to handle dependencies nicely. That essentially is what the new Puppy Package Manager does.

I took a "front seat" again for the development and release of Puppy 4.3, the first official Puppy with the Puppy Package Manager (and also built with Woof).

Usage

Previously, you could click on a PET package that has been downloaded, or even on a web page, and Puppy would offer to install it. Well, this is now extended to Debian/Ubuntu .deb, Slackware .tgz and Arch .pkg.tar.gz packages -- click on any one of those and you will receive an offer to install it. It will install just like any PET package, with a menu entry created if appropriate, and can also be uninstalled.

However, it is in the GUI windows of the Puppy Package Manager (run from the "install" icon on the desktop or from the "Puppy Package Manager" entry in the "Setup" menu) that you see major improvements. Here is the first window:

main gui

...notice one of the main differences from the old package manager: the extra "repos"!

Woof builds Puppy from a "compatible distro", which currently can be Slackware, Debian, Ubuntu, Arch or T2. Whatever is chosen, the repositories of that "compatible distro" are then able to be offered in the Puppy Package Manager. In the above example, Puppy was built from Slackware packages.

If you click on an entry, let's say the "lyx-1.6.1" package, this is what comes up next:

preinstall

So, following the lead and clicking on the "Examine dependencies" button:

deps

...is that cool, or is that cool?!

Notice the "View hierarchy" button. This brings up a tree-like view that shows the relationships between dependencies. That is, what is a dependency of what.

The goodies don't end there. When you choose to download from a particular repository, you are offered a choice (if there is one) of sites that mirror that repo. For example, when I wanted to download the "xpdf-3.02" package, which is a Puppy-4 PET package, this window came up:

repos

After installing a package (or group of packages), there is a window that tells you what packages have been successfully installed (failures are also notified). In this example, I installed Zenity along with some dependencies:

installed

...notice that 'Trim the fat' button. This is purely optional but worth a go if the newly installed packages are very big and you want to save some space. So, if 'Trim the fat' is clicked this is the next window:

trimfat

The final step after installing a package, the Package Manager does a final integrity-check. In the following case I had installed the "scite-1.77" package and the post-install window came up with this reassuring information:

postinstall

Jumping back to the main GUI window, notice that it has a "Configure package manager" button, which brings up this:

configure

Last but not least, notice also on the main GUI window, a "Find" box. This is a quick-find feature if you aren't sure where a package is located, or don't quite remember its name. The Find box will accept incomplete names and wildcards.

Technical

For those who want to know how the new package management system works, read on...

However, I need to write separate pages that explain the "Puppy package database" in detail, and this page is just a brief overview. A start is a page introducing the New standardised package database format.

The underlying action takes place in /root/.packages directory. Here is what mine looks like right now:

dotpackages

Those who have experience with the previous package management system will recognise the ".files" files. These are much as before, except they now also list directories, not just installed files.

The file "DISTRO_PKGS_SPECS" has information about the compatible-distro that was used to build Puppy, especially the repositories and the package selection. "DISTRO_PET_REPOS" has information about the PET repositories.

The files starting with "Packages-" are all package databases for a repository. The most important point about these files is that the database is a standard format, regardless of what compatible-distro Puppy was built from. So, Debian, Ubuntu, Slackware or Arch packages can all be treated in exactly the same way, with no special-case coding required. Ditto for the PET packages.

There are two left, "user-installed-packages" and "woof-installed-packages". These mean exactly what they say. If a package is installed, a database entry is added to user-installed-packages, if a package is uninstalled the entry is removed. The other, woof-installed-packages, are the database entries of all packages built-in to Puppy, that is, chosen when Woof was used to build Puppy.

So, what is the new standardised database format? What I aimed for is very small size, simplicity and easy handling. Each package entry is only one line, with fields delimited by the vertical-bar character. Here is the current content of my "user-installed-packages" file:
medit-0.9.4|medit|0.9.4|2as|Document|3500K|office/medit/0.9.4|medit-0.9.4-i486-2as.tgz|+atk,+cairo,+coreutils,+expat,+fontconfig,+freetype,+gamin,+glib2,+glibcsolibs,+gtk+2,+libICE,+libSM,+libX11,+libXau,+libXcomposite,+libXcursor,+libXdamage,+libXdmcp,+libXext,+libXfixes,+libXi,+libXinerama,+libXrandr,+libXrender,+libpng,+libxcb,+libxml2,+pango,+pixman,+python,+zlib|Multiplatform GTK text editor|
zedit-0.2.2|zedit|0.2.2||Document|120K|pet_packages-4|zedit-0.2.2.pet|+gtk+|simple text editor|
bluefish-1.0.7|bluefish|1.0.7|3sl|Document|6270K|development/bluefish/1.0.7|bluefish-1.0.7-i486-3sl.tgz|+aspell,+atk,+cairo,+cxxlibs,+expat,+findutils,+fontconfig,+freetype,+gcc,+glib2,+glibcsolibs,+grep,+gtk+2,+libX11,+libXau,+libXcomposite,+libXcursor,+libXdamage,+libXdmcp,+libXext,+libXfixes,+libXi,+libXinerama,+libXrandr,+libXrender,+libpng,+libxcb,+pango,+pcre,+pixman,+zlib|Bluefish supports many programming and markup languages|
The Woof build scripts automatically convert the compatible-distro's package databases into this standardised format.

Note that the standardised database format is also a work-in-progress and some details in the fields may change.

If you want more details now, it is in the Woof tarball. There is a README, also the scripts are fairly well commented.

Easy GUI tool to create db entry

If you had to create a package database entry manually, there is the possibility of error, getting a field in the wrong place or incorrect number of '|' delimiters.

There is a simple GUI tool that makes it easy:
petspec

The utility is named 'petspec', that you can run from the commandline, there is also an entry in the 'Utilities' menu.



(c) copyright 2009 Barry Kauler http://puppylinux.com/
No part of this page is to be reproduced anywhere else. I have found that there is a problem where parts of my web pages are being inserted at other sites, then not updated, whereas I am updating my pages regularly. This is not a desirable situation, so please just link to my pages.