From 90e760339e4cbc57b0e6c37ff994e4aa1ba0db13 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Fri, 17 Apr 2015 09:44:52 +0300 Subject: make file install errors non-fatal, and xattr errors hidden user xattrs on tmpfs are not supported no non-grsec kernels, and many times root fs is mounted without user_xattr. Thus to allow things to go smoothly on non-grsec kernels xattr unsupported errors are now hidden. xattrs can be fixed still now with "apk fix --xattrs" --- src/fix.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/fix.c') diff --git a/src/fix.c b/src/fix.c index 8951d64..60bbfbf 100644 --- a/src/fix.c +++ b/src/fix.c @@ -19,6 +19,7 @@ struct fix_ctx { unsigned short solver_flags; int fix_depends : 1; + int fix_xattrs : 1; int fix_directory_permissions : 1; int errors; }; @@ -30,6 +31,9 @@ static int option_parse_applet(void *pctx, struct apk_db_options *dbopts, int op case 'd': ctx->fix_depends = 1; break; + case 'x': + ctx->fix_xattrs = 1; + break; case 'u': ctx->solver_flags |= APK_SOLVERF_UPGRADE; break; @@ -49,6 +53,7 @@ static const struct apk_option options_applet[] = { { 'd', "depends", "Fix all dependencies too" }, { 'r', "reinstall", "Reinstall the package (default)" }, { 'u', "upgrade", "Prefer to upgrade package" }, + { 'x', "xattr", "Fix packages with broken xattrs" }, { 0x10000, "directory-permissions", "Reset all directory permissions" }, }; @@ -95,7 +100,8 @@ static int fix_main(void *pctx, struct apk_database *db, struct apk_string_array if (args->num == 0) { list_for_each_entry(ipkg, &db->installed.packages, installed_pkgs_list) { - if (ipkg->broken_files || ipkg->broken_script) + if (ipkg->broken_files || ipkg->broken_script || + (ipkg->broken_xattr && ctx->fix_xattrs)) mark_fix(ctx, ipkg->pkg->name); } } else -- cgit v1.2.3-70-g09d2