Reorganize headers and move two funcs into util.c, where they belong.

--HG--
extra : convert_revision : 63d54dddfeb732da2204244fd9f00cff434e5540
This commit is contained in:
Juan RP 2009-02-05 16:53:49 +01:00
parent d7b5f20e26
commit 3a52668aed
10 changed files with 269 additions and 103 deletions

View file

@ -36,28 +36,6 @@
#include <xbps_api.h>
static bool
check_installed_pkgname(const char *pkgname)
{
prop_dictionary_t pkgd;
char *plist;
assert(pkgname != NULL);
plist = xbps_append_full_path(true, NULL, XBPS_REGPKGDB);
if (plist == NULL)
return false;
pkgd = xbps_find_pkg_from_plist(plist, pkgname);
free(plist);
if (pkgd) {
prop_object_release(pkgd);
return true;
}
return false;
}
int
xbps_unregister_pkg(const char *pkgname)
{
@ -136,7 +114,7 @@ xbps_remove_binary_pkg(const char *pkgname, const char *destdir)
destdir = "";
/* Check if pkg is installed */
if (check_installed_pkgname(pkgname) == false)
if (xbps_check_is_installed_pkgname(pkgname) == false)
return ENOENT;
/*