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

Re: libapt-pkg API reference



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Burrows <dnb114@psu.edu> writes:

> Roger Leigh <roger@whinlatter.uklinux.net> was heard to say:
> > Is there an API reference for writing programs with libapt-pkg?  I had
> > a look at the libapt-pkg-doc package, but this doesn't seem to include
> > one.  I'm looking at rewriting sbuild in C++, and it would be great if
> > I could do something like:
> 
>   In my experience, the API reference is in /usr/include/apt-pkg and the
> source of the apt package, as well as the source of other programs using
> apt-pkg.

Right, I suspected this might be the case.  I've had a look at the
headers (some more comments explaining the API would be nice BTW ;-),
and I think I'll hopefully get by by using apt-get as a reference.

What are all the /*{{{*/ and /*}}}*/ for in the source?

The tool I'm going to write will basically do this:
install and remove specified sets of packages to satisfy build-deps
and build-conflicts.
[do stuff]
restore the previous state (though this may not always be possible if
the package dependencies changed in the meantime).

This should be possible to do by using a modified version of the
apt-get DoInstall() function (and its dependents).

Will anyone object if I "borrow" portions of apt-get.cc, and all of
acqprogress.cc and acqprogress.h?  The program will be GPL, of course.
To satisfy the requirements of the GPL, who holds the copyright on
these files, and over what years?  (Feature Request: please add a
standard GPL header to each source file so this can be easily
determined).

"Apt is copyright 1997, 1998, 1999 Jason Gunthorpe and others."

Who are "others"?  That is not sufficient for a legal copyright
statement, IMO.  There should be a complete list, with dates:

/*
 * "$Id: xml.c,v 1.14 2003/03/30 19:42:20 rleigh Exp $"
 *
 *   XML parser - process gimp-print XML data with libxml2.
 *
 *   Copyright 1997-2002 Michael Sweet (mike@easysw.com),
 *      Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org)
 *   Copyright 2002-2003 Roger Leigh (roger@whinlatter.uklinux.net)
 *
 *   This program is free software; you can redistribute it and/or modify it
 *   under the terms of the GNU General Public License as published by the Free
 *   Software Foundation; either version 2 of the License, or (at your option)
 *   any later version.
 *
 *   This program is distributed in the hope that it will be useful, but
 *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 *   for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */


Regards,
Roger

[Please CC me on any replies: I'm not subscribed to deity@lists]

- -- 
Roger Leigh

                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848 available on public keyservers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAj6IsykACgkQVcFcaSW/uEj2nwCg4mw25nG2yyehKqQZvs1f7gqi
FgUAnj3RXrBHk1/ejYn6u6sTECmIzJ6H
=wCYv
-----END PGP SIGNATURE-----



Reply to: