Use xbps_get_root() directly where appropiate.
--HG-- extra : convert_revision : xtraeme%40gmail.com-20091027111547-tb38qz51ejakn3jc
This commit is contained in:
parent
ac897c8383
commit
dc258f4e20
@ -84,14 +84,13 @@ xbps_check_pkg_integrity(const char *pkgname)
|
|||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
prop_object_t obj;
|
prop_object_t obj;
|
||||||
prop_object_iterator_t iter;
|
prop_object_iterator_t iter;
|
||||||
const char *rootdir, *file, *sha256, *reqpkg;
|
const char *file, *sha256, *reqpkg;
|
||||||
char *path;
|
char *path;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
bool broken = false, files_broken = false;
|
bool broken = false, files_broken = false;
|
||||||
|
|
||||||
assert(pkgname != NULL);
|
assert(pkgname != NULL);
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
|
||||||
pkgd = xbps_find_pkg_installed_from_plist(pkgname);
|
pkgd = xbps_find_pkg_installed_from_plist(pkgname);
|
||||||
if (pkgd == NULL) {
|
if (pkgd == NULL) {
|
||||||
printf("Package %s is not installed.\n", pkgname);
|
printf("Package %s is not installed.\n", pkgname);
|
||||||
@ -101,7 +100,7 @@ xbps_check_pkg_integrity(const char *pkgname)
|
|||||||
/*
|
/*
|
||||||
* Check for props.plist metadata file.
|
* Check for props.plist metadata file.
|
||||||
*/
|
*/
|
||||||
path = xbps_xasprintf("%s/%s/metadata/%s/%s", rootdir,
|
path = xbps_xasprintf("%s/%s/metadata/%s/%s", xbps_get_rootdir(),
|
||||||
XBPS_META_PATH, pkgname, XBPS_PKGPROPS);
|
XBPS_META_PATH, pkgname, XBPS_PKGPROPS);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
rv = errno;
|
rv = errno;
|
||||||
@ -130,7 +129,7 @@ xbps_check_pkg_integrity(const char *pkgname)
|
|||||||
/*
|
/*
|
||||||
* Check for files.plist metadata file.
|
* Check for files.plist metadata file.
|
||||||
*/
|
*/
|
||||||
path = xbps_xasprintf("%s/%s/metadata/%s/%s", rootdir,
|
path = xbps_xasprintf("%s/%s/metadata/%s/%s", xbps_get_rootdir(),
|
||||||
XBPS_META_PATH, pkgname, XBPS_PKGFILES);
|
XBPS_META_PATH, pkgname, XBPS_PKGFILES);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
rv = errno;
|
rv = errno;
|
||||||
@ -176,7 +175,8 @@ xbps_check_pkg_integrity(const char *pkgname)
|
|||||||
}
|
}
|
||||||
while ((obj = prop_object_iterator_next(iter))) {
|
while ((obj = prop_object_iterator_next(iter))) {
|
||||||
prop_dictionary_get_cstring_nocopy(obj, "file", &file);
|
prop_dictionary_get_cstring_nocopy(obj, "file", &file);
|
||||||
path = xbps_xasprintf("%s/%s", rootdir, file);
|
path = xbps_xasprintf("%s/%s",
|
||||||
|
xbps_get_rootdir(), file);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
rv = errno;
|
rv = errno;
|
||||||
@ -225,7 +225,8 @@ xbps_check_pkg_integrity(const char *pkgname)
|
|||||||
}
|
}
|
||||||
while ((obj = prop_object_iterator_next(iter))) {
|
while ((obj = prop_object_iterator_next(iter))) {
|
||||||
prop_dictionary_get_cstring_nocopy(obj, "file", &file);
|
prop_dictionary_get_cstring_nocopy(obj, "file", &file);
|
||||||
path = xbps_xasprintf("%s/%s", rootdir, file);
|
path = xbps_xasprintf("%s/%s",
|
||||||
|
xbps_get_rootdir(), file);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
rv = ENOMEM;
|
rv = ENOMEM;
|
||||||
|
@ -60,13 +60,11 @@ int
|
|||||||
xbps_show_pkg_deps(const char *pkgname)
|
xbps_show_pkg_deps(const char *pkgname)
|
||||||
{
|
{
|
||||||
prop_dictionary_t pkgd, propsd;
|
prop_dictionary_t pkgd, propsd;
|
||||||
const char *rootdir;
|
|
||||||
char *path;
|
char *path;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
assert(pkgname != NULL);
|
assert(pkgname != NULL);
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
|
||||||
pkgd = xbps_find_pkg_installed_from_plist(pkgname);
|
pkgd = xbps_find_pkg_installed_from_plist(pkgname);
|
||||||
if (pkgd == NULL) {
|
if (pkgd == NULL) {
|
||||||
printf("Package %s is not installed.\n", pkgname);
|
printf("Package %s is not installed.\n", pkgname);
|
||||||
@ -76,7 +74,7 @@ xbps_show_pkg_deps(const char *pkgname)
|
|||||||
/*
|
/*
|
||||||
* Check for props.plist metadata file.
|
* Check for props.plist metadata file.
|
||||||
*/
|
*/
|
||||||
path = xbps_xasprintf("%s/%s/metadata/%s/%s", rootdir,
|
path = xbps_xasprintf("%s/%s/metadata/%s/%s", xbps_get_rootdir(),
|
||||||
XBPS_META_PATH, pkgname, XBPS_PKGPROPS);
|
XBPS_META_PATH, pkgname, XBPS_PKGPROPS);
|
||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
return errno;
|
return errno;
|
||||||
|
@ -155,11 +155,9 @@ int
|
|||||||
show_pkg_info_from_metadir(const char *pkgname)
|
show_pkg_info_from_metadir(const char *pkgname)
|
||||||
{
|
{
|
||||||
prop_dictionary_t pkgd;
|
prop_dictionary_t pkgd;
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/metadata/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/metadata/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, pkgname, XBPS_PKGPROPS);
|
XBPS_META_PATH, pkgname, XBPS_PKGPROPS);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -184,12 +182,11 @@ show_pkg_files_from_metadir(const char *pkgname)
|
|||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
prop_object_iterator_t iter = NULL;
|
prop_object_iterator_t iter = NULL;
|
||||||
prop_object_t obj;
|
prop_object_t obj;
|
||||||
const char *destdir, *file;
|
const char *file;
|
||||||
char *plist, *array_str = "files";
|
char *plist, *array_str = "files";
|
||||||
int i, rv = 0;
|
int i, rv = 0;
|
||||||
|
|
||||||
destdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/metadata/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/metadata/%s/%s", destdir,
|
|
||||||
XBPS_META_PATH, pkgname, XBPS_PKGFILES);
|
XBPS_META_PATH, pkgname, XBPS_PKGFILES);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
@ -101,7 +101,6 @@ xbps_prepare_repolist_data(void)
|
|||||||
prop_object_t obj;
|
prop_object_t obj;
|
||||||
prop_object_iterator_t iter;
|
prop_object_iterator_t iter;
|
||||||
struct repository_data *rdata;
|
struct repository_data *rdata;
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
static bool repodata_initialized;
|
static bool repodata_initialized;
|
||||||
@ -111,11 +110,7 @@ xbps_prepare_repolist_data(void)
|
|||||||
|
|
||||||
SIMPLEQ_INIT(&repodata_queue);
|
SIMPLEQ_INIT(&repodata_queue);
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
if (rootdir == NULL)
|
|
||||||
rootdir = "";
|
|
||||||
|
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REPOLIST);
|
XBPS_META_PATH, XBPS_REPOLIST);
|
||||||
if (plist == NULL) {
|
if (plist == NULL) {
|
||||||
rv = EINVAL;
|
rv = EINVAL;
|
||||||
|
@ -71,14 +71,12 @@ xbps_callback_array_iter_in_repolist(int (*fn)(prop_object_t, void *, bool *),
|
|||||||
void *arg)
|
void *arg)
|
||||||
{
|
{
|
||||||
prop_dictionary_t repolistd;
|
prop_dictionary_t repolistd;
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
assert(fn != NULL);
|
assert(fn != NULL);
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REPOLIST);
|
XBPS_META_PATH, XBPS_REPOLIST);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -244,12 +242,10 @@ xbps_find_pkg_in_dict(prop_dictionary_t dict, const char *key,
|
|||||||
prop_dictionary_t SYMEXPORT
|
prop_dictionary_t SYMEXPORT
|
||||||
xbps_prepare_regpkgdb_dict(void)
|
xbps_prepare_regpkgdb_dict(void)
|
||||||
{
|
{
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
|
|
||||||
if (regpkgdb_initialized == false) {
|
if (regpkgdb_initialized == false) {
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REGPKGDB);
|
XBPS_META_PATH, XBPS_REGPKGDB);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
13
lib/purge.c
13
lib/purge.c
@ -78,13 +78,12 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
|
|||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
prop_object_t obj;
|
prop_object_t obj;
|
||||||
prop_object_iterator_t iter;
|
prop_object_iterator_t iter;
|
||||||
const char *rootdir, *file, *sha256;
|
const char *file, *sha256;
|
||||||
char *path;
|
char *path;
|
||||||
int rv = 0, flags;
|
int rv = 0, flags;
|
||||||
pkg_state_t state = 0;
|
pkg_state_t state = 0;
|
||||||
|
|
||||||
assert(pkgname != NULL);
|
assert(pkgname != NULL);
|
||||||
rootdir = xbps_get_rootdir();
|
|
||||||
flags = xbps_get_flags();
|
flags = xbps_get_flags();
|
||||||
|
|
||||||
if (check_state) {
|
if (check_state) {
|
||||||
@ -102,8 +101,8 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
|
|||||||
* Iterate over the pkg file list dictionary and remove all
|
* Iterate over the pkg file list dictionary and remove all
|
||||||
* unmodified configuration files.
|
* unmodified configuration files.
|
||||||
*/
|
*/
|
||||||
path = xbps_xasprintf("%s/%s/metadata/%s/%s",
|
path = xbps_xasprintf("%s/%s/metadata/%s/%s", xbps_get_rootdir(),
|
||||||
rootdir, XBPS_META_PATH, pkgname, XBPS_PKGFILES);
|
XBPS_META_PATH, pkgname, XBPS_PKGFILES);
|
||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
return errno;
|
return errno;
|
||||||
|
|
||||||
@ -134,7 +133,7 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
|
|||||||
prop_object_release(dict);
|
prop_object_release(dict);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
path = xbps_xasprintf("%s/%s", rootdir, file);
|
path = xbps_xasprintf("%s/%s", xbps_get_rootdir(), file);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
prop_object_release(dict);
|
prop_object_release(dict);
|
||||||
@ -191,16 +190,14 @@ remove_pkg_metadata(const char *pkgname)
|
|||||||
{
|
{
|
||||||
struct dirent *dp;
|
struct dirent *dp;
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
const char *rootdir;
|
|
||||||
char *metadir, *path;
|
char *metadir, *path;
|
||||||
int flags = 0, rv = 0;
|
int flags = 0, rv = 0;
|
||||||
|
|
||||||
assert(pkgname != NULL);
|
assert(pkgname != NULL);
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
|
||||||
flags = xbps_get_flags();
|
flags = xbps_get_flags();
|
||||||
|
|
||||||
metadir = xbps_xasprintf("%s/%s/metadata/%s", rootdir,
|
metadir = xbps_xasprintf("%s/%s/metadata/%s", xbps_get_rootdir(),
|
||||||
XBPS_META_PATH, pkgname);
|
XBPS_META_PATH, pkgname);
|
||||||
if (metadir == NULL)
|
if (metadir == NULL)
|
||||||
return errno;
|
return errno;
|
||||||
|
@ -35,12 +35,11 @@ xbps_register_pkg(prop_dictionary_t pkgrd, bool automatic)
|
|||||||
{
|
{
|
||||||
prop_dictionary_t dict, pkgd;
|
prop_dictionary_t dict, pkgd;
|
||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
const char *pkgname, *version, *desc, *rootdir;
|
const char *pkgname, *version, *desc;
|
||||||
char *plist;
|
char *plist;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REGPKGDB);
|
XBPS_META_PATH, XBPS_REGPKGDB);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -95,14 +94,12 @@ out:
|
|||||||
int SYMEXPORT
|
int SYMEXPORT
|
||||||
xbps_unregister_pkg(const char *pkgname)
|
xbps_unregister_pkg(const char *pkgname)
|
||||||
{
|
{
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
assert(pkgname != NULL);
|
assert(pkgname != NULL);
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REGPKGDB);
|
XBPS_META_PATH, XBPS_REGPKGDB);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
@ -41,11 +41,10 @@ remove_pkg_files(prop_dictionary_t dict)
|
|||||||
prop_object_iterator_t iter;
|
prop_object_iterator_t iter;
|
||||||
prop_object_t obj;
|
prop_object_t obj;
|
||||||
prop_bool_t bobj;
|
prop_bool_t bobj;
|
||||||
const char *file, *rootdir, *sha256;
|
const char *file, *sha256;
|
||||||
char *path = NULL;
|
char *path = NULL;
|
||||||
int flags = 0, rv = 0;
|
int flags = 0, rv = 0;
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
|
||||||
flags = xbps_get_flags();
|
flags = xbps_get_flags();
|
||||||
|
|
||||||
/* Links */
|
/* Links */
|
||||||
@ -62,7 +61,7 @@ remove_pkg_files(prop_dictionary_t dict)
|
|||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
path = xbps_xasprintf("%s/%s", rootdir, file);
|
path = xbps_xasprintf("%s/%s", xbps_get_rootdir(), file);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -97,7 +96,7 @@ files:
|
|||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
path = xbps_xasprintf("%s/%s", rootdir, file);
|
path = xbps_xasprintf("%s/%s", xbps_get_rootdir(), file);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -155,7 +154,7 @@ dirs:
|
|||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
path = xbps_xasprintf("%s/%s", rootdir, file);
|
path = xbps_xasprintf("%s/%s", xbps_get_rootdir(), file);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
@ -36,14 +36,12 @@ xbps_register_repository(const char *uri)
|
|||||||
prop_dictionary_t dict;
|
prop_dictionary_t dict;
|
||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
prop_object_t obj = NULL;
|
prop_object_t obj = NULL;
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
assert(uri != NULL);
|
assert(uri != NULL);
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REPOLIST);
|
XBPS_META_PATH, XBPS_REPOLIST);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return errno;
|
return errno;
|
||||||
@ -113,14 +111,12 @@ xbps_unregister_repository(const char *uri)
|
|||||||
{
|
{
|
||||||
prop_dictionary_t dict;
|
prop_dictionary_t dict;
|
||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
assert(uri != NULL);
|
assert(uri != NULL);
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REPOLIST);
|
XBPS_META_PATH, XBPS_REPOLIST);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return errno;
|
return errno;
|
||||||
|
@ -120,12 +120,10 @@ int SYMEXPORT
|
|||||||
xbps_requiredby_pkg_remove(const char *pkgname)
|
xbps_requiredby_pkg_remove(const char *pkgname)
|
||||||
{
|
{
|
||||||
prop_dictionary_t dict;
|
prop_dictionary_t dict;
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REGPKGDB);
|
XBPS_META_PATH, XBPS_REGPKGDB);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
@ -96,12 +96,10 @@ int SYMEXPORT
|
|||||||
xbps_get_pkg_state_installed(const char *pkgname, pkg_state_t *state)
|
xbps_get_pkg_state_installed(const char *pkgname, pkg_state_t *state)
|
||||||
{
|
{
|
||||||
prop_dictionary_t dict, pkgd;
|
prop_dictionary_t dict, pkgd;
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
|
|
||||||
assert(pkgname != NULL);
|
assert(pkgname != NULL);
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REGPKGDB);
|
XBPS_META_PATH, XBPS_REGPKGDB);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return errno;
|
return errno;
|
||||||
@ -152,13 +150,11 @@ xbps_set_pkg_state_installed(const char *pkgname, pkg_state_t state)
|
|||||||
{
|
{
|
||||||
prop_dictionary_t dict, pkgd;
|
prop_dictionary_t dict, pkgd;
|
||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
const char *rootdir;
|
|
||||||
char *plist;
|
char *plist;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
bool newpkg = false;
|
bool newpkg = false;
|
||||||
|
|
||||||
rootdir = xbps_get_rootdir();
|
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||||
plist = xbps_xasprintf("%s/%s/%s", rootdir,
|
|
||||||
XBPS_META_PATH, XBPS_REGPKGDB);
|
XBPS_META_PATH, XBPS_REGPKGDB);
|
||||||
if (plist == NULL)
|
if (plist == NULL)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user