[SCM] gtk2-engines-oxygen packaging branch, master, updated. debian/1.3.3-1-1-g6f9f175

Ralf Jung ralfj-guest at alioth.debian.org
Sun May 19 10:43:37 UTC 2013


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/gtk2-engines-oxygen.git;a=commitdiff;h=6f9f175

The following commit has been merged in the master branch:
commit 6f9f1752df64a30970776cb708fc192786d17cf9
Author: Ralf Jung <post at ralfj.de>
Date:   Sun May 19 12:30:38 2013 +0200

    Add patch popen-instead-of-g_spawn_command_line_sync.patch from upstream (Closes: #707699)
---
 debian/changelog                                   |    7 ++
 ...open-instead-of-g_spawn_command_line_sync.patch |   70 ++++++++++++++++++++
 debian/patches/series                              |    1 +
 3 files changed, 78 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9079f97..d732e76 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gtk2-engines-oxygen (1.3.3-2) UNRELEASED; urgency=low
+
+  * Add popen-instead-of-g_spawn_command_line_sync.patch
+    from upstream (Closes: #707699).
+
+ -- Ralf Jung <post at ralfj.de>  Sun, 19 May 2013 12:31:27 +0200
+
 gtk2-engines-oxygen (1.3.3-1) unstable; urgency=low
 
   * Team upload.
diff --git a/debian/patches/popen-instead-of-g_spawn_command_line_sync.patch b/debian/patches/popen-instead-of-g_spawn_command_line_sync.patch
new file mode 100644
index 0000000..963618a
--- /dev/null
+++ b/debian/patches/popen-instead-of-g_spawn_command_line_sync.patch
@@ -0,0 +1,70 @@
+From: Ralf Jung <post at ralfj.de>
+Subject: Use popen instead of g_spawn_command_line_sync
+Last-Update: 2012-05-19
+Forwarded: Committed upstream as a515ab45, 592490ea, 878b0e62 and fbc7f891
+--- a/src/oxygenqtsettings.cpp
++++ b/src/oxygenqtsettings.cpp
+@@ -209,6 +209,33 @@
+     }
+ 
+     //_________________________________________________________
++    bool QtSettings::runCommand( const std::string& command, char*& result ) const
++    {
++
++        if( FILE* fp = popen( command.c_str(), "r" ) )
++        {
++
++            // read command output. Make sure that the buffer is large enough to read the entire
++            // output, by multiplying its initial size by two as long as the last character is not '
'
++            // note that the allocated string must be freed by the calling method
++            gulong bufSize=512;
++            size_t currentOffset=0;
++            result= static_cast<char*>(g_malloc(bufSize));
++            while( fgets( result+currentOffset, bufSize-currentOffset, fp ) && result[strlen(result)-1] != '
' )
++            {
++                currentOffset = bufSize-1;
++                bufSize *= 2;
++                result = static_cast<char*>( g_realloc( result, bufSize ) );
++            }
++
++            pclose(fp);
++            return true;
++
++        } else return false;
++
++    }
++
++    //_________________________________________________________
+     bool QtSettings::loadKdeGlobals( void )
+     {
+ 
+@@ -268,7 +295,7 @@
+ 
+         // load icon install prefix
+         gchar* path = 0L;
+-        if( g_spawn_command_line_sync( "kde4-config --path config", &path, 0L, 0L, 0L ) && path )
++        if( runCommand( "kde4-config --path config", path ) && path )
+         {
+ 
+             out.split( path );
+@@ -298,7 +325,7 @@
+         // load icon install prefix
+         PathList out;
+         char* path = 0L;
+-        if( g_spawn_command_line_sync( "kde4-config --path icon", &path, 0L, 0L, 0L ) && path )
++        if( runCommand( "kde4-config --path icon", path ) && path )
+         {
+             out.split( path );
+             g_free( path );
+--- a/src/oxygenqtsettings.h
++++ b/src/oxygenqtsettings.h
+@@ -348,6 +348,9 @@
+ 
+         protected:
+ 
++        //! read output from a command - replacement for not always working g_spawn_command_line_sync()
++        bool runCommand( const std::string& command, char*& result ) const;
++
+         //! kdeglobals settings
+         /*! returns true if changed */
+         bool loadKdeGlobals( void );
diff --git a/debian/patches/series b/debian/patches/series
index 625ddbd..9b5e1ac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 dont-build-demos.patch
+popen-instead-of-g_spawn_command_line_sync.patch

-- 
gtk2-engines-oxygen packaging



More information about the pkg-kde-commits mailing list