Bug 262364 - languages not handled properly if files were added or deleted
Summary: languages not handled properly if files were added or deleted
Status: RESOLVED FIXED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (show other bugs)
Version: 1.12
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-07 02:31 UTC by Frederik Schwarzer
Modified: 2011-02-04 00:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Force autogen.sh to run when building an l10n module (773 bytes, patch)
2011-01-07 04:23 UTC, Michael Pyne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederik Schwarzer 2011-01-07 02:31:01 UTC
Version:           1.12
OS:                Linux

Hi,

if there are added, deleted or moved files in a language folder,
kdesrc-build fails to build the language.

I think scripts/autogen.sh has to be run after such a change.

Regards

Reproducible: Always
Comment 1 Michael Pyne 2011-01-07 04:23:25 UTC
Created attachment 55668 [details]
Force autogen.sh to run when building an l10n module

It should be easy enough to force autogen.sh to run when building an l10n module. Could you try this patch and let me know if it works? (It marks l10n modules as always requiring a build system update).

I just noticed a separate bug with l10n when testing this and trying to do the initial checkout which I'll also try to fix, probably tomorrow.
Comment 2 Frederik Schwarzer 2011-01-07 06:20:53 UTC
Thanks for the quick responds.
I applied the patch, now let's wait for the next (re)moval.
Comment 3 Michael Pyne 2011-01-09 07:56:35 UTC
SVN commit 1213129 by mpyne:

Possibly fix 262364 (l10n modules don't build if files updated).

This fix makes it so that the build system for l10n modules is regenerated on every
build (which has the side effect of running the required autogen.sh script). Seems to
work for me, should be in 1.12.1 (when I do finally release that).

BUG:262364


 M  +2 -0      kdesrc-build  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1213129
Comment 4 Frederik Schwarzer 2011-01-11 03:54:48 UTC
It does not handle removed files yet.

[  4%] Built target pofiles
make[2]: *** No rule to make target `messages/extragear-base/searchbarplugin.po', needed by `messages/extragear-base/searchbarplugin.gmo'.  Stop.
Comment 5 Michael Pyne 2011-01-15 05:14:22 UTC
Frederik: About the only other thing I'd be able to do is simply run make clean or similar before running autogen.sh. Does the translation build system support a better way to handle deleted files? Otherwise I can simply patch that in too.
Comment 6 Frederik Schwarzer 2011-01-15 08:04:12 UTC
The generated CMakeLists.txt looks like
      file(GLOB _po_files *.po)
      GETTEXT_PROCESS_PO_FILES(${CURRENT_LANG} ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )
so it remains unchanged when files are removed.

I think if "make clean" helps, it's good enough. Otherwise autogen might need some adjustments.
Comment 7 Michael Pyne 2011-01-15 22:11:29 UTC
Frederik: I just checked, and kdesrc-build should already be removing the old build directory every time l10n modules are built now. This would look like:

Building l10n-kde4/de (1/1)
        Checking for source conflicts... 
        Preparing build system for l10n-kde4/de.
        Removing files in build directory for l10n-kde4/de
        Old build system cleaned, starting new build system.

I've also verified that the build directory really does get emptied by inserting a stop just after the "Removing files in build directory" step.

If there are still problems with removed files after that, it's an error in the source directory somehow (which doesn't really make sense if CMakeLists.txt is just using GLOB to list all the files that actually exist)

It is possible that this is due to a change I made last night to fix updating and building l10n modules in parallel, although the functionality should still have been the same.

So, do you get the message "Removing files in the build directory" for the various l10n modules? If there are still failures building after that I'm not super sure what to do. :-/
Comment 8 Michael Pyne 2011-02-04 00:04:36 UTC
No further problems noted, so I'm assuming I've fixed it. ;)
Comment 9 Frederik Schwarzer 2011-02-04 00:21:52 UTC
Sorry for not reporting back.
I was not building KDE for some time now due to time constraints and computer issues.

I will report back when I used kdesrc-build again.