API clean up (part 2), plus misc changes and improvements.

- Rename regpkgs_dictionary to regpkgdb_dictionary to better describe what is is.
- Change some funcs in plist.c to return a boolean rather than int.
- Hide more internal funcs off the API.
- Simplify xbps_repository_update_pkg() and remove its second arg.
- Hide implementation details in xbps_repository_pool, now to iterate over the
  pool you have to use xbps_repository_pool_foreach and its struct
  repository_pool_index.
- Introduce xbps_{init,end}, to initialize/destroy some stuff in the library.
- Introduce xbps_dbg_printf to printf stuff for debugging purposes.
- xbps-{bin,repo}:  added -d arg to enable debugging output.
- Before checking if a config file needs to be installed or such, check that
  package contains the "conf_files" array.
- Remove obsolete dirs as well while updating packages.
- If transaction dictionary is ready remove the "missing_deps" array.

Bump XBPS_RELVER to 20101118.

--HG--
rename : lib/regpkgs_dictionary.c => lib/regpkgdb_dictionary.c
This commit is contained in:
Juan RP
2010-11-19 13:40:13 +01:00
parent ffc255b715
commit fdec663855
33 changed files with 1426 additions and 943 deletions

View File

@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2009 Juan Romero Pardines.
* Copyright (c) 2009-2010 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,6 +30,8 @@
#include <errno.h>
#include <xbps_api.h>
#include "xbps_api_impl.h"
#include "queue.h"
/**
* @file lib/orphans.c
@@ -147,7 +149,7 @@ cleanup(void)
prop_object_release(orphan->dict);
free(orphan);
}
xbps_regpkgs_dictionary_release();
xbps_regpkgdb_dictionary_release();
}
prop_array_t
@@ -158,7 +160,7 @@ xbps_find_orphan_packages(void)
struct orphan_pkg *orphan;
int rv = 0;
if ((dict = xbps_regpkgs_dictionary_init()) == NULL)
if ((dict = xbps_regpkgdb_dictionary_get()) == NULL)
return NULL;
/*
* Find out all orphans by looking at the
@@ -189,7 +191,7 @@ xbps_find_orphan_packages(void)
prop_object_release(orphan->dict);
free(orphan);
}
xbps_regpkgs_dictionary_release();
xbps_regpkgdb_dictionary_release();
return array;
}