diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-04-17 09:44:52 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-04-17 10:05:10 +0300 |
commit | 90e760339e4cbc57b0e6c37ff994e4aa1ba0db13 (patch) | |
tree | 20f8c566eab573721321585bea5bb01ecc302985 /src/fix.c | |
parent | 60867c47c5ab4fb2214fc1c4db1e108cd7c34cee (diff) | |
download | apk-tools-90e760339e4cbc57b0e6c37ff994e4aa1ba0db13.tar.gz apk-tools-90e760339e4cbc57b0e6c37ff994e4aa1ba0db13.tar.bz2 apk-tools-90e760339e4cbc57b0e6c37ff994e4aa1ba0db13.tar.xz apk-tools-90e760339e4cbc57b0e6c37ff994e4aa1ba0db13.zip |
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"
Diffstat (limited to 'src/fix.c')
-rw-r--r-- | src/fix.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |