summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin McCarthy <signals@gentoo.org>2011-02-28 18:20:11 +0000
committerKevin McCarthy <signals@gentoo.org>2011-02-28 18:20:11 +0000
commit13f4c3b92e9c8f9bf3796f2a3a694adc103512c6 (patch)
treef4b320235a143401d9f9d3cb27f07f64bb501644 /x11-misc/xfe
parentSync eclass from the x11 overlay. (diff)
downloadgentoo-2-13f4c3b92e9c8f9bf3796f2a3a694adc103512c6.tar.gz
gentoo-2-13f4c3b92e9c8f9bf3796f2a3a694adc103512c6.tar.bz2
gentoo-2-13f4c3b92e9c8f9bf3796f2a3a694adc103512c6.zip
Fix #356683
(Portage version: 2.2.0_alpha25/cvs/Linux x86_64)
Diffstat (limited to 'x11-misc/xfe')
-rw-r--r--x11-misc/xfe/ChangeLog10
-rw-r--r--x11-misc/xfe/files/xfe-1.32.2-destructive-move.patch161
-rw-r--r--x11-misc/xfe/xfe-1.32.2-r1.ebuild49
3 files changed, 218 insertions, 2 deletions
diff --git a/x11-misc/xfe/ChangeLog b/x11-misc/xfe/ChangeLog
index d6cb08950d56..a23fe7a229b8 100644
--- a/x11-misc/xfe/ChangeLog
+++ b/x11-misc/xfe/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-misc/xfe
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/xfe/ChangeLog,v 1.64 2010/11/02 12:46:54 ssuominen Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xfe/ChangeLog,v 1.65 2011/02/28 18:20:11 signals Exp $
+
+*xfe-1.32.2-r1 (28 Feb 2011)
+
+ 28 Feb 2011; Kevin McCarthy <signals@gentoo.org> +xfe-1.32.2-r1.ebuild,
+ +files/xfe-1.32.2-destructive-move.patch:
+ Fixed delete of source files on failed move. #356683
02 Nov 2010; Samuli Suominen <ssuominen@gentoo.org> xfe-1.32.2.ebuild,
+files/xfe-1.32.2-missing_Xlib_h.patch:
diff --git a/x11-misc/xfe/files/xfe-1.32.2-destructive-move.patch b/x11-misc/xfe/files/xfe-1.32.2-destructive-move.patch
new file mode 100644
index 000000000000..a01ae5699b38
--- /dev/null
+++ b/x11-misc/xfe/files/xfe-1.32.2-destructive-move.patch
@@ -0,0 +1,161 @@
+Fixes bug #356683. Patch from upstream author. Thanks to
+genbug AT piments DOT com.
+
+--- src/File.cpp
++++ src/File.cpp
+@@ -326,7 +326,7 @@
+
+
+ // Copy ordinary file
+-FXbool File::copyfile(const FXString& source, const FXString& target, const FXbool preserve_date)
++FXint File::copyfile(const FXString& source, const FXString& target, const FXbool preserve_date)
+ {
+ FXString destfile;
+ FXuchar buffer[32768];
+@@ -499,7 +499,6 @@
+ restartTimeout();
+ if(answer == BOX_CLICKED_CANCEL)
+ {
+- ::close(dst);
+ ::close(src);
+ cancelled=TRUE;
+ return FALSE;
+@@ -512,7 +511,7 @@
+
+
+ // Copy directory
+-FXbool File::copydir(const FXString& source,const FXString& target,struct stat& parentinfo,inodelist* inodes, const FXbool preserve_date)
++FXint File::copydir(const FXString& source,const FXString& target,struct stat& parentinfo,inodelist* inodes, const FXbool preserve_date)
+ {
+ DIR *dirp;
+ struct dirent *dp;
+@@ -635,7 +634,7 @@
+
+
+ // Recursive copy
+-FXbool File::copyrec(const FXString& source,const FXString& target,inodelist* inodes, const FXbool preserve_date)
++FXint File::copyrec(const FXString& source,const FXString& target,inodelist* inodes, const FXbool preserve_date)
+ {
+ struct stat linfo1, linfo2;
+
+@@ -666,7 +665,7 @@
+ // Remove target if it already exists
+ if (::exists(target))
+ {
+- FXbool ret=File::remove(target);
++ FXint ret=File::remove(target);
+ if (!ret)
+ return FALSE;
+ }
+@@ -695,7 +694,7 @@
+ // Copy file (with progress dialog)
+ // Return 0 to allow displaying an error message in the calling routine
+ // Return -1 to prevent displaying an error message in the calling routine
+-FXbool File::copy(const FXString& source, const FXString& target, const FXbool confirm_dialog, const FXbool preserve_date)
++FXint File::copy(const FXString& source, const FXString& target, const FXbool confirm_dialog, const FXbool preserve_date)
+ {
+ FXString targetfile;
+
+@@ -793,7 +792,7 @@
+
+
+ // Remove file or directory (with progress dialog)
+-FXbool File::remove(const FXString& file)
++FXint File::remove(const FXString& file)
+ {
+ FXString dirname;
+ struct stat linfo;
+@@ -935,7 +934,7 @@
+ // Rename a file or a directory (no progress dialog)
+ // Return 0 to allow displaying an error message in the calling routine
+ // Return -1 to prevent displaying an error message in the calling routine
+-FXbool File::rename(const FXString& source, const FXString& target)
++FXint File::rename(const FXString& source, const FXString& target)
+ {
+ // Source doesn't exist
+ if(!::exists(source))
+@@ -1002,7 +1001,7 @@
+ }
+
+ // If files are on different file systems, use the copy/delete scheme and preserve the original date
+- FXbool ret=this->copy(source,target,FALSE,TRUE);
++ FXint ret=this->copy(source,target,FALSE,TRUE);
+ if (ret)
+ return (remove(source.text())==TRUE);
+ else
+@@ -1013,7 +1012,7 @@
+ // Move files
+ // Return 0 to allow displaying an error message in the calling routine
+ // Return -1 to prevent displaying an error message in the calling routine
+-FXbool File::move(const FXString& source,const FXString& target,const FXbool restore)
++FXint File::move(const FXString& source,const FXString& target,const FXbool restore)
+ {
+ // Source doesn't exist
+ if(!::exists(source))
+@@ -1031,6 +1030,16 @@
+ return -1;
+ }
+
++ // Source path is included into target path
++ FXString str=source + PATHSEPSTRING;
++ if (target.left(str.length()) == str)
++ {
++ forceTimeout();
++ MessageBox::error(this,BOX_OK,_("Error"),_("Source path %s is included into target path"),source.text());
++ return -1;
++
++ }
++
+ // Target is an existing directory (don't do this in the restore case)
+ FXString targetfile;
+ if (!restore && ::isDirectory(target))
+@@ -1129,7 +1138,7 @@
+ targetfile=FXPath::directory(targetfile);
+
+ // If files are on different file systems, use the copy/delete scheme and preserve the original date
+- FXbool ret=this->copy(source,targetfile,FALSE,TRUE);
++ FXint ret=this->copy(source,targetfile,FALSE,TRUE);
+ if (ret)
+ return (remove(source.text())==TRUE);
+ else
+@@ -1140,7 +1149,7 @@
+ // Symbolic Link file (no progress dialog)
+ // Return 0 to allow displaying an error message in the calling routine
+ // Return -1 to prevent displaying an error message in the calling routine
+-FXbool File::symlink(const FXString& source,const FXString& target)
++FXint File::symlink(const FXString& source,const FXString& target)
+ {
+ // Source doesn't exist
+ if(!::exists(source))
+--- src/File.h
++++ src/File.h
+@@ -64,9 +64,9 @@
+ long fullread(FXint fd, FXuchar* ptr, long len);
+ long fullwrite(FXint fd, const FXuchar* ptr, long len);
+ FXuint getOverwriteAnswer(FXString, FXString);
+- FXbool copyfile(const FXString& source, const FXString& target, const FXbool preserve_date);
+- FXbool copyrec(const FXString& source,const FXString& target,inodelist* inodes, const FXbool preserve_date);
+- FXbool copydir(const FXString& source,const FXString& target,struct stat& parentstatus,inodelist* inodes, const FXbool preserve_date);
++ FXint copyfile(const FXString& source, const FXString& target, const FXbool preserve_date);
++ FXint copyrec(const FXString& source,const FXString& target,inodelist* inodes, const FXbool preserve_date);
++ FXint copydir(const FXString& source,const FXString& target,struct stat& parentstatus,inodelist* inodes, const FXbool preserve_date);
+ FXint rchmod(FXchar* path, FXchar* file, mode_t mode, const FXbool dironly, const FXbool fileonly);
+ FXint rchown(FXchar* path, FXchar* file, uid_t uid, gid_t gid, const FXbool dironly, const FXbool fileonly);
+ FXLabel *uplabel;
+@@ -107,11 +107,11 @@
+ restartTimeout();
+ }
+
+- FXbool copy(const FXString& source, const FXString& target, const FXbool confirm_dialog=TRUE, const FXbool preserve_date=TRUE);
+- FXbool rename(const FXString& source, const FXString& target);
+- FXbool move(const FXString& source, const FXString& target, const FXbool restore=FALSE);
+- FXbool symlink(const FXString& source, const FXString& target);
+- FXbool remove(const FXString& file);
++ FXint copy(const FXString& source, const FXString& target, const FXbool confirm_dialog=TRUE, const FXbool preserve_date=TRUE);
++ FXint rename(const FXString& source, const FXString& target);
++ FXint move(const FXString& source, const FXString& target, const FXbool restore=FALSE);
++ FXint symlink(const FXString& source, const FXString& target);
++ FXint remove(const FXString& file);
+
+ FXint chmod(FXchar* path, FXchar* file, mode_t mode, const FXbool rec, const FXbool dironly=FALSE, const FXbool fileonly=FALSE);
+ FXint chown(FXchar* path, FXchar *file, uid_t uid, gid_t gid, const FXbool rec, const FXbool dironly=FALSE, const FXbool fileonly=FALSE);
diff --git a/x11-misc/xfe/xfe-1.32.2-r1.ebuild b/x11-misc/xfe/xfe-1.32.2-r1.ebuild
new file mode 100644
index 000000000000..799941fde2a6
--- /dev/null
+++ b/x11-misc/xfe/xfe-1.32.2-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xfe/xfe-1.32.2-r1.ebuild,v 1.1 2011/02/28 18:20:11 signals Exp $
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="MS-Explorer-like minimalist file manager for X"
+HOMEPAGE="http://roland65.free.fr/xfe"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug nls startup-notification"
+
+RDEPEND="x11-libs/libX11
+ media-libs/libpng
+ =x11-libs/fox-1.6*[truetype,png]
+ startup-notification? ( x11-libs/startup-notification )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-missing_Xlib_h.patch \
+ "${FILESDIR}"/${P}-destructive-move.patch
+
+ cat >po/POTFILES.skip <<-EOF
+ src/icons.cpp
+ xfe.desktop.in.in
+ xfi.desktop.in.in
+ xfp.desktop.in.in
+ xfv.desktop.in.in
+ xfw.desktop.in.in
+ EOF
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable nls) \
+ $(use_enable startup-notification sn) \
+ $(use_enable debug)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS BUGS ChangeLog NEWS README TODO
+}