Bladeren bron

Remove --license and --licence options from tools

The options are pretty useless and non-standard. The user can surely
cat a file from the installed package. In addition this option has not
worked ever on non-Debian systems as it's relying on the GPL-2 file
from the base-files Debian package. So remove it, and we get some code
reduction as a nice side-effect.
Guillem Jover 16 jaren geleden
bovenliggende
commit
06b64be7ba
18 gewijzigde bestanden met toevoegingen van 10 en 120 verwijderingen
  1. 1 0
      debian/changelog
  2. 1 7
      dpkg-deb/main.c
  3. 1 5
      dpkg-split/main.c
  4. 1 5
      dselect/main.cc
  5. 0 2
      lib/dpkg/Makefile.am
  6. 0 44
      lib/dpkg/myopt-util.c
  7. 0 3
      man/dpkg-deb.1
  8. 0 3
      man/dpkg-name.1
  9. 0 3
      man/dpkg-query.1
  10. 0 3
      man/dpkg-split.1
  11. 0 3
      man/dpkg-trigger.1
  12. 0 3
      man/dpkg.1
  13. 1 6
      man/dselect.1
  14. 0 1
      po/POTFILES.in
  15. 1 8
      src/main.c
  16. 2 10
      src/query.c
  17. 1 7
      src/statcmd.c
  18. 1 7
      src/trigcmd.c

+ 1 - 0
debian/changelog

@@ -111,6 +111,7 @@ dpkg (1.15.6) UNRELEASED; urgency=low
   * On dpkg --no-act with --install, --unpack or --record-avail, and
     dpkg-deb --info or --field use mkdtemp() to create a temporary directory
     instead of insecure tempnam() or tmpnam() functions.
+  * Remove --license and --licence options from tools.
 
   [ Modestas Vainius ]
   * Implement symbol patterns (Closes: #563752). From now on, it is possible to

+ 1 - 7
dpkg-deb/main.c

@@ -56,8 +56,7 @@ printversion(const struct cmdinfo *cip, const char *value)
          BACKEND, DPKG_VERSION_ARCH);
   printf(_(
 "This is free software; see the GNU General Public License version 2 or\n"
-"later for copying conditions. There is NO warranty.\n"
-"See %s --license for copyright and license details.\n"), BACKEND);
+"later for copying conditions. There is NO warranty.\n"));
 
   m_output(stdout, _("<standard output>"));
 
@@ -87,7 +86,6 @@ usage(const struct cmdinfo *cip, const char *value)
   printf(_(
 "  -h|--help                        Show this help message.\n"
 "  --version                        Show the version.\n"
-"  --license|--licence              Show the copyright licensing terms.\n"
 "\n"));
 
   printf(_(
@@ -192,10 +190,6 @@ static const struct cmdinfo cmdinfos[]= {
   { "showformat",    0,   1, NULL,           &showformat,  NULL             },
   { "help",          'h', 0, NULL,           NULL,         usage            },
   { "version",       0,   0, NULL,           NULL,         printversion     },
-  /* UK spelling. */
-  { "licence",       0,   0, NULL,           NULL,         showcopyright    },
-  /* US spelling. */
-  { "license",       0,   0, NULL,           NULL,         showcopyright    },
   {  NULL,           0,   0, NULL,           NULL,         NULL             }
 };
 

+ 1 - 5
dpkg-split/main.c

@@ -48,8 +48,7 @@ printversion(const struct cmdinfo *cip, const char *value)
   printf(_("Copyright (C) 1994-1996 Ian Jackson.\n"));
   printf(_(
 "This is free software; see the GNU General Public License version 2 or\n"
-"later for copying conditions. There is NO warranty.\n"
-"See %s --license for copyright and license details.\n"), SPLITTER);
+"later for copying conditions. There is NO warranty.\n"));
 
   m_output(stdout, _("<standard output>"));
 
@@ -76,7 +75,6 @@ usage(const struct cmdinfo *cip, const char *value)
   printf(_(
 "  -h|--help                        Show this help message.\n"
 "  --version                        Show the version.\n"
-"  --license|--licence              Show the copyright licensing terms.\n"
 "\n"));
 
   printf(_(
@@ -153,8 +151,6 @@ static const struct cmdinfo cmdinfos[]= {
   { "discard",      'd',  0,  NULL, NULL,             setaction           },
   { "help",         'h',  0,  NULL, NULL,             usage               },
   { "version",       0,   0,  NULL, NULL,             printversion        },
-  { "licence",       0,   0,  NULL, NULL,             showcopyright       }, /* UK spelling */
-  { "license",       0,   0,  NULL, NULL,             showcopyright       }, /* US spelling */
   { "depotdir",      0,   1,  NULL, &depotdir,     NULL                   },
   { "partsize",     'S',  1,  NULL, NULL,             setpartsize         },
   { "output",       'o',  1,  NULL, &outputfile,   NULL                   },

+ 1 - 5
dselect/main.cc

@@ -161,8 +161,7 @@ static const char copyrightstring[]= N_(
 
 static const char licensestring[]= N_(
       "This is free software; see the GNU General Public License version 2 or\n"
-      "later for copying conditions. There is NO warranty.\n"
-      "See %s --license for copyright and license details.\n");
+      "later for copying conditions. There is NO warranty.\n");
 
 static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *ci, const char *value)
@@ -197,7 +196,6 @@ usage(const struct cmdinfo *ci, const char *value)
   printf(_(
 "  --help                     Show this help message.\n"
 "  --version                  Show the version.\n"
-"  --license | --licence      Show the license.\n"
 "\n"));
 
   printf(_(
@@ -308,8 +306,6 @@ static const struct cmdinfo cmdinfos[]= {
   { "expert",      'E',  0,  0,  0,          setexpert       },
   { "help",        'h',  0,  0,  0,          usage           },
   { "version",      0,   0,  0,  0,          printversion    },
-  { "licence",      0,   0,  0,  0,          showcopyright   }, /* UK spelling */
-  { "license",      0,   0,  0,  0,          showcopyright   }, /* US spelling */
   { "color",        0,   1,  0,  0,          setcolor        }, /* US spelling */
   { "colour",       0,   1,  0,  0,          setcolor        }, /* UK spelling */
   { 0,              0,   0,  0,  0,          0               }

+ 0 - 2
lib/dpkg/Makefile.am

@@ -7,7 +7,6 @@ pkgconfdir = $(sysconfdir)/@PACKAGE@
 AM_CPPFLAGS = \
 	-DLOCALEDIR=\"$(localedir)\" \
 	-DCONFIGDIR=\"$(pkgconfdir)\" \
-	-DCOPYINGFILE=\"$(datadir)/common-licenses/GPL-2\" \
 	-idirafter $(top_srcdir)/lib/compat \
 	-I$(top_builddir) \
 	-I$(top_srcdir)/lib
@@ -37,7 +36,6 @@ libdpkg_a_SOURCES = \
 	md5.c md5.h \
 	mlib.c \
 	myopt.c myopt.h \
-	myopt-util.c \
 	nfmalloc.c \
 	parse.c \
 	parsehelp.c \

+ 0 - 44
lib/dpkg/myopt-util.c

@@ -1,44 +0,0 @@
-/*
- * libdpkg - Debian packaging suite library routines
- * myopt-util.c - command line option utilities
- *
- * Copyright © 1994,1995 Ian Jackson <ian@chiark.greenend.org.uk>
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <config.h>
-#include <compat.h>
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <dpkg/i18n.h>
-#include <dpkg/dpkg.h>
-#include <dpkg/buffer.h>
-#include <dpkg/myopt.h>
-
-void
-showcopyright(const struct cmdinfo *cip, const char *value)
-{
-	int fd;
-
-	fd = open(COPYINGFILE, O_RDONLY);
-	if (fd < 0)
-		ohshite(_("cannot open GPL file"));
-	fd_fd_copy(fd, 1, -1, "showcopyright");
-	exit(0);
-}
-

+ 0 - 3
man/dpkg-deb.1

@@ -166,9 +166,6 @@ Show the usage message and exit.
 .TP
 .BR \-\-version
 Show the version and exit.
-.TP
-.BR \-\-license ", " \-\-licence
-Show the copyright licensing terms and exit.
 .
 .SH OPTIONS
 .TP

+ 0 - 3
man/dpkg-name.1

@@ -60,9 +60,6 @@ Show the usage message and exit.
 .TP
 .BR \-v ", " \-\-version
 Show the version and exit.
-.TP
-.BR \-l ", " \-\-license
-Show the copyright licensing terms and exit.
 .
 .SH EXAMPLES
 .TP

+ 0 - 3
man/dpkg-query.1

@@ -73,9 +73,6 @@ Show the usage message and exit.
 .TP
 .B \-\-version
 Show the version and exit.
-.TP
-.BR \-\-license ", " \-\-licence
-Show the copyright licensing terms and exit.
 .
 .SH OPTIONS
 .TP

+ 0 - 3
man/dpkg-split.1

@@ -130,9 +130,6 @@ Show the usage message and exit.
 .TP
 .BR \-\-version
 Show the version and exit.
-.TP
-.BR \-\-license ", " \-\-licence
-Show the copyright licensing terms and exit.
 .
 .SH OPTIONS
 .TP

+ 0 - 3
man/dpkg-trigger.1

@@ -34,9 +34,6 @@ Show the usage message and exit.
 .TP
 .B \-\-version
 Show the version and exit.
-.TP
-.BR \-\-license ", " \-\-licence
-Show the copyright licensing terms and exit.
 .
 .SH OPTIONS
 .TP

+ 0 - 3
man/dpkg.1

@@ -263,9 +263,6 @@ Give help about the \fB\-\-force\-\fP\fIthing\fP options.
 .BR \-Dh  ", " \-\-debug=help
 Give help about debugging options.
 .TP
-\fB\-\-licence\fP, \fB\-\-license\fP
-Display \fBdpkg\fP licence.
-.TP
 \fB\-\-version\fP
 Display \fBdpkg\fP version information.
 .TP

+ 1 - 6
man/dselect.1

@@ -8,7 +8,6 @@ dselect \- Debian package management frontend
 .IR <directory> ]
 .RB [ \-\-help ]
 .RB [ \-\-version ]
-.RB [ \-\-licence | \-\-license ]
 .RB [ \-\-expert ]
 .RB [ \-\-debug | \-D\fI<file>\fP ]
 .RI [ <action> ]
@@ -123,10 +122,6 @@ blink, bright, dim, bold
 .B \-\-help
 Print a brief help text and exit successfully.
 .TP
-.BR \-\-licence | \-\-license
-Displays the \fBdselect\fP copyright and license information and exits
-successfully.
-.TP
 .B \-\-version
 Print version information and exit successfully.
 .
@@ -457,7 +452,7 @@ broken, it is also much more flexible than the built in access methods.
 .SH AUTHORS
 .B dselect
 was written by Ian Jackson (ijackson@gnu.ai.mit.edu). Full list of
-contributors may be found in `dselect \-\-license'.
+contributors may be found in 'dselect \-\-version'.
 .br
 This manual page was written by Juho Vuori <javuori@cc.helsinki.fi>,
 Josip Rodin and Joost kooij.

+ 0 - 1
po/POTFILES.in

@@ -16,7 +16,6 @@ lib/dpkg/log.c
 lib/dpkg/md5.c
 lib/dpkg/mlib.c
 lib/dpkg/myopt.c
-lib/dpkg/myopt-util.c
 lib/dpkg/nfmalloc.c
 lib/dpkg/parse.c
 lib/dpkg/parsehelp.c

+ 1 - 8
src/main.c

@@ -57,8 +57,7 @@ printversion(const struct cmdinfo *ci, const char *value)
          DPKG, DPKG_VERSION_ARCH);
   printf(_(
 "This is free software; see the GNU General Public License version 2 or\n"
-"later for copying conditions. There is NO warranty.\n"
-"See %s --license for copyright and license details.\n"), DPKG);
+"later for copying conditions. There is NO warranty.\n"));
 
   m_output(stdout, _("<standard output>"));
 
@@ -106,7 +105,6 @@ usage(const struct cmdinfo *ci, const char *value)
   printf(_(
 "  -h|--help                        Show this help message.\n"
 "  --version                        Show the version.\n"
-"  --license|--licence              Show the copyright licensing terms.\n"
 "\n"));
 
   printf(_(
@@ -166,7 +164,6 @@ const char printforhelp[]= N_(
 "Type dpkg -Dhelp for a list of dpkg debug flag values;\n"
 "Type dpkg --force-help for a list of forcing options;\n"
 "Type dpkg-deb --help for help about manipulating *.deb files;\n"
-"Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].\n"
 "\n"
 "Options marked [*] produce a lot of output - pipe it through `less' or `more' !");
 
@@ -522,10 +519,6 @@ static const struct cmdinfo cmdinfos[]= {
   { "debug",             'D', 1, NULL,          NULL,      setdebug,      0 },
   { "help",              'h', 0, NULL,          NULL,      usage,         0 },
   { "version",           0,   0, NULL,          NULL,      printversion,  0 },
-  /* UK spelling. */
-  { "licence",           0,   0, NULL,          NULL,      showcopyright, 0 },
-  /* US spelling. */
-  { "license",           0,   0, NULL,          NULL,      showcopyright, 0 },
   ACTIONBACKEND( "build",		'b', BACKEND),
   ACTIONBACKEND( "contents",		'c', BACKEND),
   ACTIONBACKEND( "control",		'e', BACKEND),

+ 2 - 10
src/query.c

@@ -564,8 +564,7 @@ printversion(const struct cmdinfo *ci, const char *value)
          DPKGQUERY, DPKG_VERSION_ARCH);
   printf(_(
 "This is free software; see the GNU General Public License version 2 or\n"
-"later for copying conditions. There is NO warranty.\n"
-"See %s --license for copyright and license details.\n"), DPKGQUERY);
+"later for copying conditions. There is NO warranty.\n"));
 
   m_output(stdout, _("<standard output>"));
 
@@ -594,7 +593,6 @@ usage(const struct cmdinfo *ci, const char *value)
   printf(_(
 "  -h|--help                        Show this help message.\n"
 "  --version                        Show the version.\n"
-"  --license|--licence              Show the copyright licensing terms.\n"
 "\n"));
 
   printf(_(
@@ -618,9 +616,7 @@ usage(const struct cmdinfo *ci, const char *value)
 }
 
 const char thisname[]= "dpkg-query";
-const char printforhelp[]= N_("\
-Use --help for help about querying packages;\n\
-Use --license for copyright license and lack of warranty (GNU GPL).");
+const char printforhelp[]= N_("Use --help for help about querying packages.");
 
 const struct cmdinfo *cipaction = NULL;
 
@@ -655,10 +651,6 @@ static const struct cmdinfo cmdinfos[]= {
   { "showformat", 'f', 1, NULL, &showformat, NULL          },
   { "help",       'h', 0, NULL, NULL,        usage         },
   { "version",    0,   0, NULL, NULL,        printversion  },
-  /* UK spelling. */
-  { "licence",    0,   0, NULL, NULL,        showcopyright },
-  /* US spelling */
-  { "license",    0,   0, NULL, NULL,        showcopyright },
   {  NULL,        0,   0, NULL, NULL,        NULL          }
 };
 

+ 1 - 7
src/statcmd.c

@@ -47,9 +47,7 @@
 #include "filesdb.h"
 
 const char thisname[] = "dpkg-statoverrides";
-const char printforhelp[] = N_(
-"Use --help for help about querying packages;\n"
-"Use --license for copyright license and lack of warranty (GNU GPL).");
+const char printforhelp[] = N_("Use --help for help about querying packages.");
 
 static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *cip, const char *value)
@@ -402,10 +400,6 @@ static const struct cmdinfo cmdinfos[] = {
 	{ "update",     0,   0,  &opt_update,  NULL,      NULL, 1       },
 	{ "help",       'h', 0,  NULL,         NULL,      usage         },
 	{ "version",    0,   0,  NULL,         NULL,      printversion  },
-	/* UK spelling */
-	{ "licence",    0,   0,  NULL,         NULL,      showcopyright },
-	/* US spelling */
-	{ "license",    0,   0,  NULL,         NULL,      showcopyright },
 	{  NULL,        0                                               }
 };
 

+ 1 - 7
src/trigcmd.c

@@ -53,8 +53,7 @@ printversion(const struct cmdinfo *ci, const char *value)
 
 	printf(_(
 "This is free software; see the GNU General Public License version 2 or\n"
-"later for copying conditions. There is NO warranty.\n"
-"See %s --license for copyright and license details.\n"), thisname);
+"later for copying conditions. There is NO warranty.\n"));
 
 	m_output(stdout, _("<standard output>"));
 
@@ -77,7 +76,6 @@ usage(const struct cmdinfo *ci, const char *value)
 	printf(_(
 "  -h|--help                        Show this help message.\n"
 "  --version                        Show the version.\n"
-"  --license|--licence              Show the copyright licensing terms.\n"
 "\n"));
 
 	printf(_(
@@ -174,10 +172,6 @@ static const struct cmdinfo cmdinfos[] = {
 	{ "check-supported", 0,   0, &f_check, NULL,       NULL, 1 },
 	{ "help",            'h', 0, NULL,     NULL,       usage   },
 	{ "version",         0,   0, NULL,     NULL,       printversion  },
-	/* UK spelling */
-	{ "licence",         0,   0, NULL,     NULL,       showcopyright },
-	/* US spelling */
-	{ "license",         0,   0, NULL,     NULL,       showcopyright },
 	{  NULL  }
 };