]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add a new tar option --clear-nochange-fflags that causes file system 109/head
authorBrooks Davis <brooks@one-eyed-alien.net>
Tue, 10 Feb 2015 17:43:10 +0000 (17:43 +0000)
committerBrooks Davis <brooks@one-eyed-alien.net>
Thu, 14 May 2015 18:53:06 +0000 (18:53 +0000)
flags which might prevent the removal or modifiction of files to
be cleared before attempting to remove them.

Sponsored by: DARPA, AFRL

tar/bsdtar.1
tar/bsdtar.c
tar/bsdtar.h
tar/cmdline.c

index 09402400f77225a24dfaadf3a9b58db5b9421e51..9e45f191d7b36796408e9649d8ed95d8159e938b 100644 (file)
@@ -184,6 +184,10 @@ but before extracting entries from the archive.
 to the current directory after processing any
 .Fl C
 options and before extracting any files.
+.It Fl Fl clear-nochange-fflags
+(x mode only)
+Before removing file system objects to replace them, clear platform-specific
+file flags that might prevent removal.
 .It Fl Fl disable-copyfile
 Mac OS X specific.
 Disable the use of
index a8c846b0c2405f356573937f75f7a303475e06ee..93bf60a94da84e4aecad2ce6a033aad042ae5d5b 100644 (file)
@@ -290,6 +290,10 @@ main(int argc, char **argv)
                case OPTION_CHROOT: /* NetBSD */
                        bsdtar->option_chroot = 1;
                        break;
+               case OPTION_CLEAR_NOCHANGE_FFLAGS:
+                       bsdtar->extract_flags |=
+                           ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS;
+                       break;
                case OPTION_DISABLE_COPYFILE: /* Mac OS X */
                        bsdtar->readdisk_flags &= ~ARCHIVE_READDISK_MAC_COPYFILE;
                        break;
index 8e64b0a7986bd9110fc1750521dd76c4bd48dc02..c05bfe888f61ea04f3768f139a4f9191c15d6c4b 100644 (file)
@@ -119,6 +119,7 @@ enum {
        OPTION_B64ENCODE = 1,
        OPTION_CHECK_LINKS,
        OPTION_CHROOT,
+       OPTION_CLEAR_NOCHANGE_FFLAGS,
        OPTION_DISABLE_COPYFILE,
        OPTION_EXCLUDE,
        OPTION_FORMAT,
index bb905812d52bfd3fb1e640336354636461463b21..fd0712a0dd6cb2ff24b44c70e5d2f06118830d15 100644 (file)
@@ -74,6 +74,7 @@ static const struct bsdtar_option {
        { "cd",                   1, 'C' },
        { "check-links",          0, OPTION_CHECK_LINKS },
        { "chroot",               0, OPTION_CHROOT },
+       { "clear-nochange-fflags", 0, OPTION_CLEAR_NOCHANGE_FFLAGS },
        { "compress",             0, 'Z' },
        { "confirmation",         0, 'w' },
        { "create",               0, 'c' },