xbps-repo: [genindex] print to stdout when obsolete entry is removed.
This commit is contained in:
parent
e8071802d1
commit
fe1e8d14c8
@ -45,7 +45,7 @@ remove_missing_binpkg_entries(const char *repodir)
|
|||||||
{
|
{
|
||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
prop_dictionary_t pkgd;
|
prop_dictionary_t pkgd;
|
||||||
const char *filen;
|
const char *filen, *pkgver;
|
||||||
char *binpkg, *plist;
|
char *binpkg, *plist;
|
||||||
size_t i;
|
size_t i;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
@ -70,6 +70,7 @@ remove_missing_binpkg_entries(const char *repodir)
|
|||||||
again:
|
again:
|
||||||
for (i = 0; i < prop_array_count(array); i++) {
|
for (i = 0; i < prop_array_count(array); i++) {
|
||||||
pkgd = prop_array_get(array, i);
|
pkgd = prop_array_get(array, i);
|
||||||
|
prop_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
|
||||||
prop_dictionary_get_cstring_nocopy(pkgd, "filename", &filen);
|
prop_dictionary_get_cstring_nocopy(pkgd, "filename", &filen);
|
||||||
binpkg = xbps_xasprintf("%s/%s", repodir, filen);
|
binpkg = xbps_xasprintf("%s/%s", repodir, filen);
|
||||||
if (binpkg == NULL) {
|
if (binpkg == NULL) {
|
||||||
@ -78,9 +79,8 @@ again:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (access(binpkg, R_OK) == -1) {
|
if (access(binpkg, R_OK) == -1) {
|
||||||
xbps_warn_printf("xbps-repo: `%s' unavailable, "
|
printf("Removed obsolete entry for `%s' "
|
||||||
"removing entry from index... (%s)\n",
|
"from index.\n", pkgver);
|
||||||
filen, strerror(errno));
|
|
||||||
prop_array_remove(array, i);
|
prop_array_remove(array, i);
|
||||||
free(binpkg);
|
free(binpkg);
|
||||||
found = true;
|
found = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user