You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ji...@apache.org on 2019/01/21 18:50:32 UTC

svn commit: r1851763 - in /openoffice/branches/AOO417: ./ main/ main/odk/setsdkenv_unix.sh.in main/odk/source/unoapploader/unx/unoapploader.c main/sal/osl/unx/nlsupport.c main/sal/osl/unx/process_impl.cxx

Author: jim
Date: Mon Jan 21 18:50:32 2019
New Revision: 1851763

URL: http://svn.apache.org/viewvc?rev=1851763&view=rev
Log:
Merge r1851464, r1851637 from trunk:

Try to address https://bz.apache.org/ooo/show_bug.cgi?id=127965

Be sure that /usr/local/bin is in PATH. Just in case, add it at the end


more PATH weirdness on macOS

Reviewed by: jim

Modified:
    openoffice/branches/AOO417/   (props changed)
    openoffice/branches/AOO417/main/   (props changed)
    openoffice/branches/AOO417/main/odk/setsdkenv_unix.sh.in
    openoffice/branches/AOO417/main/odk/source/unoapploader/unx/unoapploader.c
    openoffice/branches/AOO417/main/sal/osl/unx/nlsupport.c
    openoffice/branches/AOO417/main/sal/osl/unx/process_impl.cxx

Propchange: openoffice/branches/AOO417/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 21 18:50:32 2019
@@ -2,5 +2,5 @@
 /openoffice/branches/ia2:1417739-1541842
 /openoffice/branches/ooxml-osba:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283
 /openoffice/branches/rejuvenate01:1480411,1534063,1534098,1536312,1549902,1560617
-/openoffice/trunk:1571617,1571619,1571677,1572577,1572587,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1607111,1607793,1607836,1608348,1608359,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611549,1612539,1612801,1621121,1623847,1623849-1623850,1642300-1642302,1647713,1652476,1654282,1668939,1669457,1669459,1669462-1669463,1669465,1689883,1689959,1690740,1690755,1690854,1694131-1694132,1694701,1702894,1702898,1702986,1702988,1705542-1705543,1705551,1706649,1707397,1707659,1723875,1729921,1730154,174
 8497,1754469,1755873,1756017,1758150,1760461,1761439,1761808,1763017,1763019,1765170,1766467,1766530,1766915,1772139,1780015,1784925,1784961,1785175,1791815,1793216,1797494,1800077,1800568,1802428,1803787,1803939,1804182,1805208,1806314,1811013,1811435,1811737,1813450,1814994,1815700,1825850,1837212,1837677,1837765,1839130,1839837,1840427,1840936
+/openoffice/trunk:1571617,1571619,1571677,1572577,1572587,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1607111,1607793,1607836,1608348,1608359,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611549,1612539,1612801,1621121,1623847,1623849-1623850,1642300-1642302,1647713,1652476,1654282,1668939,1669457,1669459,1669462-1669463,1669465,1689883,1689959,1690740,1690755,1690854,1694131-1694132,1694701,1702894,1702898,1702986,1702988,1705542-1705543,1705551,1706649,1707397,1707659,1723875,1729921,1730154,174
 8497,1754469,1755873,1756017,1758150,1760461,1761439,1761808,1763017,1763019,1765170,1766467,1766530,1766915,1772139,1780015,1784925,1784961,1785175,1791815,1793216,1797494,1800077,1800568,1802428,1803787,1803939,1804182,1805208,1806314,1811013,1811435,1811737,1813450,1814994,1815700,1825850,1837212,1837677,1837765,1839130,1839837,1840427,1840936,1851464,1851637
 /openoffice/trunk/main:1705369

Propchange: openoffice/branches/AOO417/main/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 21 18:50:32 2019
@@ -2,4 +2,4 @@
 /openoffice/branches/ia2/main:1417739-1541842
 /openoffice/branches/ooxml-osba/main:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283
 /openoffice/branches/rejuvenate01/main:1480411,1534063,1534098,1536312,1549902,1560617
-/openoffice/trunk/main:1571617,1571677,1572569,1572577,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1603941,1604028,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1606706,1607111,1607793,1607836,1608348,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611470,1611549,1612070-1612071,1612539,1612801,1616457,1616944,1620195,1621121,1623847,1623849-1623850,1630814,1633294,1633297,1635806,1642300-1642302,1643177,1650314,1652476,1654282,1668939,1669457,1669459,1669462-1669463,1669465,1677190,1687177,1689883,1689959,1692551,1694132,1694701,1695962,169780
 7,1700078,1700126,1700135,1702107,1702894,1702898,1702986,1702988,1705193,1705196,1705199,1705276,1705364,1705368-1705369,1705542,1706649,1707167,1707169-1707170,1707175,1707397,1707408,1707412,1707642,1707645,1707659,1707844,1708477,1708483,1709212,1709377,1709403,1723875,1729921,1730154,1748497,1754469,1755873,1756017,1758150,1760461,1761439,1761808,1763017,1763019,1765170,1766467,1766915,1772139,1780015,1784925,1784961,1785175,1791815,1793216,1797494,1800077,1800568,1802428,1803787,1803939,1804182,1805208,1806314,1811737,1813450,1815700,1825850,1837212,1837677,1837765,1839130,1839837,1840427,1840936
+/openoffice/trunk/main:1571617,1571677,1572569,1572577,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1603941,1604028,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1606706,1607111,1607793,1607836,1608348,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611470,1611549,1612070-1612071,1612539,1612801,1616457,1616944,1620195,1621121,1623847,1623849-1623850,1630814,1633294,1633297,1635806,1642300-1642302,1643177,1650314,1652476,1654282,1668939,1669457,1669459,1669462-1669463,1669465,1677190,1687177,1689883,1689959,1692551,1694132,1694701,1695962,169780
 7,1700078,1700126,1700135,1702107,1702894,1702898,1702986,1702988,1705193,1705196,1705199,1705276,1705364,1705368-1705369,1705542,1706649,1707167,1707169-1707170,1707175,1707397,1707408,1707412,1707642,1707645,1707659,1707844,1708477,1708483,1709212,1709377,1709403,1723875,1729921,1730154,1748497,1754469,1755873,1756017,1758150,1760461,1761439,1761808,1763017,1763019,1765170,1766467,1766915,1772139,1780015,1784925,1784961,1785175,1791815,1793216,1797494,1800077,1800568,1802428,1803787,1803939,1804182,1805208,1806314,1811737,1813450,1815700,1825850,1837212,1837677,1837765,1839130,1839837,1840427,1840936,1851464,1851637

Modified: openoffice/branches/AOO417/main/odk/setsdkenv_unix.sh.in
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO417/main/odk/setsdkenv_unix.sh.in?rev=1851763&r1=1851762&r2=1851763&view=diff
==============================================================================
--- openoffice/branches/AOO417/main/odk/setsdkenv_unix.sh.in (original)
+++ openoffice/branches/AOO417/main/odk/setsdkenv_unix.sh.in Mon Jan 21 18:50:32 2019
@@ -172,6 +172,8 @@ case ${sdk_platform} in
     platform=MacOSX
     stldebug=_stldebug
     DYLD_LIBRARY_PATH=/usr/lib:${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_OFFICE_LIB_DIR}:.:${DYLD_LIBRARY_PATH}
+    # Below for https://bz.apache.org/ooo/show_bug.cgi?id=127965
+    PATH=${PATH}:/usr/local/bin
     export DYLD_LIBRARY_PATH
     ;;
 
@@ -344,6 +346,14 @@ echo " * Boost = $OO_SDK_BOOST_HOME"
 echo " * SDK Output directory = $OO_SDK_OUT"
 echo " * Auto deployment = $SDK_AUTO_DEPLOYMENT"
 echo " *"
+echo " * PATH = $PATH"
+if [ "${platform}" = "MacOSX" ]
+then
+    echo " * DYLD_LIBRARY_PATH = $DYLD_LIBRARY_PATH"
+else
+    echo " * LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
+fi
+echo " *"
 echo " ************************************************************************"
 
 echo "]2;Shell prepared with the SDK environment"

Modified: openoffice/branches/AOO417/main/odk/source/unoapploader/unx/unoapploader.c
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO417/main/odk/source/unoapploader/unx/unoapploader.c?rev=1851763&r1=1851762&r2=1851763&view=diff
==============================================================================
--- openoffice/branches/AOO417/main/odk/source/unoapploader/unx/unoapploader.c (original)
+++ openoffice/branches/AOO417/main/odk/source/unoapploader/unx/unoapploader.c Mon Jan 21 18:50:32 2019
@@ -206,6 +206,21 @@ int main( int argc, char *argv[] )
             strcat( envstr, value );
 		}
         putenv( envstr );
+#ifdef MACOSX
+        /* https://bz.apache.org/ooo/show_bug.cgi?id=127965 */
+        value = getenv( "PATH" );
+        size = strlen( "PATH" ) + strlen( "=/usr/local/bin" ) + 1;
+        if ( value != NULL )
+            size += strlen( PATHSEPARATOR ) + strlen( value );
+		envstr = (char*) malloc( size );
+        strcpy( envstr, "PATH=" );
+        if ( value != NULL ) {
+            strcat( envstr, value);
+            strcat( envstr, PATHSEPARATOR);
+        }
+        strcat( envstr, "/usr/local/bin" ); /* We are adding at the end */
+        putenv( envstr );
+#endif
     }
     else
     {

Modified: openoffice/branches/AOO417/main/sal/osl/unx/nlsupport.c
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO417/main/sal/osl/unx/nlsupport.c?rev=1851763&r1=1851762&r2=1851763&view=diff
==============================================================================
--- openoffice/branches/AOO417/main/sal/osl/unx/nlsupport.c (original)
+++ openoffice/branches/AOO417/main/sal/osl/unx/nlsupport.c Mon Jan 21 18:50:32 2019
@@ -832,6 +832,8 @@ int macosx_getLocale(char *locale, sal_u
 void _imp_getProcessLocale( rtl_Locale ** ppLocale )
 {
     static char *locale = NULL;
+    char *npath, *opath;
+    int slen;
 
     /* basic thread safeness */
 //    pthread_mutex_lock( &aLocalMutex );
@@ -870,6 +872,26 @@ void _imp_getProcessLocale( rtl_Locale *
     setenv("LC_CTYPE", locale, 1 );
     setenv("LANG", locale, 1 );
 
+    /*
+     * This is a hack. We know that we are setting some envvars here
+     * and due to https://bz.apache.org/ooo/show_bug.cgi?id=127965
+     * we need to update PATH on macOS. Doing it here ensures
+     * that it's done but it's not the right location to be doing
+     * this.
+     */
+    opath = getenv ( "PATH" );
+    slen = strlen( "/usr/local/bin" ) + 1;
+    if ( opath != NULL )
+        slen += strlen( ":" ) + strlen( opath );
+    npath = malloc( slen );
+    if ( opath != NULL ) {
+        strcat( npath, opath );
+        strcat( npath, ":" );
+    }
+    strcat( npath, "/usr/local/bin" ); /* We are adding at the end */
+    setenv("PATH", npath, 1 );
+    free(npath);
+
 #ifdef DEBUG
     fprintf( stderr, "nlsupport.c:  _imp_getProcessLocale() returning %s as current locale.\n", locale );
 #endif

Modified: openoffice/branches/AOO417/main/sal/osl/unx/process_impl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO417/main/sal/osl/unx/process_impl.cxx?rev=1851763&r1=1851762&r2=1851763&view=diff
==============================================================================
--- openoffice/branches/AOO417/main/sal/osl/unx/process_impl.cxx (original)
+++ openoffice/branches/AOO417/main/sal/osl/unx/process_impl.cxx Mon Jan 21 18:50:32 2019
@@ -385,7 +385,7 @@ oslProcessError SAL_CALL osl_clearEnviro
 	rtl_TextEncoding encoding = osl_getThreadTextEncoding();
 	rtl_String* pstr_env_var  = 0;
 
-	OSL_PRECOND(pustrEnvVar, "osl_setEnvironment(): Invalid parameter");
+	OSL_PRECOND(pustrEnvVar, "osl_clearEnvironment(): Invalid parameter");
 
 	rtl_uString2String(
 		&pstr_env_var,