Hi,
Just a little report of the do_unpack for emerge.c (the busybox applet)
I have got the logic working, but I need to clean it up a bit. I'm doing
a separate applet, epkg. Currently it just installs a binary, but it can
do it from stdin. This has a function tbz2_install that can be called
from emerge.c.
int tbz2_install(FILE *instream, const char *root_dir,
const char *vdb_path, const char *install_mask);
So the do upack would look like:
infile = fopen(tbz2file);
tbz2install(infile, config.root_dir, "var/db/pkg", config.install_mask);
close(infile);
you get the idea...
I also need to modify the tar -j ... stuff in epkg to use the
"unarchive.h" stuff instead of popen("tar -j ...").
I'll send a patch as soon I have cleaned it up a bit.
I have a couple of questions though:
* what do you think of having a separate applet and let emerge.c run on
top of this applet? This is not necessary, but I think its more
according to the unix philosopy. many cooperating small programs rather
than one big do-everything program...
* what do you think of the name "epkg"? I can rename it to tbz2pkg,
tbz2install/tbz2uninstall or whatever.
* Could it be interesting to have a C written epkg (or whatever the name
ends up with) for standard glibc gentoo? I cannot see any good reason to
not.
--
Natanael Copa
--
[email protected] mailing list