Re: Rambling apt-get ideas
Matt Zimmerman wrote:
>
> On Thu, Dec 28, 2000 at 08:22:52AM -0600, Vince Mulhollon wrote:
>
> > Yes, that was kind of my point.
> >
> > An analogy would be that we don't need dpkg because most of its
> > functionality could be done by a mixture of tar, gzip, and perl (and maybe
> > make to handle dependancies).
>
> Not quite. dpkg-deb actually does call out to tar and gzip, and lets those
> programs do what they do best. It doesn't try to be tar and gzip and dpkg all
> at once. The UNIX approach is to build tools that do one or a few jobs very
> well, and build larger tools out of that code base. That way, once a problem
> is solved, it is solved for all programs that share the problem-solving code.
>
Code reuse is generally a good idea, but only if depending on external
code doesnt compromise your program.
If you accidentally deleted gzip or tar how would you recover ?
You couldnt build them from a source package or or extract it from a
binary package because you need both tar and gzip to extract them.
The only thing you could do is get a binary copy from someone elses
machine which is a pain if your not on a network. You could use the tar
and gzip functionality from busybox if you have it unpacked.
Actually i was thinking recently of making a libdpkg-deb that had ar,
tar, gzip built in (based on busybox's version).
libraries are much beter for code reuse.
Glenn
Reply to: