diff options
author | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-11-09 22:24:19 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-11-09 22:24:19 -0200 |
commit | f37ffba8ac626c65737150c2a46561d6d2db9005 (patch) | |
tree | 3709d764f9602c8fb0c77ae93ac9eb5ae56afaaa | |
parent | 03d5565a5e31c4f5189f8fd91eaf11aac5b9d5d3 (diff) | |
download | abslibre-f37ffba8ac626c65737150c2a46561d6d2db9005.tar.gz abslibre-f37ffba8ac626c65737150c2a46561d6d2db9005.tar.bz2 abslibre-f37ffba8ac626c65737150c2a46561d6d2db9005.zip |
kdelibs-libre-4.9.3-2: fix a regression in 'Save As'
-rwxr-xr-x | libre/kdelibs-libre/PKGBUILD | 13 | ||||
-rw-r--r-- | libre/kdelibs-libre/fix-save-path.patch | 27 | ||||
-rwxr-xr-x | libre/kdelibs-libre/use-pythondontwritebytecode.patch | 91 |
3 files changed, 85 insertions, 46 deletions
diff --git a/libre/kdelibs-libre/PKGBUILD b/libre/kdelibs-libre/PKGBUILD index 33b3e4554..0f1f3f558 100755 --- a/libre/kdelibs-libre/PKGBUILD +++ b/libre/kdelibs-libre/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 170347 2012-11-06 13:29:39Z andrea $ +# $Id: PKGBUILD 170700 2012-11-09 21:01:24Z andrea $ # Maintainer: Andrea Scarpino <andrea@archlinux.org # Contributor: Pierre Schmitz <pierre@archlinux.de> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> @@ -6,7 +6,7 @@ _pkgname=kdelibs pkgname=kdelibs-libre pkgver=4.9.3 -pkgrel=1 +pkgrel=2 pkgdesc="KDE Core Libraries" arch=('i686' 'x86_64' 'mips64el') url='https://projects.kde.org/projects/kde/kdelibs' @@ -24,10 +24,12 @@ install=${_pkgname}.install source=("http://download.kde.org/stable/${pkgver}/src/${_pkgname}-${pkgver}.tar.xz" 'kde-applications-menu.patch' 'use-pythondontwritebytecode.patch' + 'fix-save-path.patch' 'khtml-fsdg.diff') sha1sums=('d5d60c431159b17a753ee7427d9ca129d550e3f8' '86ee8c8660f19de8141ac99cd6943964d97a1ed7' - '08c20f4aaad076264402a1d84c559d75b37c66d3' + '1138e78f15faa7221669ea81e313c595000cc953' + 'e3d2621bd1451fe7f45a454af970fae108614ddd' 'a1502a964081ad583a00cf90c56e74bf60121830') build() { @@ -35,9 +37,12 @@ build() { # avoid file conflict with gnome-menus patch -p1 -i "${srcdir}"/kde-applications-menu.patch + # add Archlinux menu entry + patch -p1 -i "${srcdir}"/archlinux-menu.patch - # Set PYTHONDONTWRITEBYTECODE (KDEBUG#276151) + # Fixed upstream patch -p1 -i "${srcdir}"/use-pythondontwritebytecode.patch + patch -p1 -i "${srcdir}"/fix-save-path.patch # Don't ask the user to download a plugin, it's probably nonfree. patch -p1 -i "${srcdir}"/khtml-fsdg.diff diff --git a/libre/kdelibs-libre/fix-save-path.patch b/libre/kdelibs-libre/fix-save-path.patch new file mode 100644 index 000000000..1a00221a7 --- /dev/null +++ b/libre/kdelibs-libre/fix-save-path.patch @@ -0,0 +1,27 @@ +commit 793e2a69f8aa193b60494b03d51c5fd44373c0e7 +Author: Jonathan Marten <jjm@keelhaul.me.uk> +Date: Wed Nov 7 12:45:03 2012 +0000 + + Fix regression: specified or remembered save path is not used + + As requested on review https://git.reviewboard.kde.org/r/106475/ + +diff --git a/kfile/kfilewidget.cpp b/kfile/kfilewidget.cpp +index 65deca2..e755aae 100644 +--- a/kfile/kfilewidget.cpp ++++ b/kfile/kfilewidget.cpp +@@ -2593,8 +2593,12 @@ KUrl KFileWidget::getStartUrl( const KUrl& startDir, + } + else // not special "kfiledialog" URL + { +- if (!startDir.isRelative()) // has directory, maybe with filename +- { ++ // We can use startDir as the starting directory if either: ++ // (a) it has a directory part, or ++ // (b) there is a scheme (protocol), and it is not just "file". ++ if (!startDir.directory().isEmpty() || ++ (!startDir.scheme().isEmpty() && !startDir.isLocalFile())) ++ { // can use start directory + ret = startDir; // will be checked by stat later + // If we won't be able to list it (e.g. http), then use default + if ( !KProtocolManager::supportsListing( ret ) ) { diff --git a/libre/kdelibs-libre/use-pythondontwritebytecode.patch b/libre/kdelibs-libre/use-pythondontwritebytecode.patch index 9734f44fb..9b5d92042 100755 --- a/libre/kdelibs-libre/use-pythondontwritebytecode.patch +++ b/libre/kdelibs-libre/use-pythondontwritebytecode.patch @@ -1,6 +1,18 @@ ---- kdelibs-4.9.3/cmake/modules/PythonMacros.cmake~ 2012-11-06 10:32:38.564034292 +0000 -+++ kdelibs-4.9.3/cmake/modules/PythonMacros.cmake 2012-11-06 10:35:51.829341102 +0000 -@@ -23,53 +23,55 @@ +From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> +Date: Wed, 07 Nov 2012 19:08:01 +0000 +Subject: Respect PYTHONDONTWRITEBYTECODE environmental variable. +X-Git-Url: http://quickgit.kde.org/?p=kdelibs.git&a=commitdiff&h=5a3cedacdb6485f7551090467cffb2cdf150b05a +--- +Respect PYTHONDONTWRITEBYTECODE environmental variable. + +BUG: 276151 +REVIEW: 107228 +--- + + +--- a/cmake/modules/PythonMacros.cmake ++++ b/cmake/modules/PythonMacros.cmake +@@ -23,54 +23,56 @@ # Install the source file. INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESTINATION_DIR}) @@ -9,13 +21,23 @@ - GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME) - GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE) - GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH) -- ++ # Byte compile and install the .pyc file. ++ IF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "") ++ GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE) ++ GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME) ++ GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE) ++ GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH) + - if(WIN32) - string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}") - endif(WIN32) -- ++ if(WIN32) ++ string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}") ++ endif(WIN32) + - SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) -- ++ SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) + - # Python 3.2 changed the pyc file location - IF(PYTHON_SHORT_VERSION GREATER 3.1) - # To get the right version for suffix @@ -24,11 +46,21 @@ - ELSE(PYTHON_SHORT_VERSION GREATER 3.1) - SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) - ENDIF(PYTHON_SHORT_VERSION GREATER 3.1) -- ++ # Python 3.2 changed the pyc file location ++ IF(PYTHON_SHORT_VERSION GREATER 3.1) ++ # To get the right version for suffix ++ STRING(REPLACE "." "" _suffix ${PYTHON_SHORT_VERSION}) ++ SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${_suffix}.pyc) ++ ELSE(PYTHON_SHORT_VERSION GREATER 3.1) ++ SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) ++ ENDIF(PYTHON_SHORT_VERSION GREATER 3.1) + - FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) -- ++ FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) + - SET(_message "Byte-compiling ${_bin_py}") -- ++ SET(_message "Byte-compiling ${_bin_py}") + - GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) - IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. - ADD_CUSTOM_COMMAND( @@ -46,38 +78,6 @@ - DEPENDS ${_absfilename} - ) - ENDIF(_abs_bin_py STREQUAL ${_absfilename}) -- -- IF(PYTHON_SHORT_VERSION GREATER 3.1) -- INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}/__pycache__/) -- ELSE (PYTHON_SHORT_VERSION GREATER 3.1) -- INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}) -- ENDIF (PYTHON_SHORT_VERSION GREATER 3.1) -+ # Byte compile and install the .pyc file. -+ IF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "") -+ GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE) -+ GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME) -+ GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE) -+ GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH) -+ -+ if(WIN32) -+ string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}") -+ endif(WIN32) -+ -+ SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) -+ -+ # Python 3.2 changed the pyc file location -+ IF(PYTHON_SHORT_VERSION GREATER 3.1) -+ # To get the right version for suffix -+ STRING(REPLACE "." "" _suffix ${PYTHON_SHORT_VERSION}) -+ SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${_suffix}.pyc) -+ ELSE(PYTHON_SHORT_VERSION GREATER 3.1) -+ SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) -+ ENDIF(PYTHON_SHORT_VERSION GREATER 3.1) -+ -+ FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) -+ -+ SET(_message "Byte-compiling ${_bin_py}") -+ + GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) + IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. + ADD_CUSTOM_COMMAND( @@ -95,7 +95,12 @@ + DEPENDS ${_absfilename} + ) + ENDIF(_abs_bin_py STREQUAL ${_absfilename}) -+ + +- IF(PYTHON_SHORT_VERSION GREATER 3.1) +- INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}/__pycache__/) +- ELSE (PYTHON_SHORT_VERSION GREATER 3.1) +- INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}) +- ENDIF (PYTHON_SHORT_VERSION GREATER 3.1) + IF(PYTHON_SHORT_VERSION GREATER 3.1) + INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}/__pycache__/) + ELSE (PYTHON_SHORT_VERSION GREATER 3.1) @@ -104,3 +109,5 @@ + ENDIF("$ENV{PYTHONDONTWRITEBYTECODE}" STREQUAL "") ENDMACRO(PYTHON_INSTALL) + + |