solenv/bin/modules/installer/epmfile.pm |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 5f46f5b7301789000c5c71acec1747f192cee01a
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Thu Feb 27 11:51:17 2025 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu Feb 27 16:16:58 2025 +0100

    Work around epm failure with readme file gone from SDK
    
    ...with 01ae181574d06d5ea60f9454684cb09621724f17 "Remove readme file from 
SDK",
    after which Linux --with-package-format=deb or --with-package-format=rpm 
builds
    had started to fail with errors like
    
    > : *****************************************************************
    > : ERROR: ERROR: Could not find readme file README_en-US (C) at 
/home/sberg/lo2/source/solenv/bin/modules/installer/epmfile.pm line 488.
    > : *****************************************************************
    >
    > make[1]: *** 
[/home/sberg/lo2/source/instsetoo_native/CustomTarget_install.mk:123: 
sdkoo‧en-US‧_SDK‧‧deb‧nostrip] Error 1
    
    epm demands a %readme line in its input (cf.
    
    >   if (!dist->product[0] ||
    >       !dist->copyright[0] ||
    >       !dist->vendor[0] ||
    >       !dist->license[0] ||
    >       !dist->readme[0] ||
    >       !dist->version[0])
    >   {
    >     fputs("epm: Error - missing %product, %copyright, %vendor, %license,
", stderr);
    >     fputs("     %readme, or %version attributes in list file!
", stderr);
    
    in workdir/UnpackedTarball/epm/epm.c), but doesn't seem to actually need 
it, at
    least in this scenario.  So use NO_README_IN_ROOTDIR, which happens to be 
set
    exactly for LibreOffice_SDK and LibreOfficeDev_SDK in
    instsetoo_native/util/openoffice.lst.in, as a flag to provide a dummy 
%readme
    line for epm, which appears to work well.
    
    Change-Id: I350c5914cd7b6d2f61cdd3d1ed4db7f7cc50c627
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182285
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/solenv/bin/modules/installer/epmfile.pm 
b/solenv/bin/modules/installer/epmfile.pm
index 0b2caf1fff37..623307d68911 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -409,6 +409,16 @@ sub create_epm_header
         }
     }
 
+    if (!$foundreadmefile && $variableshashref->{'NO_README_IN_ROOTDIR'})
+    {
+        $infoline = "Fallback to dummy readme file
";
+        push(@installer::globals::logfileinfo, $infoline);
+
+        $foundreadmefile = 1;
+        $line = "%readme DUMMY
";
+        push(@epmheader, $line);
+    }
+
     # searching for and license file
 
     if ( $license_in_package_defined )

Reply via email to