pktools replacement (was: Package managers)

Old stuff that should not bother anyone anymore
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Package managers

Post by thenktor »

Benchmark of reinstalling kompozer:

upgradepkg:

Code: Select all

real    0m19.834s
user    0m6.847s
sys     0m2.198s
spkg:

Code: Select all

real    0m10.569s
user    0m1.937s
sys     0m0.618s
Seems to be good :)

PS: Used "echo 2 > /proc/sys/vm/drop_caches" to flush disk caches before installation.

EDIT: Package available at http://thenktor.dyndns.org/packages/ (spkg+judy)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Package managers

Post by gapan »

thenktor wrote:Why? :) I think it's easier to maintain if there is only one info file. Less files lying around. You have to copy less files, etc.:

Code: Select all

MD5="14c1a7c164533aafbe624cd55a58dea4  xyz-1.0.5-i486-62.1.txz"
DEPENDENCIES="gcc,some,other,stuff"
CONFLICTS="mplayer"
SUGGESTS="ffmpeg"
If packaging is done by a build system this file will be automatically created anyway.
You add a layer of complexity that is not needed. It makes it a lot more difficult to parse that file and use info from it, you can't just do a md5sum -c file.md5 to check the md5sum and the system becomes more vulnerable to mistakes like misspelling DEPENDENCIES, or not using the right kind of quotes, remember that you will probably need to edit that by hand at times. CONFLICTS and SUGGESTS are only going to be used for a very small number of packages anyway.
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Package managers

Post by JRD »

This is exactly what I have in mind Gapan. Maybe thenktor will better understand the "problem" of this format towards multiple simple files.

@thenktor : waou, seems good to use spkg. But I see that it needs some libs in requirement. Is it possible to link them statically ? (I don't like package manager to rely on libs other than libc).
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Package managers

Post by thenktor »

OK, forget about the one info file. Just was an idea ;)

Here is another spkg benchmark, tested with qt4-base+qt4-devel:
upgradepkg:

Code: Select all

real    1m40.017s
user    1m17.675s
sys     0m9.755s
spkg:

Code: Select all

real    0m25.908s
user    0m12.738s
sys     0m2.011s
jrd: I think pkgtools should be provided, too. We need makepkg anyway. The other scripts can be renamed to installpkg-fallback or something like that. But it should be possible to build a static version.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Package managers

Post by gapan »

Does spkg work with txz/tlz packages?
Image
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Package managers

Post by thenktor »

gapan wrote:Does spkg work with txz/tlz packages?
Yes ;) it has worked with tlz before and the dev has sent me a patch to support txz yesterday.

But there is something to consider. In his first mail he wrote:
I don't know what txz is or stands for. :-) Anyway, spkg is now
basically living on the patches and support of its users, because I'm no
longer a Slackware Linux user.
The slapkg tool gave me error messages right from the start and I think python is to much dependency anyway. Didn't find any other tools, yet.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Package managers

Post by thenktor »

Finally I've managed to build a spkg package without dependencies:
http://thenktor.dyndns.org/packages/spkg/

I vote for using this one as pkgtool replacement.
The developer doesn't use Slackware anymore, but he is very responsive and helpful!

I think we should create wrapper scripts (installpkg, upgradepkg, removepkg) for it and rename the original tools to (slackware-installpkg, slackware-upgradepkg, slackware-removepkg). We need the original pkgtools anyway because of makepkg.

Simple wrappers:
installpkg:

Code: Select all

#!/bin/sh
/sbin/spkg -i "$@"
upgradepkg:

Code: Select all

#!/bin/sh
/sbin/spkg -u "$@"
removepkg:

Code: Select all

#!/bin/sh
/sbin/spkg -d "$@"
Working options:
--root, --reinstall, --dry-run, --install-new, --verbose
Not working options:
installpkg: --warn, --md5sum, --ask, --menu, --infobox, --priority, --tagfile
removepkg: --warn, --preserve, --copy, --keep

I've never used the not working options, no idea if they are needed :?
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Package managers

Post by JRD »

OK but
We need the original pkgtools anyway because of makepkg.
I don't understand why, could you explain ?

Else I vote for spkg too :)
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Package managers

Post by thenktor »

JRD wrote:OK but
We need the original pkgtools anyway because of makepkg.
I don't understand why, could you explain ?

Else I vote for spkg too :)
We need makepkg for creating packages and it's part of pkgtools. Sure we could create a makepkg package without the rest of the pkgtools, but that would save only a few kb and perhaps it's not a bad idea to have the original tools installed, too ;)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Package managers

Post by JRD »

OK I understand.
Image
Locked