Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 498738

Summary: www-servers/uwsgi-2.0 USE="xml json" fails because variable `xml' is assigned in a subshell
Product: Gentoo Linux Reporter: Zhixu Liu <zhixu.liu>
Component: [OLD] ServerAssignee: Ultrabug <ultrabug>
Status: RESOLVED FIXED    
Severity: normal CC: python
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Zhixu Liu 2014-01-21 01:45:26 UTC
1. use xml && (use expat && xml="expat" || xml="libxml2" )

xml will be assigned a value in a subshell, so it's useless

2. use json && (use yajl && xml="yajl" || xml="jansson" )

typo, xml should be json

Reproducible: Always




fixed w/ following patch:

diff --git a/uwsgi-2.0.ebuild b/uwsgi-2.0.ebuild
index e2bd273..c69f4f5 100644
--- a/uwsgi-2.0.ebuild
+++ b/uwsgi-2.0.ebuild
@@ -176,8 +176,12 @@ src_configure() {
        embedded_plugins="${embedded_plugins/sqlite/sqlite3}"

        # override defaults as requested by the user
-       use xml && (use expat && xml="expat" || xml="libxml2" )
-       use json && (use yajl && xml="yajl" || xml="jansson" )
+       if use xml ; then
+               use expat && xml="expat" || xml="libxml2"
+       fi
+       if use json ; then
+               use yajl && json="yajl" || json="jansson"
+       fi
        use jemalloc && malloc_impl="jemalloc"

        # prepare the buildconf for gentoo
Comment 1 Ultrabug gentoo-dev 2014-01-22 17:08:05 UTC
Thanks a lot mate, it's fixed in tree now

+*uwsgi-2.0-r1 (22 Jan 2014)
+
+  22 Jan 2014; Ultrabug <ultrabug@gentoo.org> -uwsgi-2.0.ebuild,
+  +uwsgi-2.0-r1.ebuild:
+  Fix #498738 wrt xml and json USE flag detection thx to Zhixu Liu, rev bump
+