- Add patch to fix bsc#1116658:

* pyuno-nopwd.patch

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=897
This commit is contained in:
Tomáš Chvátal 2020-06-19 12:38:58 +00:00 committed by Git OBS Bridge
parent 6a37954a7c
commit 24ca5844c6
3 changed files with 58 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jun 19 12:38:18 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to fix bsc#1116658:
* pyuno-nopwd.patch
-------------------------------------------------------------------
Thu Jun 18 11:40:25 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -101,6 +101,7 @@ Patch1: scp2-user-config-suse.diff
Patch2: nlpsolver-no-broken-help.diff
Patch3: mediawiki-no-broken-help.diff
Patch4: poppler-0.86.patch
Patch5: pyuno-nopwd.patch
# try to save space by using hardlinks
Patch990: install-with-hardlinks.diff
# save time by relying on rpm check rather than doing stupid find+grep
@ -959,6 +960,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
%patch2
%patch3
%patch4 -p1
%patch5 -p1
%patch990 -p1
%patch991 -p1

50
pyuno-nopwd.patch Normal file
View File

@ -0,0 +1,50 @@
From 844af02198cace3c8f7776602810d8433d0b71d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 19 Jun 2020 11:32:00 +0100
Subject: [PATCH] tdf#121384 don't leave a bare trailing : in PYTHONPATH
Change-Id: I8d8183485f457c3e4385181fee07390c4bfef603
---
pyuno/source/loader/pyuno_loader.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 8556dfdde11f..ebb0b7ce5c8d 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -140,6 +140,7 @@ static void setPythonHome ( const OUString & pythonHome )
static void prependPythonPath( const OUString & pythonPathBootstrap )
{
OUStringBuffer bufPYTHONPATH( 256 );
+ bool bAppendSep = false;
sal_Int32 nIndex = 0;
while( true )
{
@@ -153,17 +154,23 @@ static void prependPythonPath( const OUString & pythonPathBootstrap )
{
fileUrl = pythonPathBootstrap.copy(nIndex, nNew - nIndex);
}
+ if (bAppendSep)
+ bufPYTHONPATH.append( static_cast<sal_Unicode>(SAL_PATHSEPARATOR) );
OUString systemPath;
osl_getSystemPathFromFileURL( fileUrl.pData, &(systemPath.pData) );
bufPYTHONPATH.append( systemPath );
- bufPYTHONPATH.append( static_cast<sal_Unicode>(SAL_PATHSEPARATOR) );
+ bAppendSep = true;
if( nNew == -1 )
break;
nIndex = nNew + 1;
}
const char * oldEnv = getenv( "PYTHONPATH");
if( oldEnv )
+ {
+ if (bAppendSep)
+ bufPYTHONPATH.append( static_cast<sal_Unicode>(SAL_PATHSEPARATOR) );
bufPYTHONPATH.append( OUString(oldEnv, strlen(oldEnv), osl_getThreadTextEncoding()) );
+ }
OUString envVar("PYTHONPATH");
OUString envValue(bufPYTHONPATH.makeStringAndClear());
--
2.27.0