It's all GPL, do whatever you want with it. Curious people will surely find it fun to explore the code
Basically, this thing is a simple package manager that is kinda similar to Puppy's and APT. It consists of two levels:
- pkg-thingy (the equivalent to dpkg and rpm) - a low-level package installer and remover that has other small functions. It does everything in a very straight-forward way and without any attention to details.
- thingy-get (the equivalent to aptitude and yum) - a higher-level package tool that knows how to work with repos and fetch packages. It utilizes pkg-thingy for the actual installation and removal of packages. It still doesn't handle dependencies, but I'll try to add that.
If you want to try it out, don't forget to:
1) Take a look at the example repo in http://brainwavedesigncentral.net/dima/thingy
2) Make a repo compatible with your Puppy. Use "pkg-thingy --help" to see your Puppy's details.
3) Edit /etc/thingyrc. If you want to try the example repo's packages, just put "arch=klp4" in /etc/thingyrc to force it. Go for the Skype package.
How does it work?
Package Format
The Thingy packages are .tar.gz packages (just like PETs), with a .tng extension. They contain all the package files, and the optional pinstall.sh and puninstall.sh (I kept the names for easy package conversion).
Packages are named <generic name>-<version>-<Puppy prefix><Puppy major version number>.tng.
For instance, Pmusic 1.0.1 for Puppy 4.x is pmusic-1.0.1-pup4.tng, while an Opera 10.60 package for Lupu is opera-10.60-lupu5.tng. Simple, isn't it?
The Repository Format
The repository contains files named thingy-packages-<Puppy prefix><Puppy major version number>; each of these files lists the packages in a directory named packages-<Puppy prefix><Puppy major version number>, along with their size, description, category and dependencies.
For instance, the thingy-packages-lupu5 file lists all the packages in the directory packages-lupu5.
The package lists contain many lines of this format:
Code: Select all
full package name|menu category|description|size in K|dependency1 dependency2 [...]
Code: Select all
opera-10.60-pup4|Internet|A fast web browser|11M|gtk
So ... How does it work?
pkg-thingy is very simple. It uses a very simple algorithm to install packages:
Code: Select all
Check whether the package is already installed
Create a temporary directory
Extract the package there
Make a list of files and directories it adds to the system and save it under Thingy's settings directory
Copy everything to the main file system
Run the post-install script if it exists
Refresh the menus if needed
Code: Select all
Check whether the package is already installed
For each file or directory in the files list, delete it
Remove the file list
Run the post-uninstall script if it exists
Refresh the menus if needed
______
As I said, it's not intended to be some real package manager, although I may find some use for it in a puplet or something.
And hey, guess what? Use at your own risk.