unpack: use files.plist from binpkg when checking for configuration files.
This commit is contained in:
parent
73509b3556
commit
0cf9047bd2
@ -34,21 +34,20 @@
|
|||||||
* Returns true if entry is a configuration file, false otherwise.
|
* Returns true if entry is a configuration file, false otherwise.
|
||||||
*/
|
*/
|
||||||
int HIDDEN
|
int HIDDEN
|
||||||
xbps_entry_is_a_conf_file(xbps_dictionary_t propsd,
|
xbps_entry_is_a_conf_file(xbps_dictionary_t filesd,
|
||||||
const char *entry_pname)
|
const char *entry_pname)
|
||||||
{
|
{
|
||||||
xbps_array_t array;
|
xbps_array_t array;
|
||||||
|
xbps_dictionary_t d;
|
||||||
const char *cffile;
|
const char *cffile;
|
||||||
|
|
||||||
assert(xbps_object_type(propsd) == XBPS_TYPE_DICTIONARY);
|
array = xbps_dictionary_get(filesd, "conf_files");
|
||||||
assert(entry_pname != NULL);
|
|
||||||
|
|
||||||
array = xbps_dictionary_get(propsd, "conf_files");
|
|
||||||
if (xbps_array_count(array) == 0)
|
if (xbps_array_count(array) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < xbps_array_count(array); i++) {
|
for (unsigned int i = 0; i < xbps_array_count(array); i++) {
|
||||||
xbps_array_get_cstring_nocopy(array, i, &cffile);
|
d = xbps_array_get(array, i);
|
||||||
|
xbps_dictionary_get_cstring_nocopy(d, "file", &cffile);
|
||||||
if (strcmp(cffile, entry_pname) == 0)
|
if (strcmp(cffile, entry_pname) == 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -373,7 +373,7 @@ unpack_archive(struct xbps_handle *xhp,
|
|||||||
* "conf_files" array on its XBPS_PKGPROPS
|
* "conf_files" array on its XBPS_PKGPROPS
|
||||||
* dictionary.
|
* dictionary.
|
||||||
*/
|
*/
|
||||||
if (xbps_entry_is_a_conf_file(propsd, buf)) {
|
if (xbps_entry_is_a_conf_file(filesd, buf)) {
|
||||||
conf_file = true;
|
conf_file = true;
|
||||||
if (xhp->unpack_cb != NULL)
|
if (xhp->unpack_cb != NULL)
|
||||||
xucd.entry_is_conf = true;
|
xucd.entry_is_conf = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user