deprecated handling: introduce BR2_DEPRECATED_SINCE_xxxx_xx
authorThomas De Schampheleire <patrickdepinguin@gmail.com>
Fri, 3 Jan 2014 16:02:50 +0000 (17:02 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 10 Jan 2014 14:03:53 +0000 (15:03 +0100)
In order to keep better track of when a feature got deprecated, and hence
when it can be removed, a new set of symbols BR2_DEPRECATED_SINCE_xxxx_xx is
introduced. These symbols are automatically selected when BR2_DEPRECATED is
selected, and thus are transparent to the user.
A deprecated feature will no longer depend on BR2_DEPRECATED directly, but
rather on the appropriate BR2_DEPRECATED_SINCE_xxxx_xx. If that symbol does
not yet exist, it has to be created in Config.in.
When removing a deprecated feature, one should also check whether this was
the last feature using the BR2_DEPRECATED_SINCE_xxxx_xx symbol, in which
case the latter can be removed from Config.in.

A followup patch will make sure the overview is added to the list of
deprecated features in the manual, so that a buildroot core developer can
easily determine which features to remove in a given development cycle.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
21 files changed:
Config.in
arch/Config.in.mips
fs/squashfs/Config.in
package/autoconf/Config.in
package/automake/Config.in
package/bison/Config.in
package/busybox/Config.in
package/ccache/Config.in
package/flex/Config.in
package/gcc/Config.in.host
package/gdb/Config.in.host
package/gob2/Config.in
package/linux-headers/Config.in.host
package/lzma/Config.in
package/m4/Config.in
package/squashfs3/Config.in
package/ttcp/Config.in
package/vala/Config.in
package/xstroke/Config.in
support/scripts/gen-manual-lists.py
toolchain/toolchain-external/Config.in

index d55e57ca0becaf940978fe2869988301b9d729c6..b523b76253d91861d2c80e47f8344c9a12fd60a7 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -254,6 +254,46 @@ config BR2_DEPRECATED
        help
          This option hides outdated/obsolete versions of packages.
 
+if BR2_DEPRECATED
+
+config BR2_DEPRECATED_SINCE_2010_05
+       bool
+       default y
+
+config BR2_DEPRECATED_SINCE_2010_11
+       bool
+       default y
+
+config BR2_DEPRECATED_SINCE_2012_05
+       bool
+       default y
+
+config BR2_DEPRECATED_SINCE_2012_11
+       bool
+       default y
+
+config BR2_DEPRECATED_SINCE_2013_02
+       bool
+       default y
+
+config BR2_DEPRECATED_SINCE_2013_05
+       bool
+       default y
+
+config BR2_DEPRECATED_SINCE_2013_08
+       bool
+       default y
+
+config BR2_DEPRECATED_SINCE_2013_11
+       bool
+       default y
+
+config BR2_DEPRECATED_SINCE_2014_02
+       bool
+       default y
+
+endif
+
 config BR2_ENABLE_DEBUG
        bool "build packages with debugging symbols"
        help
@@ -443,7 +483,7 @@ config BR2_PREFER_STATIC_LIB
 config BR2_HAVE_DOCUMENTATION
        bool "documentation on the target"
        # We no longer want to support a toolchain on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2012_11
        help
          Install the documentation, including manual pages and info
          pages, on the target.
index 9b3fff4c244c8eb0ce16dd09381d7769da4a3cdc..d9c0c0251b2ae8006408e42e3f5ba70d530b71f2 100644 (file)
@@ -11,16 +11,16 @@ choice
 
 config BR2_mips_1
        bool "mips I (generic)"
-       depends on !BR2_ARCH_IS_64 && BR2_DEPRECATED
+       depends on !BR2_ARCH_IS_64 && BR2_DEPRECATED_SINCE_2013_11
 config BR2_mips_2
        bool "mips II"
-       depends on !BR2_ARCH_IS_64 && BR2_DEPRECATED
+       depends on !BR2_ARCH_IS_64 && BR2_DEPRECATED_SINCE_2013_11
 config BR2_mips_3
        bool "mips III"
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2013_11
 config BR2_mips_4
        bool "mips IV"
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2013_11
 config BR2_mips_32
        bool "mips 32"
        depends on !BR2_ARCH_IS_64
index fb696bdf8499135aa7193d9e79ed0b6dae0dd277..ff3b8843e79a1ed3e1155f7c0d7b5ff01eee79ad 100644 (file)
@@ -15,7 +15,7 @@ config BR2_TARGET_ROOTFS_SQUASHFS4
        bool "4.x"
 
 config BR2_TARGET_ROOTFS_SQUASHFS3
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2010_05
        bool "3.x"
 
 endchoice
index 60128e9cb71e72e8df5c541e42e11ce95f7aeb15..27f24e4b047422777c5ec2523ba6f0a09ac3ed14 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_AUTOCONF
        bool "autoconf"
        # We no longer support a toolchain on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2012_11
        select BR2_PACKAGE_PERL
        help
          Extensible program for developing configure scripts.  These
index e2f6cc7f619da9913887b410fc3e5aad0c65c4af..ed5060e4942219c43816b08be2a2170b09185f18 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_AUTOMAKE
        bool "automake"
        # We no longer support a toolchain on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2012_11
        select BR2_PACKAGE_AUTOCONF
        select BR2_PACKAGE_PERL
        help
index cd0dbc49ac36c40db9879d0056254c8ef55097e6..8d8843011712b7f238d4b4b64679b27fc345c3bc 100644 (file)
@@ -5,7 +5,7 @@ config BR2_PACKAGE_BISON
        # m4 uses fork()
        depends on BR2_USE_MMU
        # development tool, useless on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2014_02
        help
          General-purpose parser generator that converts a
          grammar description for an LALR context-free grammar into a C
@@ -14,4 +14,6 @@ config BR2_PACKAGE_BISON
          http://www.gnu.org/software/bison/
 
 comment "bison needs a toolchain w/ wchar"
+       depends on BR2_DEPRECATED_SINCE_2014_02
+       depends on BR2_USE_MMU
        depends on !BR2_USE_WCHAR
index 66c0673762aecc083d613da06e7dc49100e8fd7f..d2d8fa02e993dd525aeebc11aabf92a3772cd05b 100644 (file)
@@ -19,7 +19,7 @@ choice
 
        config BR2_BUSYBOX_VERSION_1_19_X
                bool "BusyBox 1.19.x"
-               depends on BR2_DEPRECATED
+               depends on BR2_DEPRECATED_SINCE_2014_02
 
        config BR2_BUSYBOX_VERSION_1_20_X
                bool "BusyBox 1.20.x"
index accebf5986fef910df65e4c360436edcbca496da..28d94681cc4bfb5e544dfff31fa2e2bc9702fca3 100644 (file)
@@ -3,7 +3,7 @@ config BR2_PACKAGE_CCACHE
        # needs fork()
        depends on BR2_USE_MMU
        # We no longer support a toolchain on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2013_02
        help
          ccache is a compiler cache. It speeds up recompilation by
          caching previous compilations and detecting when the same
index 6af9951a01703982b1b88f983acda18984ddd1ae..194b6a29f0742a7683bce8a00e15333a652dd763 100644 (file)
@@ -16,12 +16,13 @@ config BR2_PACKAGE_FLEX_BINARY
        # runtime dependency
        select BR2_PACKAGE_M4
        # development tool, useless on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2014_02
        depends on BR2_USE_WCHAR # m4
        help
          Install the flex binary tool in the target filesystem.
 
 comment "flex binary needs a toolchain w/ wchar"
+       depends on BR2_DEPRECATED_SINCE_2014_02
        depends on BR2_USE_MMU
        depends on !BR2_USE_WCHAR
 
index 186ba80cff0dc11f1ab42dbb1d4b79fcd702cd4f..87543d9311cc35139b091000f8ea67873a9f6df2 100644 (file)
@@ -124,7 +124,7 @@ comment "C++ support broken in uClibc with locale enabled with gcc 4.2"
 config BR2_INSTALL_OBJC
        bool "Enable Objective-C support"
        depends on !BR2_avr32
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2013_11
        help
          Enable the support for the Objective-C language in the
          cross-compiler, and install the Objective-C runtime to the
@@ -133,7 +133,7 @@ config BR2_INSTALL_OBJC
 config BR2_INSTALL_FORTRAN
        bool "Enable Fortran support"
        depends on !BR2_avr32
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2013_11
        select BR2_PACKAGE_LIBMPFR
        help
          Enable the support for the Fortran language in the
index de0e0be290c3ce14df691f553400cc1b619698ba..d5e7814ce3a74380953ef7f25eaf19e01b0271d5 100644 (file)
@@ -34,12 +34,12 @@ choice
        config BR2_GDB_VERSION_7_2
                bool "gdb 7.2.x"
                depends on !BR2_bfin
-               depends on BR2_DEPRECATED
+               depends on BR2_DEPRECATED_SINCE_2013_02
 
        config BR2_GDB_VERSION_7_3
                bool "gdb 7.3.x"
                depends on !BR2_bfin
-               depends on BR2_DEPRECATED
+               depends on BR2_DEPRECATED_SINCE_2013_02
 
        config BR2_GDB_VERSION_7_4
                bool "gdb 7.4.x"
index faeb8b3e7bf8115b6e5ca9ebcd9fbcc896470c22..bd9ba1f2607cfffa8547d1c064b53694fa4be626 100644 (file)
@@ -7,7 +7,7 @@ config BR2_PACKAGE_GOB2
        select BR2_PACKAGE_FLEX
        select BR2_PACKAGE_BISON
        # development tool, useless on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2014_02
        help
          GOB (GTK+ Object Builder) is a preprocessor which simplifies
          the writing of GObjects in C.
@@ -16,4 +16,5 @@ config BR2_PACKAGE_GOB2
 
 comment "gob2 needs a toolchain w/ wchar"
        depends on BR2_USE_MMU
+       depends on BR2_DEPRECATED_SINCE_2014_02
        depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
index f628a7459fd3fc7a7b2b5b96bfc7cbca8204fa67..6d7b447be401629d02d083906557be7819c89863 100644 (file)
@@ -20,7 +20,7 @@ choice
 
        config BR2_KERNEL_HEADERS_3_1
                bool "Linux 3.1.x kernel headers"
-               depends on BR2_DEPRECATED && !BR2_arc
+               depends on BR2_DEPRECATED_SINCE_2013_02 && !BR2_arc
 
        config BR2_KERNEL_HEADERS_3_2
                bool "Linux 3.2.x kernel headers"
@@ -28,7 +28,7 @@ choice
 
        config BR2_KERNEL_HEADERS_3_3
                bool "Linux 3.3.x kernel headers"
-               depends on BR2_DEPRECATED && !BR2_arc
+               depends on BR2_DEPRECATED_SINCE_2013_02 && !BR2_arc
 
        config BR2_KERNEL_HEADERS_3_4
                bool "Linux 3.4.x kernel headers"
@@ -36,23 +36,23 @@ choice
 
        config BR2_KERNEL_HEADERS_3_5
                bool "Linux 3.5.x kernel headers"
-               depends on BR2_DEPRECATED && !BR2_arc
+               depends on BR2_DEPRECATED_SINCE_2013_02 && !BR2_arc
 
        config BR2_KERNEL_HEADERS_3_6
                bool "Linux 3.6.x kernel headers"
-               depends on BR2_DEPRECATED && !BR2_arc
+               depends on BR2_DEPRECATED_SINCE_2013_05 && !BR2_arc
 
        config BR2_KERNEL_HEADERS_3_7
                bool "Linux 3.7.x kernel headers"
-               depends on BR2_DEPRECATED && !BR2_arc
+               depends on BR2_DEPRECATED_SINCE_2013_05 && !BR2_arc
 
        config BR2_KERNEL_HEADERS_3_8
                bool "Linux 3.8.x kernel headers"
-               depends on BR2_DEPRECATED && !BR2_arc
+               depends on BR2_DEPRECATED_SINCE_2013_08 && !BR2_arc
 
        config BR2_KERNEL_HEADERS_3_9
                bool "Linux 3.9.x kernel headers"
-               depends on BR2_DEPRECATED
+               depends on BR2_DEPRECATED_SINCE_2013_11
 
        config BR2_KERNEL_HEADERS_3_10
                bool "Linux 3.10.x kernel headers"
index 5a55103c5877cd1d3698b7acd8b036ec64b511d9..d7e88279894b42312dc2d85641126c48542acc65 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_LZMA
        bool "lzma"
        depends on BR2_INSTALL_LIBSTDCPP
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2010_11
        help
          Lempel Ziv compression method (LZMA) is a compression
          algorithm with high compression ratio.
@@ -9,5 +9,5 @@ config BR2_PACKAGE_LZMA
          http://tukaani.org/lzma/
 
 comment "lzma needs a toolchain w/ C++"
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2010_11
        depends on !BR2_INSTALL_LIBSTDCPP
index 7830b22aeb66963ade545fa9684caf68614b85f1..e2ce5b3ed6b92bad1e8a9091a1fe3894f03f0344 100644 (file)
@@ -4,12 +4,13 @@ config BR2_PACKAGE_M4
        # uses fork()
        depends on BR2_USE_MMU
        # development tool, useless on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2014_02
        help
          An implementation of the traditional Unix macro processor.
 
          http://www.gnu.org/software/m4/m4.html
 
 comment "m4 needs a toolchain w/ wchar"
+       depends on BR2_DEPRECATED_SINCE_2014_02
        depends on BR2_USE_MMU
        depends on !BR2_USE_WCHAR
index 365eb6a5a083e629b9a00dc45e61e9fbb27d0c2b..201af05412970ae35fb5a90ffa4a172b4f6b8424 100644 (file)
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SQUASHFS3
        bool "squashfs3"
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2010_05
        depends on BR2_LARGEFILE
        help
          Tools to generate SquashFS 3.x filesystems.
@@ -8,5 +8,5 @@ config BR2_PACKAGE_SQUASHFS3
          http://squashfs.sourceforge.net/
 
 comment "squashfs3 needs a toolchain w/ largefile"
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2010_05
        depends on !BR2_LARGEFILE
index cf68eff33c69dff66de537b57a1f5bb067c2c4ea..53b1c328cd2e45e634ce43ffc36d9164adb8f03b 100644 (file)
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_TTCP
        bool "ttcp"
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2012_05
        help
          Benchmarking tool for determining TCP and UDP performance.
 
index b9477bf9f1b908bbb5798f5f70154cbbdfa7b885..239c0033bd7575eb351449f4f2193052619e3000 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_VALA
        bool "vala"
        # We no longer support a toolchain on the target
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2013_05
        depends on BR2_USE_WCHAR # glib2
        depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
        depends on BR2_USE_MMU # glib2
@@ -14,6 +14,6 @@ config BR2_PACKAGE_VALA
          http://live.gnome.org/Vala
 
 comment "vala needs a toolchain w/ wchar, threads"
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2013_05
        depends on BR2_USE_MMU
        depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
index 4f3f5f6c378d0926f2a3f1d5c91cf75421e3069c..813c074f5eafeaf796afc3db5f9a429f2b5949e8 100644 (file)
@@ -2,7 +2,7 @@ config BR2_PACKAGE_XSTROKE
        bool "xstroke"
        depends on BR2_PACKAGE_XORG7
        # dead upstream, probably not many users
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2013_02
        select BR2_PACKAGE_XLIB_LIBXFT
        select BR2_PACKAGE_XLIB_LIBXTST
        select BR2_PACKAGE_XLIB_LIBXPM
index 4562d7e2ce38ec7e9dae6389b55b20937f3b6c38..94f403e0c2b87b9efac59bea423a92f8c41c4d9a 100644 (file)
@@ -234,7 +234,9 @@ class Buildroot:
         """ Return True if the symbol is marked as deprecated, otherwise False.
 
         """
-        return self._deprecated in symbol.get_referenced_symbols()
+        # This also catches BR2_DEPRECATED_SINCE_xxxx_xx
+        return bool([ symbol for x in symbol.get_referenced_symbols()
+            if x.get_name().startswith(self._deprecated.get_name()) ])
 
     def _is_package(self, symbol):
         """ Return True if the symbol is a package or a host package, otherwise
index f5a5c0f169b269ac737dd5525b21ceb93cb9742b..e3d4bb92f97b051cb6ea7fd52fcf4d158818644a 100644 (file)
@@ -721,7 +721,7 @@ config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3
        depends on BR2_microblazeel
        depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
        depends on !BR2_PREFER_STATIC_LIB
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2014_02
        select BR2_TOOLCHAIN_EXTERNAL_GLIBC
        select BR2_TOOLCHAIN_HAS_NATIVE_RPC
        select BR2_HOSTARCH_NEEDS_IA32_LIBS
@@ -735,7 +735,7 @@ config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2
        depends on BR2_microblazeel
        depends on BR2_HOSTARCH = "x86_64"
        depends on !BR2_PREFER_STATIC_LIB
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2014_02
        select BR2_TOOLCHAIN_EXTERNAL_GLIBC
        select BR2_TOOLCHAIN_HAS_NATIVE_RPC
        help
@@ -747,7 +747,7 @@ config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_14_3
        depends on BR2_microblazebe
        depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
        depends on !BR2_PREFER_STATIC_LIB
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2014_02
        select BR2_TOOLCHAIN_EXTERNAL_GLIBC
        select BR2_TOOLCHAIN_HAS_NATIVE_RPC
        select BR2_HOSTARCH_NEEDS_IA32_LIBS
@@ -761,7 +761,7 @@ config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2
        depends on BR2_microblazebe
        depends on BR2_HOSTARCH = "x86_64"
        depends on !BR2_PREFER_STATIC_LIB
-       depends on BR2_DEPRECATED
+       depends on BR2_DEPRECATED_SINCE_2014_02
        select BR2_TOOLCHAIN_EXTERNAL_GLIBC
        select BR2_TOOLCHAIN_HAS_NATIVE_RPC
        help