[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian-installer] microdpkg



Randolph Chung wrote:
> 
> > It looks like we should probably get further along on the redesign
> > so we can begin to get some better idea of what udpkg needs to be able
> > to do. Maybe we don't need dependencies. Maybe we do.
> >
> > (FWIW, Randolph is working on some 9 or 10k udpkg that does support
> > deps.)
> 
> I just checked something into cvs. it's in tools/udpkg
> 
> It's really still very incomplete. It "supports deps" right now only in the
> sense that it will check dependencies against installed/to-be-installed-with-
> same-command packages. it doesn't do any of the ordering stuff yet,
> although the hooks are there. Dependency checking can be turned off
> completely at compile time as well.
> 
> As I mentioned above, it's still very incomplete. Feel free to
> contribute changes, etc. I am exploring how to best handle the files
> that go into /var/lib/dpkg/info/ .... in particular the list file is
> ugly... i'm thinking of doing something like (+ error checking, etc):
> 
> FILE *infp, *outfp;
> char buf[MAXLEN];
> char *p;
> infp = popen("ar p foobar.deb control.tar.gz | zcat | tar -tf -");
> outfp = fopen("/var/lib/dpkg/info/foobar.list");
> while (fgets(buf, sizeof(buf), inp) && !feof(inp))
> {
>         p = buf; if (*p == '.') p++;
>         fputs(p, outp);
> }
> fclose(outfp);
> pclose(infp);
> 
> Gross....
> 
> Suggestions and code contributions welcome :>
> randolph
> --

I should be able to help you out with unpacking under busybox, ive got a
busybox patch nearly ready that has some cleanups to the ar code, there
is an internal function
extractAr(int srcFd, int dstFd, const char filename[16]) that should be
able to be combined with existing busybox unzip(srcFd, dstFd) and
readTarFile(...), might have to modify tar a bit.

It should mean it can be extracted without using popen or redirecting
stdout.



Glenn



Reply to: