xbps_register_pkg: if automatic-install obj is there, don't overwrite its value.
--HG-- extra : convert_revision : xtraeme%40gmail.com-20091224003242-9twye4isotebbips
This commit is contained in:
parent
53adf2779b
commit
4be79d4535
@ -38,6 +38,7 @@ xbps_register_pkg(prop_dictionary_t pkgrd, bool automatic)
|
||||
const char *pkgname, *version, *desc, *pkgver;
|
||||
char *plist;
|
||||
int rv = 0;
|
||||
bool autoinst = false;
|
||||
|
||||
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||
XBPS_META_PATH, XBPS_REGPKGDB);
|
||||
@ -85,11 +86,14 @@ xbps_register_pkg(prop_dictionary_t pkgrd, bool automatic)
|
||||
rv = errno;
|
||||
goto out;
|
||||
}
|
||||
if (!prop_dictionary_set_bool(pkgd,
|
||||
"automatic-install", automatic)) {
|
||||
prop_object_release(pkgd);
|
||||
rv = errno;
|
||||
goto out;
|
||||
if (!prop_dictionary_get_bool(pkgd,
|
||||
"automatic-install", &autoinst)) {
|
||||
if (!prop_dictionary_set_bool(pkgd,
|
||||
"automatic-install", automatic)) {
|
||||
prop_object_release(pkgd);
|
||||
rv = errno;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user