Hi llev,
This is a huge piece of great work!
Thank you! It is all just for fun :) I just like to develop and to solve our development problems… I'm 39 and I think I need to train my brain on a daily basis :)
The --root option is a great idea
This is an old idea. And it was not properly integrated into existing TazPkg code. Some commands was supported this option, other — don't. Now all commands are supported --root
option.
is it possible to install tazpkg-test itself into a test dir?
Oh, I not asked yet myself is it possible.
Currently, "tazpkg-test" package overwrites all the files of regular "tazpkg" files.
Tester can return back to using "tazpkg" using next commands:
# tazpkg get-install tazpkg --forced
# tazpkg remove tazpkg-test
Current Makefile defines few variables with the default values, and you can tweak these variables:
Maybe do I just need to change the "sourcing" commands like . /lib/libtaz.sh
to . /mytestdir/lib/libtaz.sh
?
Completely no; libtaz.sh
is not a part of TazPkg, it is wide-used system library. Leave it itself.
I would unpack tazpkg-test by hand into /mytestdir.
So, now you have... ? —
/mytestdir/usr/bin/tazpkg
/mytestdir/usr/libexec/tazpkg/block
, etc.
You need to find hardcoded paths in the TazPkg "compiled" files pointed to "/usr/libexec/tazpkg" and to point them to the new place ("/mytestdir/usr/libexec/tazpkg" in your case). You can use command line to do it:
find /mytestdir -type f -exec sed -i "s|/usr/libexec/tazpkg|/mytestdir&|g" \{\} \;
in your example file4 and file5 should be under lib3/, no?
Yes. You can find them both in the "/lib/lib2/" and "/usr/lib3/".
But I'm wondering: if we remove the previous package that created the link /lib/lib2 -> /usr/lib3, do we remove the link? Because then the software that looks for file12 in /lib/lib2 would fail.
I'll screw my brain with these symlinks too soon :D
There are exists "regular" files and "regular" folders. TazPkg stores information about installed files only. And it will remove only installed files while you remove the package. In addition it will remove all empty folders (where files was) up to first non-empty folder. It will not remove "/usr/lib3/" if it still contains files. But…
There are exists "weird" symlinks! Symlink is a file. But it can point both to file or folder. And there is no easy answer to question "is TazPkg stores symlinks to folders in the files.list?": I need to see it. And I can't answer to your question: I need to make few tests. I'll prepare test packages and will install them and will remove. Better if I can find real packages with the described case.
The "compiled" scripts are unindented (probably a side effect of comments removal?), which makes them very hard to read... Can this be changed? Well, I guess users don't read the script, and devs use the source.
There are removed all comments and indentations from scripts. Yes, it is hard to read, but you not need to read this (something similar you'll find in our init script :D ). Scripts worked well without comments and indentations, as well as with, but it saves us few kilobytes. Idea is: if you need to develop TazPkg please use sources. There you'll find extended comments and all developer needs.
Can you tell me how to download the source tree?
Source code repository for TazPkg is http://hg.slitaz.org/tazpkg/ (please follow link)
Look at the top — here you'll see:
Project: tazpkg
Clone project: hg clone http://hg.slitaz.org/tazpkg
Download tarball: bz2 gz
If you need to download sources one or few times only — you can download the tarball in tar.bz2 or tar.gz format (and then reload it when it changed).
If you need to download sources on a regular basis —
- Install Mercurial:
# tazpkg -gi mercurial
- Go to your folder for source codes using terminal.
- Execute command (as regular user) to initial clone the repository:
hg clone http://hg.slitaz.org/tazpkg
- You'll find new folder "tazpkg" in your folder for source codes. This folder will contain current TazPkg sources.
- Next, when you need to update sources from repository, issue a command (as regular user) within this "tazpkg" folder:
hg pull -u
Thanks!
Thank you for your interest!