The following commit has been merged in the master branch: commit b31617401de3aa1729b8d634d3ed560accb1d011 Author: Guillem Jover <guil...@debian.org> Date: Sat Apr 30 04:29:04 2011 +0200
libdpkg: Move versionsatisfied() into a new depcon module diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am index d26a53b..64d8b3b 100644 --- a/lib/dpkg/Makefile.am +++ b/lib/dpkg/Makefile.am @@ -33,6 +33,7 @@ libdpkg_a_SOURCES = \ dbdir.c \ dbmodify.c \ debug.c \ + depcon.c \ dir.c \ dump.c \ ehandle.c \ diff --git a/dselect/curkeys.cc b/lib/dpkg/depcon.c similarity index 72% copy from dselect/curkeys.cc copy to lib/dpkg/depcon.c index 0bbcf16..b5089cd 100644 --- a/dselect/curkeys.cc +++ b/lib/dpkg/depcon.c @@ -1,6 +1,6 @@ /* - * dselect - Debian package maintenance user interface - * curkeys.cc - list of ncurses keys for name <-> key mapping + * libdpkg - Debian packaging suite library routines + * depcon.c - dependency and conflict checking * * Copyright © 1995 Ian Jackson <i...@chiark.greenend.org.uk> * @@ -21,11 +21,12 @@ #include <config.h> #include <compat.h> +#include <dpkg/dpkg.h> #include <dpkg/dpkg-db.h> -#include "dselect.h" -#include "bindings.h" - -const keybindings::keyname keybindings::keynames[] = { -#include "curkeys.h" -}; +bool +versionsatisfied(struct pkgbin *it, struct deppossi *against) +{ + return versionsatisfied3(&it->version, &against->version, + against->verrel); +} diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h index 7f2b125..fdc4760 100644 --- a/lib/dpkg/dpkg-db.h +++ b/lib/dpkg/dpkg-db.h @@ -344,7 +344,6 @@ void varbufdependency(struct varbuf *vb, struct dependency *dep); /*** from vercmp.c ***/ -bool versionsatisfied(struct pkgbin *it, struct deppossi *against); bool versionsatisfied3(const struct versionrevision *it, const struct versionrevision *ref, enum depverrel verrel); @@ -353,6 +352,10 @@ int versioncompare(const struct versionrevision *version, bool epochsdiffer(const struct versionrevision *a, const struct versionrevision *b); +/*** from depcon.c ***/ + +bool versionsatisfied(struct pkgbin *it, struct deppossi *against); + /*** from nfmalloc.c ***/ void *nfmalloc(size_t); char *nfstrsave(const char*); diff --git a/lib/dpkg/vercmp.c b/lib/dpkg/vercmp.c index e5dc235..da86266 100644 --- a/lib/dpkg/vercmp.c +++ b/lib/dpkg/vercmp.c @@ -109,9 +109,3 @@ versionsatisfied3(const struct versionrevision *it, } return false; } - -bool -versionsatisfied(struct pkgbin *it, struct deppossi *against) -{ - return versionsatisfied3(&it->version,&against->version,against->verrel); -} -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org