From 127ae1407a831bac9943f5a785bb35532eef781a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sat, 18 Nov 2006 21:29:47 +0000 Subject: [PATCH] Add patch to backport the fix for backup files. Package-Manager: portage-2.1.2_rc2 --- app-editors/kile/ChangeLog | 8 ++- app-editors/kile/Manifest | 25 +++++-- app-editors/kile/files/digest-kile-1.9.2-r1 | 3 + .../kile/files/kile-1.9.2-backupfile.patch | 69 +++++++++++++++++++ app-editors/kile/kile-1.9.2-r1.ebuild | 47 +++++++++++++ 5 files changed, 144 insertions(+), 8 deletions(-) create mode 100644 app-editors/kile/files/digest-kile-1.9.2-r1 create mode 100644 app-editors/kile/files/kile-1.9.2-backupfile.patch create mode 100644 app-editors/kile/kile-1.9.2-r1.ebuild diff --git a/app-editors/kile/ChangeLog b/app-editors/kile/ChangeLog index 2a15db6eaa73..d06e18431028 100644 --- a/app-editors/kile/ChangeLog +++ b/app-editors/kile/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-editors/kile # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/kile/ChangeLog,v 1.80 2006/11/18 20:57:33 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/kile/ChangeLog,v 1.81 2006/11/18 21:29:47 flameeyes Exp $ + +*kile-1.9.2-r1 (18 Nov 2006) + + 18 Nov 2006; Diego Pettenò + +files/kile-1.9.2-backupfile.patch, +kile-1.9.2-r1.ebuild: + Add patch to backport the fix for backup files. *kile-1.9.3 (18 Nov 2006) diff --git a/app-editors/kile/Manifest b/app-editors/kile/Manifest index 796aa5a9a718..d1c0df994aaa 100644 --- a/app-editors/kile/Manifest +++ b/app-editors/kile/Manifest @@ -1,6 +1,10 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX kile-1.9.2-backupfile.patch 3095 RMD160 48674fb6300d8a427b217c6b4a12171d85f078ac SHA1 16ab0a5e6757bbb23a37e9cac7c2b2d80e38c8da SHA256 2d3423d69c0af145b549af0fbc4690443a4ecfd312ffaf3eda621def1e413af4 +MD5 f00695ba929f8159b4f4e729c3fdb826 files/kile-1.9.2-backupfile.patch 3095 +RMD160 48674fb6300d8a427b217c6b4a12171d85f078ac files/kile-1.9.2-backupfile.patch 3095 +SHA256 2d3423d69c0af145b549af0fbc4690443a4ecfd312ffaf3eda621def1e413af4 files/kile-1.9.2-backupfile.patch 3095 AUX kile-1.9_rc1-gcc41.patch 542 RMD160 f4210f0a67815f71d74b6afe895013506b70d614 SHA1 f342d341ac1eb91981a3ad1499e37bd1eb7990ae SHA256 3c1f5680384fbedcdb01f9d3e6f8ce65176ff0fe1103c2d8c206fcb527a4512b MD5 0bbde3e9a4218efea57a330227808e7a files/kile-1.9_rc1-gcc41.patch 542 RMD160 f4210f0a67815f71d74b6afe895013506b70d614 files/kile-1.9_rc1-gcc41.patch 542 @@ -18,6 +22,10 @@ EBUILD kile-1.9.1.ebuild 1281 RMD160 d587e43dec4729b5e1aed5aea2b77e66da16bdb0 SH MD5 6fdfbb3502d1fc1ef63e48722b479d61 kile-1.9.1.ebuild 1281 RMD160 d587e43dec4729b5e1aed5aea2b77e66da16bdb0 kile-1.9.1.ebuild 1281 SHA256 6873982fa6c9dbac02587dab44f6bba64552014e838e02587280957512bd1799 kile-1.9.1.ebuild 1281 +EBUILD kile-1.9.2-r1.ebuild 1335 RMD160 8782f2865ff1966840ee7517ddbd2a27b2c57b67 SHA1 3190f428bc5359047c475aa525907f6e7db2b234 SHA256 3a4731a2d26906591a0ff8e9bc5795b773cf6e575a9adb8c1e566d562439356f +MD5 6c7c81fc5610045ac9fed19203471766 kile-1.9.2-r1.ebuild 1335 +RMD160 8782f2865ff1966840ee7517ddbd2a27b2c57b67 kile-1.9.2-r1.ebuild 1335 +SHA256 3a4731a2d26906591a0ff8e9bc5795b773cf6e575a9adb8c1e566d562439356f kile-1.9.2-r1.ebuild 1335 EBUILD kile-1.9.2.ebuild 1275 RMD160 ca5056309db94228eba8e35486d587cf46529882 SHA1 3d5326417b4e5800eec65336e596ea69e43faf40 SHA256 f6eadcfbb6dd3fbd6bd11c06f3d8aa5bc5cee0a98434e86cbb7a5edbd609b09f MD5 cf14981ff98a8bcb97edf3113c6cdabf kile-1.9.2.ebuild 1275 RMD160 ca5056309db94228eba8e35486d587cf46529882 kile-1.9.2.ebuild 1275 @@ -30,10 +38,10 @@ EBUILD kile-1.9.ebuild 1279 RMD160 5b96ac2ae9c55fc040729d15b2dd46555f15d2fe SHA1 MD5 0b45d1cb8d1f939877acf6cd60edd89b kile-1.9.ebuild 1279 RMD160 5b96ac2ae9c55fc040729d15b2dd46555f15d2fe kile-1.9.ebuild 1279 SHA256 97b85205ec7b90ae63951ddffb4d753fac8eb053f92a17114d60ed3396118e61 kile-1.9.ebuild 1279 -MISC ChangeLog 10173 RMD160 bf3836b132b6efb8fc2f6cd5413ae6638d723401 SHA1 dcb47c774cc97fbcc9ed4de52cc60159df10eee3 SHA256 8805cb3cd6c31b3ea6952ead015b5c912a301dcc3d0037279cba41f8f8c55e6d -MD5 6fad4549780916f519186dfa9d32d738 ChangeLog 10173 -RMD160 bf3836b132b6efb8fc2f6cd5413ae6638d723401 ChangeLog 10173 -SHA256 8805cb3cd6c31b3ea6952ead015b5c912a301dcc3d0037279cba41f8f8c55e6d ChangeLog 10173 +MISC ChangeLog 10368 RMD160 a45258c85bb9c6c541a06a36ee37337297e7e703 SHA1 8f5b8cc7744a7d4d79ce950c15c4355b71829d5e SHA256 a20115d448bfaae0b15e25bfa0973a91d1c1ac6df6bf69f2053cc85cf980b27e +MD5 4d4ea7b52498e1ee8560349fe4668b80 ChangeLog 10368 +RMD160 a45258c85bb9c6c541a06a36ee37337297e7e703 ChangeLog 10368 +SHA256 a20115d448bfaae0b15e25bfa0973a91d1c1ac6df6bf69f2053cc85cf980b27e ChangeLog 10368 MISC metadata.xml 181 RMD160 602e33702bf0bc23743046d6ffcf5c6820f2170d SHA1 c938d293a26147a2d53518268a752b4cd447e05f SHA256 7e237c2519d9c85d1e328c3bfe740321930b669002736eef72b686b1c3130b3e MD5 fa58af71489f3336e2a705d8b1f474ca metadata.xml 181 RMD160 602e33702bf0bc23743046d6ffcf5c6820f2170d metadata.xml 181 @@ -50,13 +58,16 @@ SHA256 59b07b42d0fbc835aed1261ce98c0093d3e3186ed5e4b5786e33b718e4edf5ea files/di MD5 d131f840bd6c12f9030c23ca598863a1 files/digest-kile-1.9.2 238 RMD160 5f19c1b85dae8dcad6b3497bef51359232e32a27 files/digest-kile-1.9.2 238 SHA256 db78c56e80a89a8099a7b52b56be65c2fd7ed69e2e94de4c16b388f56ed6732c files/digest-kile-1.9.2 238 +MD5 d131f840bd6c12f9030c23ca598863a1 files/digest-kile-1.9.2-r1 238 +RMD160 5f19c1b85dae8dcad6b3497bef51359232e32a27 files/digest-kile-1.9.2-r1 238 +SHA256 db78c56e80a89a8099a7b52b56be65c2fd7ed69e2e94de4c16b388f56ed6732c files/digest-kile-1.9.2-r1 238 MD5 b4ee38508db21890a1c6f92999435228 files/digest-kile-1.9.3 238 RMD160 da62987689baad9499f1f218c54a52a7b75b82ab files/digest-kile-1.9.3 238 SHA256 4d043b35856b6065eae06f0930f952f6db4b17aef2b36f078f78b6cb4594dc7c files/digest-kile-1.9.3 238 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) -iD8DBQFFX3PQAiZjviIA2XgRAtCZAJ4mI7Mmd3Py+DESpJZAeVCyl0ROZgCffe++ -rTONLAE8Q2M2OBv+pdCgSAM= -=ruFr +iD8DBQFFX3tVAiZjviIA2XgRAsn+AKDgryj2eXaN9tUntnx4Gp7uxfzGlQCg1sNq +RummbRYYrqloxMOXTvjVjQw= +=0EGh -----END PGP SIGNATURE----- diff --git a/app-editors/kile/files/digest-kile-1.9.2-r1 b/app-editors/kile/files/digest-kile-1.9.2-r1 new file mode 100644 index 000000000000..1f96630b8cf3 --- /dev/null +++ b/app-editors/kile/files/digest-kile-1.9.2-r1 @@ -0,0 +1,3 @@ +MD5 2f4fa752595c9011fd9292d7ff99d124 kile-1.9.2.tar.bz2 5038779 +RMD160 d3b7245412d57ce38275348fc67b6f8b875a2976 kile-1.9.2.tar.bz2 5038779 +SHA256 292bc8a5d868faf70f7e0b3c868da30ad3ad77b3355ca08389e60e1339175c00 kile-1.9.2.tar.bz2 5038779 diff --git a/app-editors/kile/files/kile-1.9.2-backupfile.patch b/app-editors/kile/files/kile-1.9.2-backupfile.patch new file mode 100644 index 000000000000..fb1b8dfe8bed --- /dev/null +++ b/app-editors/kile/files/kile-1.9.2-backupfile.patch @@ -0,0 +1,69 @@ +--- kile-1.9.2/src/kile/kiledocmanager.cpp 2006-05-07 23:44:53.000000000 +0200 ++++ kile-1.9.3/src/kile/kiledocmanager.cpp 2006-11-18 20:55:03.000000000 +0100 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #include "kileuntitled.h" + #include "templates.h" +@@ -743,10 +747,8 @@ + { + Kate::View *view; + QFileInfo fi; +- bool successBackup; + int saveResult; +- QString backupFileName; +- KURL url; ++ KURL url, backupUrl; + + kdDebug() << "===Kile::fileSaveAll=================" << endl; + kdDebug() << "autosaving = " << amAutoSaving << ", DisUntitled = " << disUntitled << endl; +@@ -759,7 +761,6 @@ + { + url = view->getDoc()->url(); + fi.setFile(url.path()); +- backupFileName = url.path()+ ".backup"; + + if ( ( !amAutoSaving && !(disUntitled && url.isEmpty() ) ) // DisregardUntitled is true and we have an untitled doc and don't autosave + || ( amAutoSaving && !url.isEmpty() ) //don't save untitled documents when autosaving +@@ -768,10 +769,34 @@ + { + if (amAutoSaving && fi.size() > 0) // the size check ensures that we don't save empty files (to prevent something like #125809 in the future). + { +- kdDebug() << "autosaving: " << backupFileName << endl; +- successBackup = KIO::NetAccess::file_copy(url, KURL::fromPathOrURL(backupFileName), -1, true, false, kapp->mainWidget()); +- if(!successBackup) +- m_ki->logWidget()->printMsg(KileTool::Error,i18n("The file %1 could not be saved, check the permissions and the free disk space!").arg(backupFileName),i18n("Autosave")); ++ KURL backupUrl = KURL::fromPathOrURL(url.path()+ ".backup"); ++ kdDebug() << "autosaving: " << backupUrl.prettyURL() << endl; ++ ++ // patch for secure permissions, slightly modified for kile by Thomas Braun, taken from #103331 ++ ++ // get the right permissions, start with safe default ++ mode_t perms = 0600; ++ KIO::UDSEntry fentry; ++ if (KIO::NetAccess::stat (url, fentry, kapp->mainWidget())) ++ { ++ kdDebug () << "stating successfull: " << url.prettyURL() << endl; ++ KFileItem item (fentry, url); ++ perms = item.permissions(); ++ } ++ ++ // first del existing file if any, than copy over the file we have ++ // failure if a: the existing file could not be deleted, b: the file could not be copied ++ if ( (!KIO::NetAccess::exists( backupUrl, false, kapp->mainWidget() ) ++ || KIO::NetAccess::del( backupUrl, kapp->mainWidget() ) ) ++ && KIO::NetAccess::file_copy( url, backupUrl, perms, true, false, kapp->mainWidget() ) ) ++ { ++ kdDebug()<<"backing up successfull ("< "< "<logWidget()->printMsg(KileTool::Error,i18n("The file %1 could not be saved, check the permissions and the free disk space!").arg(backupUrl.prettyURL()),i18n("Autosave")); ++ } + } + + kdDebug() << "saving: " << url.path() << endl; diff --git a/app-editors/kile/kile-1.9.2-r1.ebuild b/app-editors/kile/kile-1.9.2-r1.ebuild new file mode 100644 index 000000000000..767150351bf1 --- /dev/null +++ b/app-editors/kile/kile-1.9.2-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-editors/kile/kile-1.9.2-r1.ebuild,v 1.1 2006/11/18 21:29:47 flameeyes Exp $ + +inherit kde + +MY_P="${P/_rc/rc}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="A Latex Editor and TeX shell for kde" +HOMEPAGE="http://kile.sourceforge.net/" +SRC_URI="mirror://sourceforge/kile/${MY_P}.tar.bz2" +LICENSE="GPL-2" + +SLOT=0 +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="kde" + +RDEPEND="dev-lang/perl + virtual/tetex + dev-tex/latex2html + kde? ( || ( ( kde-base/kpdf + kde-base/kghostview + kde-base/kdvi + kde-base/kviewshell ) + kde-base/kdegraphics ) )" + +need-kde 3.2 + +LANGS="br ca cs cy da de el en_GB es et eu fi fr ga gl hi hu is it ja lt mt nb +nl nn pa pl pt pt_BR ro ru rw sk sr sr@Latn sv ta tr zh_CN" +for lang in ${LANGS}; do + IUSE="${IUSE} linguas_${lang}" +done + +PATCHES="${FILESDIR}/${P}-backupfile.patch" + +src_unpack() { + kde_src_unpack + + if [[ -n ${LINGUAS} ]]; then + MAKE_TRANSL=$(echo $(echo "${LINGUAS} ${LANGS}" | fmt -w 1 | sort | uniq -d)) + einfo "Building translations for: ${MAKE_TRANSL}" + sed -i -e "s:^SUBDIRS.*=.*:SUBDIRS = ${MAKE_TRANSL}:" ${S}/translations/Makefile.am || die "sed for locale failed" + rm -f ${S}/configure + fi +} -- 2.26.2