bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] deprecating install --preserve_context as per the FIXME


From: Pádraig Brady
Subject: [PATCH] deprecating install --preserve_context as per the FIXME
Date: Tue, 7 Apr 2009 14:19:25 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

`install --preserve-context` is the preferred method.
>From 06dad629bb1b3d5bf6529e20677893374d0fec48 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
Date: Tue, 7 Apr 2009 14:14:58 +0100
Subject: [PATCH] install: deprecate the --preserve_context option

src/install.c: Print a warning when --preserve_context
rather than --preserve-context is used as per FIXME.
---
 src/install.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/install.c b/src/install.c
index 59478a3..eb345a6 100644
--- a/src/install.c
+++ b/src/install.c
@@ -134,6 +134,7 @@ static char const *strip_program = "strip";
 enum
 {
   PRESERVE_CONTEXT_OPTION = CHAR_MAX + 1,
+  PRESERVE_CONTEXT_OPTION_DEPRECATED,
   STRIP_PROGRAM_OPTION
 };
 
@@ -149,10 +150,9 @@ static struct option const long_options[] =
   {"owner", required_argument, NULL, 'o'},
   {"preserve-timestamps", no_argument, NULL, 'p'},
   {"preserve-context", no_argument, NULL, PRESERVE_CONTEXT_OPTION},
-  /* Continue silent support for --preserve_context until Jan 2008. FIXME-obs
-     After that, FIXME-obs: warn in, say, late 2008, and disable altogether
-     a year or two later.  */
-  {"preserve_context", no_argument, NULL, PRESERVE_CONTEXT_OPTION},
+  /* --preserve_context was silently supported until Apr 2009.
+     FIXME: disable altogether in a year or so.  */
+  {"preserve_context", no_argument, NULL, PRESERVE_CONTEXT_OPTION_DEPRECATED},
   {"strip", no_argument, NULL, 's'},
   {"strip-program", required_argument, NULL, STRIP_PROGRAM_OPTION},
   {"suffix", required_argument, NULL, 'S'},
@@ -530,6 +530,10 @@ main (int argc, char **argv)
          no_target_directory = true;
          break;
 
+       case PRESERVE_CONTEXT_OPTION_DEPRECATED:
+         error (0, 0, _("WARNING: --preserve_context is deprecated. "
+                        "Please use --preserve-context instead."));
+         /* fall through */
        case PRESERVE_CONTEXT_OPTION:
          if ( ! selinux_enabled)
            {
-- 
1.5.3.6


reply via email to

[Prev in Thread] Current Thread [Next in Thread]