Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 490776 - =net-misc/electrum-1.9.2 - ebuild fails to remove gui modules by USE flags
Summary: =net-misc/electrum-1.9.2 - ebuild fails to remove gui modules by USE flags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-08 19:49 UTC by Emery Hemingway
Modified: 2014-01-02 22:25 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emery Hemingway 2013-11-08 19:49:14 UTC
The electrum ebuild attempts to remove paths that no long exist in the code repository.

Reproducible: Always

Steps to Reproduce:
USE="-gtk" emerge electrum
USE="-qt4" emerge electrum
Comment 1 Emery Hemingway 2013-11-08 19:49:29 UTC
--- /usr/portage/net-misc/electrum/electrum-1.9.2.ebuild	2013-11-06 07:19:06.000000000 -0500
+++ bitcoin-overlay/net-misc/electrum/electrum-1.9.2-r1.ebuild	2013-11-08 14:41:08.124331177 -0500
@@ -57,12 +57,10 @@
 
 	# Remove unrequested GUI implementations:
 	if use !gtk; then
-		rm gui/gui_gtk.py || die
+		sed -i "/'electrum_gui.gtk/d" setup.py	|| die
 	fi
 	if use !qt4; then
-		rm gui/gui_{classic,lite}.py gui/qt_{console,util}.py || die
-		sed -i "/config.get('gui','classic')/s/classic/gtk/" electrum \
-			|| die
+		sed -i "/'electrum_gui.qt/d" setup.py	|| die
 	fi
 
 	distutils-r1_src_prepare
Comment 2 Emery Hemingway 2013-11-08 20:29:44 UTC
(In reply to Emery Hemingway from comment #1)
scratch that last diff,

--- /usr/portage/net-misc/electrum/electrum-1.9.2.ebuild	2013-11-06 07:19:06.000000000 -0500
+++ bitcoin-overlay/net-misc/electrum/electrum-1.9.2-r1.ebuild	2013-11-08 15:21:42.574896357 -0500
@@ -17,7 +17,6 @@
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="gtk qt4"
-REQUIRED_USE="|| ( gtk qt4 )"
 
 LANGS="br cs de eo es fr it lv nl ru sl vi zh"
 
@@ -28,7 +27,7 @@
 
 RDEPEND="
 	dev-python/setuptools
-	dev-python/ecdsa
+	>=dev-python/ecdsa-0.9
 	dev-python/slowaes
 	gtk? ( dev-python/pygtk:2 )
 	qt4? ( dev-python/PyQt4 )"
@@ -57,12 +56,18 @@
 
 	# Remove unrequested GUI implementations:
 	if use !gtk; then
-		rm gui/gui_gtk.py || die
+		sed -i "/'electrum_gui.gtk/d" setup.py || die
 	fi
 	if use !qt4; then
-		rm gui/gui_{classic,lite}.py gui/qt_{console,util}.py || die
-		sed -i "/config.get('gui','classic')/s/classic/gtk/" electrum \
-			|| die
+		sed -i "/'electrum_gui.qt/d" setup.py  || die
+	fi
+
+	if use !qt4; then
+		if use gtk; then
+			sed -i "s/config.get('gui','classic')/ config.get('gui','gtk')/" electrum || die
+		else
+			sed -i "s/config.get('gui','classic')/ config.get('gui','text')/" electrum || die
+		fi
 	fi
 
 	distutils-r1_src_prepare
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2013-12-31 21:17:40 UTC
@Blueness (or other maintainers), care to review the diff and commit (or say "ok" so we can commit for you)?
Comment 4 Emery Hemingway 2014-01-01 20:41:51 UTC
Electrum is now at version 1.9.6, ebuild in the bitcoin overlay.
Comment 5 Anthony Basile gentoo-dev 2014-01-01 23:14:26 UTC
(In reply to Emery Hemingway from comment #4)
> Electrum is now at version 1.9.6, ebuild in the bitcoin overlay.

The ebuild on the overlay and the ebuild on the tree are identical.  Unless we are talking about different overlays.  Can you give me the url?  Other than that, I'm okay with the above changes.  I'll commit them after I hear back about which overlay I should be looking at.
Comment 6 Maks Verver 2014-01-02 02:40:24 UTC
I'd like to point out that the current ebuild doesn't remove unused GUI files any more.  Maybe that's acceptable
Comment 7 Anthony Basile gentoo-dev 2014-01-02 12:53:00 UTC
(In reply to Maks Verver from comment #6)
> I'd like to point out that the current ebuild doesn't remove unused GUI
> files any more.  Maybe that's acceptable

There are ebuilds all over the place for electrum which is why I was getting confused.  Anyhow, I just looked, and this is not an issue anymore with the ebuild on the tree, ie =net-misc/electrum-1.9.6.  So close as RESOLVED FIXED.
Comment 8 Emery Hemingway 2014-01-02 17:27:53 UTC
(In reply to Maks Verver from comment #6)
> I'd like to point out that the current ebuild doesn't remove unused GUI
> files any more.  Maybe that's acceptable

The ebuild does remove files, it just does it through setup.py

The ebuild for 1.9.6 is at https://gitorious.org/bitcoin/gentoo/source/HEAD:net-misc/electrum/electrum-1.9.6.ebuild
Comment 9 Maks Verver 2014-01-02 22:25:37 UTC
(In reply to Emery Hemingway from comment #8)
> The ebuild does remove files, it just does it through setup.py
> 
> The ebuild for 1.9.6 is at
> https://gitorious.org/bitcoin/gentoo/source/HEAD:net-misc/electrum/electrum-
> 1.9.6.ebuild

My mistake -- you're right, it does.

A different complaint: this part doesn't work:

   if use !qt4; then
        if use gtk; then
            sed -i "s/config.get('gui','classic')/ config.get('gui','gtk')/" electrum || die
        else
            sed -i "s/config.get('gui','classic')/ config.get('gui','text')/" electrum || die
        fi
    fi

The regexp should match "config.get('gui', 'classic')" (note the extra space after the comma!) instead to change the default GUI.