make pkg_install suite reusable, please

Garrett Cooper yanefbsd at gmail.com
Fri Apr 9 20:25:31 UTC 2010


On Fri, Apr 9, 2010 at 11:51 AM, Charlie Kester <corky1951 at comcast.net> wrote:
> On Fri 09 Apr 2010 at 07:36:17 PDT Alexander Churanov wrote:
>>
>> 2010/4/9 Leinier Cruz Salfran <salfrancl.listas at gmail.com>
>>
>>> i want to ask you one thing: can you make the 'pkg_install' suite
>>> reusable .. means install 'libinstall.a' as a shared object in order
>>> to make it reusable by others devs
>>>
>>
>> Hi Leinier,
>>
>> I'd like to add my 50 cents. From my point of view, the true UNIX way is
>> re-using whole programs. This provides unbelievable isolation and
>> correctness. If you don't want to fork myriads of processes each second,
>> then, it's, probably, better to ask for pipe mode of pkg_* tools. For
>> example, aspell works that way. You start a process, write commands and
>> queries and read results.
>
> +1
>
> It was a watershed moment in my programming career when I realized that
> the bubbles on those DFD charts we used to use for structured design
> could be whole processes and not just functions in a single, monolithic
> program.
> Suddenly everything the structured design folks were saying about
> re-use, encapsulation, loose coupling, module cohesion, etc. made a lot
> more sense when viewed from the perspective of simple Unix utilities
> communicating with plain text via pipes.
> We should encourage that approach as a default, and only put things into
> binary libraries when forced to by performance considerations.

It makes more sense here though because it can be used by the existing
tools, it can be linked into other applications (that it makes sense
to do so), like sysinstall (or its successor), and there's been some
talk about splitting up pkg_install into two separate pieces, one for
handling the low-level packaging tasks, and the other for handling the
user-facing pieces.

Thanks,
-Garrett


More information about the freebsd-hackers mailing list