xbps_dictionary_metadata_plist_by_url: only accept exact matches.
This commit is contained in:
parent
a0f91f3342
commit
efefa000b2
@ -98,7 +98,7 @@ genindex_files_cb(prop_object_t obj, void *arg, bool *done)
|
||||
return ENOMEM;
|
||||
|
||||
/* internalize files.plist from binary package archive */
|
||||
pkg_filesd = xbps_dictionary_metadata_plist_by_url(file, XBPS_PKGFILES);
|
||||
pkg_filesd = xbps_dictionary_metadata_plist_by_url(file, "./files.plist");
|
||||
if (pkg_filesd == NULL) {
|
||||
free(file);
|
||||
return EINVAL;
|
||||
|
@ -150,7 +150,7 @@ add_binpkg_to_index(prop_array_t idx,
|
||||
goto out;
|
||||
}
|
||||
|
||||
newpkgd = xbps_dictionary_metadata_plist_by_url(file, XBPS_PKGPROPS);
|
||||
newpkgd = xbps_dictionary_metadata_plist_by_url(file, "./props.plist");
|
||||
if (newpkgd == NULL) {
|
||||
xbps_error_printf("failed to read %s metadata for `%s',"
|
||||
" skipping!\n", XBPS_PKGPROPS, file);
|
||||
|
@ -232,7 +232,8 @@ main(int argc, char **argv)
|
||||
if (argc != 2)
|
||||
usage(true);
|
||||
|
||||
pkgd = xbps_rpool_dictionary_metadata_plist(argv[1], XBPS_PKGFILES);
|
||||
pkgd = xbps_rpool_dictionary_metadata_plist(argv[1],
|
||||
"./files.plist");
|
||||
if (pkgd == NULL) {
|
||||
if (errno == ENOTSUP) {
|
||||
xbps_error_printf("xbps-repo: no repositories "
|
||||
|
@ -56,7 +56,7 @@
|
||||
*/
|
||||
#define XBPS_PKGINDEX_VERSION "1.5"
|
||||
|
||||
#define XBPS_API_VERSION "20120605-1"
|
||||
#define XBPS_API_VERSION "20120605-2"
|
||||
#define XBPS_VERSION "0.16"
|
||||
|
||||
/**
|
||||
|
@ -175,7 +175,7 @@ xbps_dictionary_metadata_plist_by_url(const char *url, const char *plistf)
|
||||
|
||||
while ((archive_read_next_header(a, &entry)) == ARCHIVE_OK) {
|
||||
curpath = archive_entry_pathname(entry);
|
||||
if (strstr(curpath, plistf) == 0) {
|
||||
if (strcmp(curpath, plistf)) {
|
||||
archive_read_data_skip(a);
|
||||
if (i >= 3) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user