Hi Nathanael

the epkg code looks fine to me, and I also think the idea works out.
It's good that you provided the non _main interface, which leads me
to...

The whole "exec so we can call wget" thing still bugs me. Do you all
feel the effort needed to split the wget code into two parts: a
wget_main, which parses the argv and such, and do_wget, which has all
the meat, is worth it? That way from our code we could just call
do_wget. It's kind of an intrusive thing, but I think the complexity of
doing the exec is a worse solution.

Ben

On Tue, 2005-03-01 at 10:51 -0500, Ned Ludd wrote:
> On Mon, 2005-02-28 at 20:04 +0100, Natanael Copa wrote:
> > 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 ...").
> 
> Great cuz popen() is just evil.
> 
> > 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? 
> If you willing to code it and it's good code then I see no reason not to
> use this as a backend tool.
> 
> > 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.
> the name seems fine to me. Short and sweet.
> 
> > * 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.
> You would have to talk to our python guru's about that gentoo-portage-dev ml. 
> For the most part they are pretty uninterested in code that's not python.
> 
> > --
> > Natanael Copa
> > 
> > 
> > 
> > --
> > [email protected] mailing list
> > 
-- 
Benjamin Collar
Siemens AG
CT SE 2
Embedded Linux
089-636-53711



--
[email protected] mailing list

Reply via email to