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