-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[deprecated] compatibility: add entry-points for the kernel-xyz commands
This patch implements backward compatibility for the deprecated 'kernel-xyz' command line scripts: - kernel-doc --> linuxdoc.rest - kernel-autodoc --> linuxdoc.autodoc - kernel-lintdoc --> linuxdoc.lintdoc - kernel-grepdoc --> linuxdoc.grepdoc The old implementations had bugs and quirks. The bugs have been fixed and the quirks (quirks related to the Linux kernel documentation) have been removed in the linuxdoc.xyz scripts. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
""" | ||
deprecated | ||
~~~~~~~~~~ | ||
Deprecated Operations implemented for compatibility. | ||
""" | ||
# pylint: disable=import-outside-toplevel | ||
|
||
import sys | ||
|
||
def _report(msg): | ||
sys.stderr.write(' '.join(line.strip() for line in msg.splitlines()) + '\n') | ||
|
||
# ------------------------------------------------------------------------------ | ||
# command-lines deprecated | ||
# ------------------------------------------------------------------------------ | ||
|
||
def cmd_kernel_doc(): | ||
"""DEPRECATED: The maintenance of the ``kernel-doc`` command endet in | ||
version 20230321. The command will be removed in a future release: use | ||
command ``linuxdoc.rest``! | ||
""" | ||
_report(cmd_kernel_doc.__doc__) | ||
from .rest import main | ||
return main() | ||
|
||
def cmd_kernel_autodoc(): | ||
"""DEPRECATED: The maintenance of the ``kernel-autodoc`` command endet in | ||
version 20230321. The command will be removed in a future release: use | ||
command ``linuxdoc.autodoc``! | ||
""" | ||
_report(cmd_kernel_autodoc.__doc__) | ||
from .autodoc import main | ||
return main() | ||
|
||
def cmd_kernel_lintdoc(): | ||
"""DEPRECATED: The maintenance of the ``kernel-lintdoc`` command endet in | ||
version 20230321. The command will be removed in a future release: use | ||
command ``linuxdoc.lintdoc``! | ||
""" | ||
_report(cmd_kernel_lintdoc.__doc__) | ||
from .lint import main | ||
return main() | ||
|
||
def cmd_kernel_grepdoc(): | ||
"""DEPRECATED: The maintenance of the ``kernel-grepdoc`` command endet in | ||
version 20230321. The command will be removed in a future release: use | ||
command ``linuxdoc.grepdoc``! | ||
""" | ||
_report(cmd_kernel_grepdoc.__doc__) | ||
from .grepdoc import main | ||
return main() |