xbps-bin: use "mutable" bool object to check for mutable files in pkg file list.

This commit is contained in:
Juan RP 2012-01-24 18:47:43 +01:00
parent 49baad48f4
commit 9a1f05ee89

View File

@ -56,7 +56,7 @@ check_pkg_files(const char *pkgname, void *arg, bool *pkgdb_update)
const char *file, *sha256; const char *file, *sha256;
char *path; char *path;
int rv = 0; int rv = 0;
bool broken = false, test_broken = false; bool mutable, broken = false, test_broken = false;
(void)pkgdb_update; (void)pkgdb_update;
@ -85,9 +85,14 @@ check_pkg_files(const char *pkgname, void *arg, bool *pkgdb_update)
test_broken = true; test_broken = true;
break; break;
case ERANGE: case ERANGE:
xbps_error_printf("%s: hash mismatch for %s.\n", mutable = false;
pkgname, file); prop_dictionary_get_bool(obj,
"mutable", &mutable);
if (!mutable) {
xbps_error_printf("%s: hash mismatch "
"for %s.\n", pkgname, file);
test_broken = true; test_broken = true;
}
break; break;
default: default:
xbps_error_printf( xbps_error_printf(