https://bugs.kde.org/show_bug.cgi?id=363059

            Bug ID: 363059
           Summary: qmake should be run with the -r option
           Product: kdesrc-build
           Version: Git
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: mp...@kde.org
          Reporter: fa...@kde.org

$ kdesrc-build -v --reconfigure libaccounts-qt                       

Building libaccounts-qt (build system qmake) (1/1)
        Updating libaccounts-qt (to branch master)
        Updating libaccounts-qt using existing branch master
        This module will not be built. Nothing updated.
        No changes to libaccounts-qt source, proceeding to build.
        Unable to install libaccounts-qt!



Reproducible: Always

Steps to Reproduce:
module libaccounts-qt
  repository https://gitlab.com/accounts-sso/libaccounts-qt.git
  qmake-options PREFIX=/tmp
end module

1. Comment out the qmake-options line
2. kdesrc-build libaccounts-qt
This will fail to install into /usr, as expected
3. Enable the qmake-options line again
4. kdesrc-build --reconfigure libaccounts-qt

Actual Results:  
Same error. And yet qmake was run again, I see in the logs.
The verbose output above is quite unclear about that BTW.
1) "This module will not be built" ... why? seems wrong.
2) If I use reconfigure on a cmake module I see "Running cmake...", so surely
there should be a similar line with "Running qmake..." for qmake modules.

Expected Results:  
If qmake was run with -r, then the change would actually take effect.
This is a qmake issue, where it only regenerates the toplevel Makefile, but not
Makefiles in subdirs, unless -r is passed.

The patch below fixes the main issue, but I'm still filing this for posterity,
for feedback, and because the output could be improved too.

diff --git a/modules/ksb/BuildSystem/QMake.pm
b/modules/ksb/BuildSystem/QMake.pm
index 2f7924b..aa91a74 100644                                                   
--- a/modules/ksb/BuildSystem/QMake.pm
+++ b/modules/ksb/BuildSystem/QMake.pm
@@ -45,6 +45,7 @@ sub configureInternal
     my $builddir = $module->fullpath('build');
     my $sourcedir = $module->fullpath('source');
     my @qmakeOpts = split(' ', $module->getOption('qmake-options'));
+    push @qmakeOpts, '-r';
     my @projectFiles = glob("$sourcedir/*.pro");

     if (!@projectFiles || !$projectFiles[0]) {

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to