Explorar o código

Print a warning when using obsolete --print-installation-architecture

Packages should be switched to use --print-architecture. This option
will be removed sometime in the future.

Closes: #528171
Guillem Jover %!s(int64=17) %!d(string=hai) anos
pai
achega
a7a2de0e76
Modificáronse 4 ficheiros con 19 adicións e 1 borrados
  1. 8 0
      README.feature-removal-schedule
  2. 2 0
      debian/changelog
  3. 8 0
      src/enquiry.c
  4. 1 1
      src/main.c

+ 8 - 0
README.feature-removal-schedule

@@ -85,6 +85,14 @@ Why:
  signatures for several years already. Supporting only GnuPG enables us to
  signatures for several years already. Supporting only GnuPG enables us to
  rely on some of its features.
  rely on some of its features.
 
 
+What: --print-installation-architecture (dpkg option)
+Status: obsolete
+When: 1.15.x
+Warning: program
+Why:
+ Obsoleted long time ago (2005-01-22). Remaining packages should switch to
+ use 'dpkg --print-architecture'.
+
 History of feature removals
 History of feature removals
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 

+ 2 - 0
debian/changelog

@@ -104,6 +104,8 @@ dpkg (1.15.1) UNRELEASED; urgency=low
   * Only print fatal errno string in start-stop-daemon if it was non-zero.
   * Only print fatal errno string in start-stop-daemon if it was non-zero.
   * Print the valid values for the IO scheduler class in start-stop-daemon
   * Print the valid values for the IO scheduler class in start-stop-daemon
     --help output.
     --help output.
+  * Print a warning when using obsolete '--print-installation-architecture'.
+    Closes: #528171
 
 
   [ Frank Lichtenheld ]
   [ Frank Lichtenheld ]
   * Dpkg::Version: Remove unnecessary function next_elem which just
   * Dpkg::Version: Remove unnecessary function next_elem which just

+ 8 - 0
src/enquiry.c

@@ -387,6 +387,14 @@ void printarch(const char *const *argv) {
   if (fflush(stdout)) werr("stdout");
   if (fflush(stdout)) werr("stdout");
 }
 }
 
 
+void
+printinstarch(const char *const *argv)
+{
+  warning(_("obsolete option '--%s', please use '--%s' instead."),
+          "print-installation-architecture", "print-architecture");
+  printarch(argv);
+}
+
 void cmpversions(const char *const *argv) {
 void cmpversions(const char *const *argv) {
   struct relationinfo {
   struct relationinfo {
     const char *string;
     const char *string;

+ 1 - 1
src/main.c

@@ -423,7 +423,7 @@ static const struct cmdinfo cmdinfos[]= {
   ACTION( "assert-long-filenames",           0,  act_assertlongfilenames,  assertlongfilenames ),
   ACTION( "assert-long-filenames",           0,  act_assertlongfilenames,  assertlongfilenames ),
   ACTION( "assert-multi-conrep",             0,  act_assertmulticonrep,    assertmulticonrep ),
   ACTION( "assert-multi-conrep",             0,  act_assertmulticonrep,    assertmulticonrep ),
   ACTION( "print-architecture",              0,  act_printarch,            printarch   ),
   ACTION( "print-architecture",              0,  act_printarch,            printarch   ),
-  ACTION( "print-installation-architecture", 0,  act_printinstarch,        printarch   ),
+  ACTION( "print-installation-architecture", 0,  act_printinstarch,        printinstarch  ),
   ACTION( "predep-package",                  0,  act_predeppackage,        predeppackage   ),
   ACTION( "predep-package",                  0,  act_predeppackage,        predeppackage   ),
   ACTION( "compare-versions",                0,  act_cmpversions,          cmpversions     ),
   ACTION( "compare-versions",                0,  act_cmpversions,          cmpversions     ),
 /*
 /*