Re: libapt-pkg introduction
Le 25.10.2013 10:42, David Kalnischkies a écrit :
You will have a good chance of running into much of the same people
either
way through as the developers in the APT-environment are brothers in
arms
I am only interested by the lib for now. When I'll have something, I
may be interested in other source codes, but there is nothing certain. I
could have been interested by packagekit, but I did not liked it's
dependencies. I would have preferred a portable lib, not a daemon
interface which forces you to grab lot of dependencies for a simple
tool. I like libs following the UNIX philosophy.
and leave the fight of which is the better front-end to the fanboys.
;)
Indeed. I'm not a fanboy either, since I try to make my own. Maybe I'll
become a fanboy of mine, hehe... (I strongly doubt it. I never made any
perfect program, so...)
But it seems to be a python-apt related documentation, not
libapt-pkg. So do
someone knows if there is some very short and quick introduction
that I
could use as a starting point, or will I have to take a look
directly in
aptitude's or apt-get's source codes?
There unfortunately isn't much documentation available, and based on
your
description you found all of it already.
I was afraid of that...
If you like what you read in
python-apt, I suppose it isn't that different from libapt - beside
the
obvious language difference of course.
I do not really liked what I read in python-apt, since it does not uses
the same names as those used in the C++ lib (which I intend to use, for
various reasons). At least, that's what grep said.
I guess part of the reason is that all simple examples are either
incomplete
or no longer simple.
Do you have any idea of where could be one of the incomplete ones?
I do not need something which is really doing a useful job, I need
something which shows the init process ( I have seen some "init"
functions in python-apt... ).
When I'll have that, with the doc and apt/aptitude to reverse, I should
be fine and will hopefully be able to quickly have very basic tools.
Legend has it that apt-get and friends are demos on
how package management could be done (with libapt) until the
implementation
of the graphical 'apt' would be completed. It's at least how I
interpret some
of the ancient writings.
Aptitude to do black magic must be acquired by pain :)
[It was (of course) never completed.]
aptitude-gtk works, I think. At least, it did when I tried it 3 years
ago... There is also synaptic which is used by a lot of people. But when
I tried the graphical things, I was no longer able to intuitively use my
keyboard to do what I wanted, so I quickly came back to my good old
aptitude.
I would recommend taking whatever front-end comes closest to what you
want
it to be and patch the hell out of it until it is what you want. The
initial
cost of understanding code from others might be high at first, but
starting
from scratch usually means that you write a lot of code unrelated to
what you
want to achieve in the first place.
Not a bad idea. And in case I can't make it looks like what I want I'll
have code snippets. I'll go that way I think. I wonder what would be the
easiest: starting with aptitude, or dselect?
PS: no need for cc ;)
Reply to: