[sdk/kdesrc-build] /: buildsystem: Complete removal of checkout-only support, incl l10n.

Michael Pyne null at kde.org
Mon Jan 17 00:35:00 GMT 2022


Git commit 7406a96f53177ee4a084a3f02f043982f182e923 by Michael Pyne.
Committed on 17/01/2022 at 00:33.
Pushed by mpyne into branch 'master'.

buildsystem: Complete removal of checkout-only support, incl l10n.

l10n support (for kde-languages) hasn't worked for the entire KF5 era.
Subversion is still available for those using it, kdesrc-build just
won't try to do automagic here anymore.

M  +0    -1    CMakeLists.txt
M  +16   -73   doc/index.docbook
M  +0    -51   modules/ksb/Application.pm
M  +1    -25   modules/ksb/BuildSystem.pm
M  +0    -1    modules/ksb/BuildSystem/KDECMake.pm
M  +1    -4    modules/ksb/Module.pm
M  +0    -4    modules/ksb/ModuleResolver.pm
M  +7    -56   modules/ksb/Updater/Svn.pm
M  +0    -2    modules/ksb/Util.pm
D  +0    -219  modules/ksb/l10nSystem.pm
M  +0    -1    t/smoke/load-all-ksb-modules.t

https://invent.kde.org/sdk/kdesrc-build/commit/7406a96f53177ee4a084a3f02f043982f182e923

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41d1888..e97ae1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,7 +60,6 @@ if (KDESRC_BUILD_INSTALL_MODULES)
         modules/ksb/Updater.pm
         modules/ksb/Util.pm
         modules/ksb/Version.pm
-        modules/ksb/l10nSystem.pm
     DESTINATION ${KDESRC_BUILD_MODULE_INSTALL_PREFIX}/ksb)
 
     install(FILES
diff --git a/doc/index.docbook b/doc/index.docbook
index 781e91c..35e6339 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -1966,16 +1966,9 @@ change at all.</para></important>
 <row id="conf-checkout-only">
 <entry>checkout-only</entry>
 <entry>Module setting overrides global</entry>
-<entry><para>Set this option to checkout &subversion; sources piece by piece. The
-value for this option should be a space-separated list of directories to
-checkout.  Although this option overrides the global option, be aware that
-setting this as a global option makes no sense.
-</para>
-
-<para>Note that this setting has no effect on &git; modules due to the
-operation of the &git; source control system.</para>
-
-<para>See <xref linkend="checking-out-parts"/> for an example.</para></entry>
+<entry><para>This option was removed in January 2022. It used to control
+the ability to checkout subsets of a module from a Subversion repository.</para>
+</entry>
 </row>
 
 <row id="conf-cmake-generator">
@@ -2164,13 +2157,13 @@ for every module. You can disable this check by setting
 <entry><para>Use this option to select a specific set of directories not to be built in a
 module (instead of all of them). The directories not to build should be space-separated.</para>
 
-<para>Note that the sources to the programs will still be downloaded. You can use
-the <link linkend="conf-checkout-only">checkout-only</link>
-directive to choose directories that you want to check out.</para>
+<para>Note that the sources to the programs will still be downloaded.</para>
 
-<para>For example, to hold &juk; and &kscd; in the kdemultimedia module from
-compiling, you would add "do-not-compile juk kscd" to your kdemultimedia
-settings.</para>
+<para>For example, to disable building the <literal>codeeditor</literal> and <literal>minimaltest</literal>
+directories of the <literal>syntaxhighlighting</literal> framework, you
+would add <userinput>do-not-compile codeeditor minimaltest</userinput>
+compiling, you would add "do-not-compile juk kscd" to your syntaxhighlighting
+options.</para>
 
 <para>See <xref linkend="not-compiling"/> for an example.</para>
 </entry>
@@ -4154,69 +4147,19 @@ has features to make this easy. There are several complementing ways to
 do this.
 </para>
 
-<sect3 id="checking-out-parts">
-<title>Checking out portions of a module</title>
-
-<para>This is perhaps the best way to do this. When it works, it will save you
-download time and disk space. What happens is that &kdesrc-build; will download
-only the parts of a module that you specify. This is done using the &checkout-only;
-option for a module, which will specify a list of directories to download.
-</para>
-
-<tip><para>
-If you do not already know what to download from a module, it may be a good idea
-to browse the &subversion; layout for a module first, using
-<ulink url="https://websvn.kde.org/branches/KDE/4.6/">WebSVN</ulink>. <!--FIXME outdated-->
-</para></tip>
-
-<informalexample>
-<para>To only grab &kuser; and <application>KSystemLog</application> from
-kdeadmin, you could use &checkout-only; like this:</para>
-
-<screen>
-module <replaceable>kdeadmin</replaceable>
-  &checkout-only; <replaceable>kuser ksystemlog</replaceable>
-end module
-</screen>
-
-</informalexample>
-
-<important><para>The directories will be built in the order they are listed
-in the option. If one of the directories needs something else from the module
-to compile, then you need to make sure they are both in the &checkout-only;
-line, and that the required dependency goes before the directory that needs it.</para>
-
-<para>Also, sometimes an application may need other directories and it is hard
-to figure out what they are, which may require some trial and error of constantly
-adding directories to the option to figure out. This option depends on support
-from the build system of the module, so it is only useful for modules that are
-collections of individual applications.</para>
-</important>
-
-<para>One final note to make about this option: If you change the value of this
-option, you should use <userinput><command>kdesrc-build</command>
-<option>&cmd-refresh-build;</option> <option><replaceable>module</replaceable></option></userinput>
-in order to ensure that the module is reconfigured properly. In addition,
-&kdesrc-build; will never remove existing files if you take away the number of
-directories from your &checkout-only; option, or add the option to a module that
-has already been checked out.</para>
-
-</sect3>
-
 <sect3 id="not-compiling">
 <title>Removing directories from a build</title>
-<para>Instead of restricting what is downloaded, it is possible to download
-everything but have the build system leave out a few directories when it does
-the build. This may be useful if one directory always breaks and is
-unnecessary to the rest of the module.
+<para>It is possible to download an entire repository
+but have the build system leave out a few directories when it does
+the build. This requires that the module uses &cmake; and that the
+module's build system allows the directory to remove to be
+optional.
 </para>
 
-<para>This is controlled with the &do-not-compile; option. It works similar
-to the &checkout-only; option just described, in that it is simply a list of
-directories that should not be compiled.</para>
+<para>This is controlled with the &do-not-compile; option.</para>
 
 <important><para>
-Also like &checkout-only;, this option requires at least that the
+This option requires at least that the
 build system for the module is reconfigured after changing
 it. This is done using the <userinput><command>kdesrc-build</command>
 <option>&cmd-reconfigure;</option>
diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm
index 8b96de5..96ffd0e 100644
--- a/modules/ksb/Application.pm
+++ b/modules/ksb/Application.pm
@@ -556,10 +556,6 @@ EOF
     else {
         # Build everything in the rc-file, in the order specified.
         @modules = $moduleResolver->expandModuleSets(@optionModulesAndSets);
-
-        if ($ctx->getOption('kde-languages')) {
-            @modules = _expandl10nModules($ctx, @modules);
-        }
     }
 
     # If modules were on the command line then they are effectively forced to
@@ -1742,7 +1738,6 @@ EOF
     info ("<<<  g[PACKAGES SUCCESSFULLY BUILT]  >>>") if scalar @build_done > 0;
 
     my $successes = scalar @build_done;
-    # TODO: l10n
     my $mods = $successes == 1 ? 'module' : 'modules';
 
     if (not pretending())
@@ -2172,52 +2167,6 @@ sub _defineNewModuleFactory
     };
 }
 
-# This function converts any 'l10n' references on the command line to return a l10n
-# module with the proper build system, scm type, etc.
-#
-# The languages are selected using global/kde-languages (which should be used
-# exclusively from the configuration file).
-sub _expandl10nModules
-{
-    my ($ctx, @modules) = @_;
-    my $l10n = 'l10n-kde4';
-
-    assert_isa($ctx, 'ksb::BuildContext');
-
-    # Only filter if 'l10n' is actually present in list.
-    my @matches = grep {$_->name() =~ /^(?:$l10n|l10n)$/} @modules;
-    my @langs = split(' ', $ctx->getOption('kde-languages'));
-
-    return @modules if (!@matches || !@langs);
-
-    my $l10nModule;
-    for my $match (@matches)
-    {
-        # Remove all instances of l10n.
-        @modules = grep {$_->name() ne $match->name()} @modules;
-
-        # Save l10n module if user had it in config. We only save the first
-        # one encountered though.
-        $l10nModule //= $match;
-    }
-
-    # No l10n module? Just create one.
-    $l10nModule //= ksb::Module->new($ctx, $l10n);
-
-    whisper ("\tAdding languages ", join(';', @langs), " to build.");
-
-    $l10nModule->setScmType('l10n');
-    my $scm = $l10nModule->scm();
-
-    # Add all required directories to the l10n module. Its buildsystem should
-    # know to skip scripts and templates.
-    $scm->setLanguageDirs(qw/scripts templates/, @langs);
-    $l10nModule->setBuildSystem($scm);
-
-    push @modules, $l10nModule;
-    return @modules;
-}
-
 # Updates the built-in phase list for all Modules passed into this function in
 # accordance with the options set by the user.
 sub _updateModulePhases
diff --git a/modules/ksb/BuildSystem.pm b/modules/ksb/BuildSystem.pm
index 40ac819..ee4bbca 100644
--- a/modules/ksb/BuildSystem.pm
+++ b/modules/ksb/BuildSystem.pm
@@ -137,13 +137,6 @@ sub needsRefreshed
     return "";
 }
 
-# Returns true if the given subdirectory (reference from the module's root source directory)
-# can be built or not. Should be reimplemented by subclasses as appropriate.
-sub isSubdirBuildable
-{
-    return 1;
-}
-
 # Called by the module being built before it runs its build/install process. Should
 # setup any needed environment variables, build context settings, etc., in preparation
 # for the build and install phases. Should take `hasToolchain()` into account here.
@@ -227,9 +220,6 @@ sub buildInternal
         message => 'Compiling...',
         'make-options' => \@makeOptions,
         logbase => 'build',
-        subdirs => [
-            split(' ', $self->module()->getOption("checkout-only"))
-        ],
     })->{was_successful};
 }
 
@@ -276,7 +266,6 @@ sub installInternal
             target => 'install',
             message => 'Installing..',
             'prefix-options' => [@cmdPrefix],
-            subdirs => [ split(' ', $module->getOption("checkout-only")) ],
            })->{was_successful};
 }
 
@@ -293,7 +282,6 @@ sub uninstallInternal
             target => 'uninstall',
             message => "Uninstalling g[$module]",
             'prefix-options' => [@cmdPrefix],
-            subdirs => [ split(' ', $module->getOption("checkout-only")) ],
            })->{was_successful};
 }
 
@@ -370,13 +358,7 @@ sub createBuildSystem
 }
 
 # Subroutine to run the build command with the arguments given by the
-# passed hash.
-#
-# In addition to finding the proper executable, this function handles the
-# step of running the build command for individual subdirectories (as
-# specified by the checkout-only option to the module).  Due to the various
-# ways the build command is called by this script, it is required to pass
-# customization options in a hash:
+# passed hash, laid out as:
 # {
 #    target         => undef, or a valid build target e.g. 'install',
 #    message        => 'Compiling.../Installing.../etc.'
@@ -386,8 +368,6 @@ sub createBuildSystem
 #                        make command, used for make-install-prefix support for
 #                        e.g. sudo ],
 #    logbase        => 'base-log-filename',
-#    subdirs        => [ list of subdirectories of the module to build,
-#                        relative to the module's own build directory. ]
 # }
 #
 # target and message are required. logbase is required if target is left
@@ -402,9 +382,6 @@ sub createBuildSystem
 # The first command name found which resolves to an executable on the
 # system will be used, if no command this function will fail.
 #
-# The first argument should be the ksb::Module object to be made.
-# The second argument should be the reference to the hash described above.
-#
 # Returns a hashref:
 # {
 #   was_successful => $bool, (if successful)
@@ -441,7 +418,6 @@ sub safe_make($self, $optsRef)
     # Simplify code by forcing lists to exist.
     $optsRef->{'prefix-options'} //= [ ];
     $optsRef->{'make-options'} //= [ ];
-    $optsRef->{'subdirs'} //= [ ];
 
     my @prefixOpts = @{$optsRef->{'prefix-options'}};
 
diff --git a/modules/ksb/BuildSystem/KDECMake.pm b/modules/ksb/BuildSystem/KDECMake.pm
index 9f97e42..2773f18 100644
--- a/modules/ksb/BuildSystem/KDECMake.pm
+++ b/modules/ksb/BuildSystem/KDECMake.pm
@@ -351,7 +351,6 @@ sub installInternal
             logfile => 'install',
             message => 'Installing..',
             'prefix-options' => [@cmdPrefix],
-            subdirs => [ split(' ', $module->getOption("checkout-only")) ],
            })->{was_successful};
 }
 
diff --git a/modules/ksb/Module.pm b/modules/ksb/Module.pm
index 59a7d72..67e09af 100644
--- a/modules/ksb/Module.pm
+++ b/modules/ksb/Module.pm
@@ -14,8 +14,6 @@ use ksb::IPC;
 use ksb::Debug;
 use ksb::Util;
 
-use ksb::l10nSystem;
-
 use ksb::Updater::Svn;
 use ksb::Updater::Git;
 use ksb::Updater::Bzr;
@@ -255,7 +253,6 @@ sub setScmType
         when('git')  { $newType = ksb::Updater::Git->new($self); }
         when('proj') { $newType = ksb::Updater::KDEProject->new($self); }
         when('metadata') { $newType = ksb::Updater::KDEProjectMetadata->new($self); }
-        when('l10n') { $newType = ksb::l10nSystem->new($self); }
         when('svn')  { $newType = ksb::Updater::Svn->new($self); }
         when('bzr')  { $newType = ksb::Updater::Bzr->new($self); }
         when('qt5')  { $newType = ksb::Updater::Qt5->new($self); }
@@ -383,7 +380,7 @@ sub setBuildSystem
 }
 
 # Current possible build system types:
-# KDE (i.e. cmake), Qt, l10n (KDE language buildsystem), autotools (either
+# KDE (i.e. cmake), Qt, autotools (either
 # configure or autogen.sh). A final possibility is 'pendingSource' which
 # simply means that we don't know yet.
 #
diff --git a/modules/ksb/ModuleResolver.pm b/modules/ksb/ModuleResolver.pm
index d8d474b..87f3e3b 100644
--- a/modules/ksb/ModuleResolver.pm
+++ b/modules/ksb/ModuleResolver.pm
@@ -244,10 +244,6 @@ sub _resolveSingleSelector
         $selector = ksb::Module->new($ctx, $selectorName);
         $selector->phases()->phases($ctx->phases()->phases());
 
-        if ($selectorName eq 'l10n') {
-            $_->setScmType('l10n')
-        }
-
         $selector->setScmType('proj');
         $selector->setOption('#guessed-kde-project', 1);
         $selector->setOption('#selected-by', 'initial-guess');
diff --git a/modules/ksb/Updater/Svn.pm b/modules/ksb/Updater/Svn.pm
index f02feb9..6382d5a 100644
--- a/modules/ksb/Updater/Svn.pm
+++ b/modules/ksb/Updater/Svn.pm
@@ -319,53 +319,18 @@ EOF
     $self->_verifyCorrectServerURL();
 }
 
-# Subroutine used to handle the checkout-only option.  It handles updating
-# subdirectories of an already-checked-out module.
-#
-# This function can throw an exception in the event of a update failure.
-#
-# First parameter is the module.
-# All remaining parameters are subdirectories to check out.
-#
-# Returns the number of files changed by the update, or undef if unable to
-# be determined.
-sub update_module_subdirectories
-{
-    my $self = assert_isa(shift, 'ksb::Updater::Svn');
-    my $module = $self->module();
-    my $numChanged = 0;
-
-    # If we have elements in @path, download them now
-    for my $dir (@_)
-    {
-        info ("\tUpdating g[$dir]");
-
-        my $logname = $dir;
-        $logname =~ tr{/}{-};
-
-        my $count = $self->run_svn("svn-up-$logname", [ 'svn', 'up', $dir ]);
-        $numChanged = undef unless defined $count;
-        $numChanged += $count if defined $numChanged;
-    }
-
-    return $numChanged;
-}
-
-# Checkout a module that has not been checked out before, along with any
-# subdirectories the user desires.
+# Checkout a module that has not been checked out before.
 #
 # This function will throw an exception in the event of a failure to update.
 #
 # The first parameter is the module to checkout (including extragear and
 # playground modules).
-# All remaining parameters are subdirectories of the module to checkout.
 #
 # Returns number of files affected, or undef.
 sub checkout_module_path
 {
     my $self = assert_isa(shift, 'ksb::Updater::Svn');
     my $module = $self->module();
-    my @path = @_;
     my %pathinfo = $module->getInstallPathComponents('source');
     my @args;
 
@@ -380,7 +345,6 @@ sub checkout_module_path
     my $modulename = $pathinfo{'module'}; # i.e. kdelibs for KDE/kdelibs as $module
 
     push @args, ('svn', 'co', '--non-interactive');
-    push @args, '-N' if scalar @path; # Tells svn to only update the base dir
     push @args, $svn_url;
     push @args, $modulename;
 
@@ -388,26 +352,18 @@ sub checkout_module_path
 
     my $count = $self->run_svn('svn-co', \@args);
 
-    p_chdir ($pathinfo{'module'}) if scalar @path;
-
-    my $count2 = $self->update_module_subdirectories(@path);
-
-    return $count + $count2 if defined $count and defined $count2;
-    return undef;
+    return $count;
 }
 
-# Update a module that has already been checked out, along with any
-# subdirectories the user desires.
+# Update a module that has already been checked out.
 #
 # This function will throw an exception in the event of an update failure.
 #
 # The first parameter is the module to checkout (including extragear and
 # playground modules).
-# All remaining parameters are subdirectories of the module to checkout.
 sub update_module_path
 {
-    my ($self, @path) = @_;
-    assert_isa($self, 'ksb::Updater::Svn');
+    my $self = assert_isa(shift, 'ksb::Updater::Svn');
     my $module = $self->module();
     my $fullpath = $module->fullpath('source');
     my @args;
@@ -415,7 +371,6 @@ sub update_module_path
     p_chdir ($fullpath);
 
     push @args, ('svn', 'up', '--non-interactive');
-    push @args, '-N' if scalar @path;
 
     note ("Updating g[$module]");
 
@@ -435,10 +390,7 @@ sub update_module_path
         $count = $self->run_svn('svn-up-2', \@args);
     }
 
-    my $count2 = $self->update_module_subdirectories(@path);
-
-    return $count + $count2 if defined $count and defined $count2;
-    return undef;
+    return $count;
 }
 
 # Run the svn command.  This is a special subroutine so that we can munge
@@ -580,11 +532,10 @@ sub updateInternal
     my $self = assert_isa(shift, 'ksb::Updater::Svn');
     my $module = $self->module();
     my $fullpath = $module->fullpath('source');
-    my @options = split(' ', $module->getOption('checkout-only'));
 
     if (-e "$fullpath/.svn") {
         $self->check_module_validity();
-        my $updateCount = $self->update_module_path(@options);
+        my $updateCount = $self->update_module_path();
 
         my $log_filter = sub {
             return unless defined $_;
@@ -606,7 +557,7 @@ sub updateInternal
         return $updateCount;
     }
     else {
-        return $self->checkout_module_path(@options);
+        return $self->checkout_module_path();
     }
 }
 
diff --git a/modules/ksb/Util.pm b/modules/ksb/Util.pm
index 95ba2c7..8a14d07 100644
--- a/modules/ksb/Util.pm
+++ b/modules/ksb/Util.pm
@@ -712,8 +712,6 @@ sub yesNoPrompt {
 # similar fashion to how the XFree/X.org lndir() program does it.  This is
 # reimplemented here since some systems lndir doesn't seem to work right.
 #
-# Used from ksb::l10nSystem
-#
 # As a special exception to the GNU GPL, you may use and redistribute this
 # function however you would like (i.e. consider it public domain).
 #
diff --git a/modules/ksb/l10nSystem.pm b/modules/ksb/l10nSystem.pm
deleted file mode 100644
index a0c041d..0000000
--- a/modules/ksb/l10nSystem.pm
+++ /dev/null
@@ -1,219 +0,0 @@
-package ksb::l10nSystem 0.10;
-
-# This class is an implementation of both the source and build interfaces needed to
-# support building KDE l10n modules.
-
-use ksb;
-
-use parent qw(ksb::Updater::Svn ksb::BuildSystem);
-
-use ksb::Debug;
-use ksb::Util;
-
-sub new
-{
-    my ($class, $module) = @_;
-
-    # Ensure associated module updates from the proper svn path.
-    # TODO: Support different localization branches?
-
-    $module->setOption('module-base-path', 'trunk/l10n-kde4');
-    my $refreshMessage = "an update happened";
-    return bless { module => $module, needsRefreshed => $refreshMessage }, $class;
-}
-
-sub module
-{
-    my $self = shift;
-    return $self->{module};
-}
-
-sub configuredModuleFileName
-{
-    # Not quite correct (we should be looking at each individual language
-    # but it at least keeps the process going.
-    return 'teamnames';
-}
-
-# Sets the directories that are to be checked out/built/etc.
-# There should be one l10nSystem for the entire l10n build (i.e. add
-# all required support dirs and languages).
-sub setLanguageDirs
-{
-    my ($self, @languageDirs) = @_;
-    $self->{l10n_dirs} = \@languageDirs;
-}
-
-# Returns true if the given subdirectory (reference from the module's root source directory)
-# can be built or not. Should be reimplemented by subclasses as appropriate.
-sub isSubdirBuildable
-{
-    my ($self, $subdir) = @_;
-    return ($subdir ne 'scripts' && $subdir ne 'templates');
-}
-
-sub prepareModuleBuildEnvironment
-{
-    my ($ctx, $module, $prefix) = @_;
-
-    $ctx->prependEnvironmentValue('CMAKE_PREFIX_PATH', $prefix);
-}
-
-# scm-specific update procedure.
-# May change the current directory as necessary.
-sub updateInternal
-{
-    my $self = assert_isa(shift, 'ksb::Updater');
-    my $module = $self->module();
-    my $fullpath = $module->fullpath('source');
-    my @dirs = @{$self->{l10n_dirs}};
-
-    if (-e "$fullpath/.svn") {
-        $self->check_module_validity();
-        my $count = $self->update_module_path(@dirs);
-
-        $self->{needsRefreshed} = '' if $count == 0;
-        return $count;
-    }
-    else {
-        return $self->checkout_module_path(@dirs);
-    }
-}
-
-sub name
-{
-    return 'l10n';
-}
-
-# Returns a list of just the languages to install.
-sub languages
-{
-    my $self = assert_isa(shift, 'ksb::l10nSystem');
-    my @langs = @{$self->{l10n_dirs}};
-
-    return grep { $self->isSubdirBuildable($_); } (@langs);
-}
-
-# Buildsystem support section
-
-sub needsRefreshed
-{
-    my $self = shift;
-
-    # Should be a 'reason' string except if no update happened.
-    return $self->{needsRefreshed};
-}
-
-sub buildInternal
-{
-    my $self = assert_isa(shift, 'ksb::l10nSystem');
-    my $builddir = $self->module()->fullpath('build');
-    my @langs = $self->languages();
-    my $result = ($self->safe_make({
-        target => undef,
-        message => "Building localization for language...",
-        logbase => "build",
-        subdirs => \@langs,
-    }))->{was_successful};
-
-    return $result;
-}
-
-sub configureInternal
-{
-    my $self = assert_isa(shift, 'ksb::l10nSystem');
-
-    my $builddir = $self->module()->fullpath('build');
-    my @langs = $self->languages();
-    my $result = 0;
-
-    for my $lang (@langs) {
-        my $prefix = $self->module()->installationPath();
-        p_chdir("$builddir/$lang");
-
-        info ("\tConfiguring to build language $lang");
-        $result = (log_command($self->module(), "cmake-$lang",
-            ['cmake', '-DCMAKE_INSTALL_PREFIX=' . $prefix]) == 0) || $result;
-    }
-
-    return $result;
-}
-
-sub installInternal
-{
-    my $self = assert_isa(shift, 'ksb::l10nSystem');
-    my $builddir = $self->module()->fullpath('build');
-    my @langs = $self->languages();
-
-    return ($self->safe_make({
-        target => 'install',
-        message => "Installing language...",
-        logbase => "install",
-        subdirs => \@langs,
-    }) == 0);
-}
-
-# Subroutine to link a source directory into an alternate directory in
-# order to fake srcdir != builddir for modules that don't natively support
-# it.  The first parameter is the module to prepare.
-#
-# The return value is true (non-zero) if it succeeded, and 0 (false) if it
-# failed.
-#
-# On return from the subroutine the current directory will be in the build
-# directory, since that's the only directory you should touch from then on.
-sub prepareFakeBuilddir
-{
-    my $self = assert_isa(shift, 'ksb::l10nSystem');
-    my $module = $self->module();
-    my $builddir = $module->fullpath('build');
-    my $srcdir = $module->fullpath('source');
-
-    # List reference, not a real list.  The initial kdesrc-build does *NOT*
-    # fork another kdesrc-build using exec, see sub log_command() for more
-    # info.
-    my $args = [ 'kdesrc-build', 'ksb::Util::safe_lndir', $srcdir, $builddir ];
-
-    info ("\tSetting up alternate build directory for l10n");
-    return (0 == log_command ($module, 'create-builddir', $args));
-}
-
-# Subroutine to create the build system for a module.  This involves making
-# sure the directory exists and then running any preparatory steps (like
-# for l10n modules).  This subroutine assumes that the module is already
-# downloaded.
-#
-# Return convention: boolean (inherited)
-sub createBuildSystem
-{
-    my $self = assert_isa(shift, 'ksb::l10nSystem');
-    my $module = $self->module();
-    my $builddir = $module->fullpath('build');
-
-    # l10n doesn't support srcdir != builddir, fake it.
-    whisper ("\tFaking builddir for g[$module]");
-    if (!$self->prepareFakeBuilddir())
-    {
-        error ("Error creating r[$module] build system!");
-        return 0;
-    }
-
-    p_chdir ($builddir);
-
-    my @langs = @{$self->{l10n_dirs}};
-    @langs = grep { $self->isSubdirBuildable($_) } (@langs);
-
-    foreach my $lang (@langs) {
-        my $cmd_ref = [ './scripts/autogen.sh', $lang ];
-        if (log_command ($module, "build-system-$lang", $cmd_ref))
-        {
-            error ("\tUnable to create build system for r[$module]");
-        }
-    }
-
-    $module->setOption('#reconfigure', 1); # Force reconfigure of the module
-
-    return 1;
-}
-
-1;
diff --git a/t/smoke/load-all-ksb-modules.t b/t/smoke/load-all-ksb-modules.t
index 000db25..11bbea1 100644
--- a/t/smoke/load-all-ksb-modules.t
+++ b/t/smoke/load-all-ksb-modules.t
@@ -22,7 +22,6 @@ use ksb::IPC;
 use ksb::IPC::Null;
 use ksb::IPC::Pipe;
 use ksb::KDEProjectsReader;
-use ksb::l10nSystem;
 use ksb::Module;
 use ksb::Module::BranchGroupResolver;
 use ksb::ModuleResolver;


More information about the kde-doc-english mailing list