diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-07-16 12:06:47 +0200 |
---|---|---|
committer | Xisco FaulĂ <xiscofauli@libreoffice.org> | 2019-07-17 12:11:42 +0200 |
commit | b7d1226ac09b31f605668225bc8af43c698d59c4 (patch) | |
tree | 75895d3d816edf4785db3dc322b659c1ed0a972e /solenv/bin | |
parent | Resolves: tdf#126190 don't default to WB_NOHIDESELECTION (diff) | |
download | core-b7d1226ac09b31f605668225bc8af43c698d59c4.tar.gz core-b7d1226ac09b31f605668225bc8af43c698d59c4.zip |
Introduce gb_Package_add_empty_directories
...which will be needed in a subsequent patch to fix tdf#125693.
The installer code could not handle a directory in a .filelist, the simplest
hack appears to be to add a special case for an empty source dir to
copy_one_file in solenv/bin/modules/installer/systemactions.pm.
Includes changes made by Stephan Bergmann <sbergman@redhat.com>.
Reviewed-on: https://gerrit.libreoffice.org/75702
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit cabadfc288e5e7324723c62f36b918a80db90323)
...plus a change to solenv/gbuild/Package.mk adapting to the lack of master
368c996b24e09c427a30972b3405493328db6779 "Make font-based unit test depend on
instdir fonts" on libreoffice-6-3
Change-Id: I52dca2543a66eb76117598d77d559592e26ce859
Reviewed-on: https://gerrit.libreoffice.org/75744
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
Diffstat (limited to 'solenv/bin')
-rw-r--r-- | solenv/bin/modules/installer/systemactions.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm index 9b12ff63c271..4f7a18bba5e6 100644 --- a/solenv/bin/modules/installer/systemactions.pm +++ b/solenv/bin/modules/installer/systemactions.pm @@ -277,6 +277,16 @@ sub create_directories # Copying one file ######################## +sub is_empty_dir +{ + my ($dir) = @_; + my ($handle, $count); + opendir($handle, $dir) or return 0; + $count = scalar(grep { $_ ne '.' && $_ ne '..' } readdir($handle)); + closedir($handle); + return $count == 0; +} + sub copy_one_file { my ($source, $dest) = @_; @@ -286,6 +296,10 @@ sub copy_one_file if ( -l $source ) { $copyreturn = symlink(readlink("$source"), "$dest"); } + elsif (-d $source && is_empty_dir($source)) { + my $mode = (stat($source))[2] & 07777; + $copyreturn = mkdir($dest, $mode); + } else { $copyreturn = copy($source, $dest); } |