[sdk/kdesrc-build] /: Remove unused options
ivan tkachenko
null at kde.org
Fri Nov 24 19:47:22 GMT 2023
Git commit 8f22708b09d850028a5022e772cb7cd13e7f50b9 by ivan tkachenko, on behalf of Andrew Shark.
Committed on 24/11/2023 at 20:47.
Pushed by ratijas into branch 'master'.
Remove unused options
Remove unused options from the documentation and from code:
- allow-auto-repo-move
- override-url, module-base-path (were used for svn)
- no-snapshots, disable-snapshots (were used for svn)
- install (duplicates install-only)
M +8 -128 doc/index.docbook
M +1 -15 doc/man-kdesrc-build.1.docbook
M +1 -1 modules/ksb/Application.pm
M +0 -3 modules/ksb/BuildContext.pm
M +0 -14 modules/ksb/Cmdline.pm
M +0 -1 modules/ksb/ModuleSet/KDEProjects.pm
M +1 -1 modules/ksb/Updater/Git.pm
M +1 -1 org.kde.kdesrc-build.metainfo.xml
M +0 -11 t/smoke/bug-402509-masked-cmdline-opts.t
M +4 -4 vim/syntax/kdesrc-buildrc.vim
https://invent.kde.org/sdk/kdesrc-build/-/commit/8f22708b09d850028a5022e772cb7cd13e7f50b9
diff --git a/doc/index.docbook b/doc/index.docbook
index 5a671799..13f7b73d 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -41,8 +41,6 @@
<!ENTITY kdedir '<link linkend="conf-kdedir">kdedir</link>'>
<!ENTITY qtdir '<link linkend="conf-qtdir">qtdir</link>'>
<!ENTITY build-dir '<link linkend="conf-build-dir">build-dir</link>'>
- <!ENTITY module-base-path '<link linkend="conf-module-base-path">module-base-path</link>'>
- <!ENTITY override-url '<link linkend="conf-override-url">override-url</link>'>
<!ENTITY source-dir '<link linkend="conf-source-dir">source-dir</link>'>
<!ENTITY colorful-output '<link linkend="conf-colorful-output">colorful-output</link>'>
<!ENTITY tag '<link linkend="conf-tag">tag</link>'>
@@ -1580,8 +1578,7 @@ for Git-based modules</emphasis>.</para></important>
<para>
For Git modules, <replaceable>module-name</replaceable> must be a module
from the &kde; &git; repository (for example, kdeartwork or
-kde-wallpapers), although it is possible to get around this if you
-<link linkend="conf-override-url">manually specify the &git; URL</link>.
+kde-wallpapers).
</para>
<para>
@@ -1808,11 +1805,6 @@ occurs.</para>
For instance, to checkout &kde; 4.6 branch, you would set this option to
<replaceable>4.6</replaceable>.</para>
-<para>If &kdesrc-build; fails to properly download a branch with this option, you
-may have to manually specify the &url; to download from using the <link
-linkend="conf-module-base-path">module-base-path</link> or <link
-linkend="conf-override-url">override-url</link> options.</para>
-
<note><para>For most &kde; modules you probably wish to use the <link
linkend="conf-branch-group">branch-group</link> option instead and use this
option for case-by-case exceptions.</para></note>
@@ -2239,8 +2231,7 @@ email address <quote>foo at abc.xyz</quote> would use:</para>
<entry>Module setting overrides global</entry>
<entry><para>This option, if set, uses the specified URL as a proxy server to use for
-any HTTP network communications (for example, when downloading snapshots for
-new modules, or the <link linkend="kde-projects-module-sets">KDE project
+any HTTP network communications (for example, when downloading the <link linkend="kde-projects-module-sets">KDE project
database</link>).</para>
<para>In addition, &kdesrc-build; will try to ensure that the tools it depends
@@ -2485,30 +2476,6 @@ commented it out.
</entry>
</row>
-<row id="conf-module-base-path">
-<entry>module-base-path</entry>
-<entry>Module setting overrides global</entry>
-<entry><para>Set this option to override &kdesrc-build;'s default directory path to the
-module in question. This can be used, for example, to pull specific branches
-or tagged versions of libraries. <ulink url="https://invent.kde.org/">The &kde;
-Source Viewer</ulink> is invaluable in helping to pick the right path.</para>
-
-<para>Note that &kdesrc-build; constructs the final path according to the
-following template:
-<filename class="directory"><varname>$repository</varname>/home/kde/<varname>$module-base-path</varname></filename>.
-</para>
-
-<para>The default value is either <filename
-class="directory"><varname>$module</varname></filename> or <filename
-class="directory">KDE/<varname>$module</varname></filename>, depending on
-the module name.</para>
-
-<tip><para>Use the <link linkend="conf-branch">branch</link> or <link
-linkend="conf-tag">tag</link> options instead whenever they are applicable.
-</para></tip>
-</entry>
-</row>
-
<row id="conf-niceness">
<entry>niceness</entry>
<entry>Cannot be overridden</entry>
@@ -2647,16 +2614,6 @@ the auto-detection. In this case you can manually specify the correct build type
</entry>
</row>
-<row id="conf-override-url">
-<entry>override-url</entry>
-<entry>Module setting overrides global</entry>
-<entry>If you set this option, &kdesrc-build; will use its value as the &url;
-to pass to &git; <emphasis>completely unchanged</emphasis>. You should
-generally use this if you want to download a specific release but &kdesrc-build;
-cannot figure out what you mean using <link linkend="conf-branch">branch</link>.
-</entry>
-</row>
-
<row id="conf-persistent-data-file">
<entry>persistent-data-file</entry>
<entry>Cannot be overridden</entry>
@@ -3227,7 +3184,11 @@ Only perform the build process.
<varlistentry id="cmdline-install-only">
<term><parameter>--install-only</parameter></term>
<listitem><para>
-Only perform the install process.
+If this is the only command-line option, it tries to install all of the modules
+contained in <filename>log/latest/build-status</filename>. If command-line
+options are specified after <parameter>--install-only</parameter>, they are all
+assumed to be modules to install (even if they did not successfully build on
+the last run).
</para></listitem>
</varlistentry>
@@ -3670,33 +3631,6 @@ the current &kde; build system.
</para></listitem>
</varlistentry>
-<varlistentry id="cmdline-install"><term><parameter>--install</parameter></term>
-<listitem><para>
-If this is the only command-line option, it tries to install all of the modules
-contained in <filename>log/latest/build-status</filename>. If command-line
-options are specified after <parameter>--install</parameter>, they are all
-assumed to be modules to install (even if they did not successfully build on
-the last run).
-</para></listitem>
-</varlistentry>
-
-<varlistentry id="cmdline-no-snapshots"><term><parameter>--no-snapshots</parameter></term>
-<listitem><para>
-Supplying this option causes &kdesrc-build; to always perform a normal initial
-checkout of a module instead of using a quick-start snapshot (only available
-for Git modules from the <literal>kde-projects</literal> repository).
-
-Note that this option should only be used if there is a failure using
-snapshots, as the quick-start snapshot reduces load on the KDE source
-repositories.
-</para>
-
-<note><para>Module snapshots <emphasis>are</emphasis> real checkouts. You
-should not need to specify this option, it is only a troubleshooting
-aid.</para></note>
-</listitem>
-</varlistentry>
-
<varlistentry id="cmdline-delete-my-patches">
<term><parameter>--delete-my-patches</parameter></term>
<listitem><para>
@@ -4063,7 +3997,7 @@ developers. This branch has development ongoing inside it, even while the
main branch (called master) may have development going on inside of it.
</para>
-<para>A tag, on the other hand, is a snapshot of the source code repository
+<para>A tag, on the other hand, is a specified point in the source code repository
at a position in time. This is used by the &kde; administration team to mark
off a version of code suitable for release and still allow the developers to
work on the code.
@@ -4112,60 +4046,6 @@ to specify a different branch for modules that should not use the global branch!
</para></tip>
</sect3>
-<sect3 id="advanced-branches">
-<title>Advanced branch support options</title>
-
-<para>&kdesrc-build; supports two options for situations where &branch; and &tag;
-guess the correct path improperly: &module-base-path; and &override-url;.
-</para>
-
-<itemizedlist>
-<listitem><para>
-&module-base-path; is used to help &kdesrc-build; fill in the missing part of
-a module's path. In the &kde; repository, all of the paths are of the form
-<filename class="directory">gitRoot/module-base-path/<replaceable>module-name</replaceable></filename>. Normally &kdesrc-build;
-can figure out the appropriate middle part by itself. When it cannot, you can use
-&module-base-path;, like this:
-</para>
-
-<informalexample>
-<screen>
-module kdesupport
- # kdesupport supports various tags to easily organize the required
- # software for a given KDE Platform release.
- module-base-path tags/kdesupport-for-4.5
-end module
-</screen>
-
-<para>This would cause &kdesrc-build; to download kdesupport from (in this example),
-<filename>git://invent.kde.org/home/kde/<replaceable>tags/kdesupport-for-4.5</replaceable></filename>.
-</para>
-</informalexample>
-<tip><para>In previous versions of &kdesrc-build;, the &module-base-path; was
-handled differently. If you encounter trouble using an old module-base-path
-definition perhaps you should verify that the actual path is as &kdesrc-build;
-expects by using the <link linkend="cmdline-pretend">--pretend</link> option.
-</para></tip>
-</listitem>
-
-<listitem><para>The &override-url; option, on the other hand, requires you to
-specify the exact path to download from. However, this allows you to pull from
-paths that previous versions of &kdesrc-build; would have no hope of downloading from.
-Currently, the &module-base-path; option should be sufficient for any Git
-source URL.
-</para>
-
-<important><para>
-&kdesrc-build; will not touch or correct the value you specify for &override-url;
-at all, so if you change your &repository; setting, you may need to update this
-as well.
-</para></important>
-
-</listitem>
-</itemizedlist>
-
-</sect3>
-
</sect2>
<sect2 id="stopping-the-build-early">
diff --git a/doc/man-kdesrc-build.1.docbook b/doc/man-kdesrc-build.1.docbook
index f9537776..9356a082 100644
--- a/doc/man-kdesrc-build.1.docbook
+++ b/doc/man-kdesrc-build.1.docbook
@@ -193,7 +193,7 @@ Edit the "~/.bashrc" (or other shell rc file) to add &kdesrc-build; to your $PAT
<varlistentry>
<term>
-<option>--install</option>
+<option>--install-only</option>
</term>
<listitem>
@@ -947,20 +947,6 @@ kdepim: master
</listitem>
</varlistentry>
-<varlistentry>
-<term>
-<option>--no-snapshots</option>
-</term>
-
-<listitem>
-<para>
- Normally <command>kdesrc-build</command> supports using source repository
- tarball snapshots to reduce load on &kde; infrastructure for git clones for
- some &kde; modules. Passing this option disables this feature.
-</para>
-</listitem>
-</varlistentry>
-
<varlistentry>
<term>
<option>--delete-my-patches</option>
diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm
index e0789139..9374e0e5 100644
--- a/modules/ksb/Application.pm
+++ b/modules/ksb/Application.pm
@@ -209,7 +209,7 @@ sub generateModuleList
my $ctx = $self->context();
my $deferredOptions = [ ]; # 'options' blocks
- # Process --help, --install, etc. first.
+ # Process --help, etc. first.
my $opts = ksb::Cmdline::readCommandLineOptionsAndSelectors(@argv);
my @selectors = @{$opts->{selectors}};
my $cmdlineOptions = $opts->{opts};
diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm
index 46d26f2e..6ac37826 100644
--- a/modules/ksb/BuildContext.pm
+++ b/modules/ksb/BuildContext.pm
@@ -127,7 +127,6 @@ our %defaultGlobalFlags = (
"delete-my-patches" => 0, # Should only be set from cmdline
"delete-my-settings" => 0, # Should only be set from cmdline
"disable-agent-check" => 0, # If true we don't check on ssh-agent
- "disable-snapshots" => 1, # 2016-07-31 Temp. disabled until kde.org fixed to supply snapshots
"compile-commands-export" => 1, # 2021-02-06 allow to generate compile_commands.json via cmake, for clangd tooling
"compile-commands-linking" => 0, # 2021-02-06 link generated compile_commands.json back to the source directory
"include-dependencies" => 1,
@@ -163,12 +162,10 @@ our %defaultGlobalOptions = (
"log-dir" => "log",
"make-install-prefix" => "", # Some people need sudo
"make-options" => "",
- "module-base-path" => "", # Used for tags and branches
"ninja-options" => "",
"num-cores" => "", # Used for build constraints
"num-cores-low-mem" => 2, # Used only in rc-file but documented
"override-build-system"=> "",
- "override-url" => "",
"persistent-data-file" => "",
"qtdir" => "",
"remove-after-install" => "none", # { none, builddir, all }
diff --git a/modules/ksb/Cmdline.pm b/modules/ksb/Cmdline.pm
index 6403a596..2a8bc44c 100644
--- a/modules/ksb/Cmdline.pm
+++ b/modules/ksb/Cmdline.pm
@@ -155,10 +155,6 @@ sub readCommandLineOptionsAndSelectors (@options)
$auxOptions{'include-dependencies'} = 0;
},
- install => sub {
- $opts->{run_mode} = 'install';
- $phases->phases('install');
- },
uninstall => sub {
$opts->{run_mode} = 'uninstall';
$phases->phases('uninstall');
@@ -169,10 +165,6 @@ sub readCommandLineOptionsAndSelectors (@options)
'no-install' => sub {
$phases->filterOutPhase('install');
},
- 'no-snapshots' => sub {
- # The documented form of disable-snapshots
- $auxOptions{'disable-snapshots'} = 1;
- },
'no-tests' => sub {
# The "right thing" to do
$phases->filterOutPhase('test');
@@ -186,11 +178,6 @@ sub readCommandLineOptionsAndSelectors (@options)
# Mostly equivalent to the above
'src-only' => sub {
$phases->phases('update');
-
- # We have an auto-switching function that we only want to run
- # if --src-only was passed to the command line, so we still
- # need to set a flag for it.
- $foundOptions{'allow-auto-repo-move'} = 1;
},
'build-only' => sub {
$phases->phases('build');
@@ -457,7 +444,6 @@ sub _supportedOptions
'help|h',
'ignore-modules|!=s{,}',
'd', # --include-dependencies, which is already pulled in via ksb::BuildContext::defaultGlobalFlags
- 'install',
'install-only',
'list-build',
'metadata-only',
diff --git a/modules/ksb/ModuleSet/KDEProjects.pm b/modules/ksb/ModuleSet/KDEProjects.pm
index 5d9d5e61..0f06ef40 100644
--- a/modules/ksb/ModuleSet/KDEProjects.pm
+++ b/modules/ksb/ModuleSet/KDEProjects.pm
@@ -46,7 +46,6 @@ sub _createMetadataModule
$metadataModule->setOption('repository', "kde:$moduleName");
$metadataModule->setOption('#kde-project-path', $moduleName);
$metadataModule->setScmType('metadata');
- $metadataModule->setOption('disable-snapshots', 1);
$metadataModule->setOption('branch', 'master');
my $moduleSet = ksb::ModuleSet::KDEProjects->new($ctx, '<kde-projects dependencies>');
diff --git a/modules/ksb/Updater/Git.pm b/modules/ksb/Updater/Git.pm
index 99b8679a..a53975c5 100644
--- a/modules/ksb/Updater/Git.pm
+++ b/modules/ksb/Updater/Git.pm
@@ -731,7 +731,7 @@ sub stashAndUpdate ($self, $updateSub)
my $date = strftime ("%F-%R", gmtime()); # ISO Date, hh:mm time
my $stashName = "kdesrc-build auto-stash at $date";
- # first, log a snapshot of the git status prior to kdesrc-build taking over the reins in the repo
+ # first, log the git status prior to kdesrc-build taking over the reins in the repo
my $promise = run_logged_p($module, 'git-status-before-update', undef, [qw(git status)]);
my ($oldStashCount, $newStashCount); # Used in promises below
diff --git a/org.kde.kdesrc-build.metainfo.xml b/org.kde.kdesrc-build.metainfo.xml
index 8f196d61..e0cb9d11 100644
--- a/org.kde.kdesrc-build.metainfo.xml
+++ b/org.kde.kdesrc-build.metainfo.xml
@@ -243,7 +243,7 @@
<li xml:lang="uk">Підтримка багатьох систем збирання. Це уможливлює навіть збирання без проблем широкого спектра програмного забезпечення, яке не є програмним забезпеченням KDE (наприклад, можна зібрати CMake з його власних початкових кодів git, якщо у вашому дистрибутиві немає пакунків CMake).</li>
<li xml:lang="x-test">xxSupports many build systems. It's even possible to build many non-KDE software projects in a pinch (for instance, CMake can be built from its own git sources if your distribution does not have CMake packages).xx</li>
<li xml:lang="zh-CN">支持许多构建系统。 甚至可以在必要时构建许多非 KDE 软件项目(例如,如果您的发行版没有 CMake 软件包,CMake 可以从它自己的 git 仓库构建出来)。</li>
- <li>Supports speedy initial checkouts of modules (KDE Git projects only) by using the snapshots already available on the KDE project network.</li>
+ <li>Supports speedy initial checkouts of modules (KDE Git projects only) by using the releases already available on the KDE project network.</li>
<li xml:lang="ca">Admet extraccions inicials ràpides dels mòduls (només projectes Git del KDE) mitjançant l'ús d'instantànies ja disponibles a la xarxa de projectes del KDE.</li>
<li xml:lang="ca-valencia">Admet extraccions inicials ràpides dels mòduls (només projectes Git de KDE) mitjançant l'ús d'instantànies ja disponibles en la xarxa de projectes de KDE.</li>
<li xml:lang="el">Υποστηρίζει ταχύτατες αρχικές λήψεις αρθρωμάτων (για έργα KDE git μόνο) με χρήση στιγμιοτύπου που είναι ήδη διαθέσιμο στο δίκτυο των έργων του KDE.</li>
diff --git a/t/smoke/bug-402509-masked-cmdline-opts.t b/t/smoke/bug-402509-masked-cmdline-opts.t
index 49a9ac5b..45469e4f 100644
--- a/t/smoke/bug-402509-masked-cmdline-opts.t
+++ b/t/smoke/bug-402509-masked-cmdline-opts.t
@@ -18,7 +18,6 @@ my $filename = basename(__FILE__);
my $section_header = "File: $filename (click to toggle collapse)";
print "\e[0Ksection_start:${timestamp1}:$filename\[collapsed=true]\r\e[0K$section_header\n"; # displayed in collapsible section in gitlab ci job log
-# This bug had affected --stop-on-failure and --disable-snapshots
my @args = qw(--pretend --rc-file t/data/sample-rc/kdesrc-buildrc --stop-on-failure setmod3);
{
@@ -29,16 +28,6 @@ my @args = qw(--pretend --rc-file t/data/sample-rc/kdesrc-buildrc --stop-on-fail
is ($moduleList[0]->name(), 'setmod3', 'mod list[2] == setmod3');
}
-$args[-2] = '--disable-snapshots';
-
-{
- my $app = ksb::Application->new(@args);
- my @moduleList = @{$app->{modules}};
-
- is (scalar @moduleList, 1, 'Right number of modules (just one)');
- is ($moduleList[0]->name(), 'setmod3', 'mod list[2] == setmod3');
-}
-
my $timestamp2 = POSIX::strftime("%s", localtime);
print "\e[0Ksection_end:${timestamp2}:$filename\r\e[0K\n"; # close collapsible section
diff --git a/vim/syntax/kdesrc-buildrc.vim b/vim/syntax/kdesrc-buildrc.vim
index f3c76518..49483e04 100644
--- a/vim/syntax/kdesrc-buildrc.vim
+++ b/vim/syntax/kdesrc-buildrc.vim
@@ -38,9 +38,9 @@ setlocal iskeyword+=-
syn keyword ksbrcOption contained skipwhite nextgroup=ksbrcStringValue
\ binpath branch build-dir cmake-options configure-flags
\ custom-build-command cxxflags dest-dir do-not-compile kdedir libname
- \ libpath log-dir make-install-prefix make-options module-base-path
+ \ libpath log-dir make-install-prefix make-options
\ cmake-generator cmake-toolchain ninja-options
- \ override-build-system override-url prefix qtdir repository
+ \ override-build-system prefix qtdir repository
\ revision source-dir tag remove-after-install
\ qmake-options git-user directory-layout
@@ -71,14 +71,14 @@ syn keyword ksbrcBoolOption contained skipwhite nextgroup=ksbrcBoolValue
\ use-clean-install compile-commands-export compile-commands-linking
syn keyword ksbrcGlobalBoolOption contained skipwhite nextgroup=ksbrcBoolValue
- \ async colorful-output disable-agent-check disable-snapshots pretend
+ \ async colorful-output disable-agent-check pretend
\ purge-old-logs stop-on-failure use-idle-io-priority install-session-driver
\ install-environment-driver
" MUST BE CONSISTENT WITH ABOVE. Used when a global option is used in the
" wrong spot to highlight the error.
syn keyword ksbrcErrorBoolOption contained skipwhite nextgroup=ksbrcBoolValue
- \ async colorful-output disable-agent-check disable-snapshots pretend
+ \ async colorful-output disable-agent-check pretend
\ purge-old-logs stop-on-failure use-idle-io-priority install-session-driver
\ install-environment-driver
More information about the kde-doc-english
mailing list