Gentoo Archives: gentoo-commits

From: "André Erdmann" <dywi@×××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/metadata/
Date: Mon, 25 Jun 2012 18:20:09
Message-Id: 1340647616.bd3de81c48d6cbc0bab375f188b4866ae91d3e37.dywi@gentoo
commit:     bd3de81c48d6cbc0bab375f188b4866ae91d3e37
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Jun 25 18:06:56 2012 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Mon Jun 25 18:06:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=bd3de81c

fix DescriptionNode creation in metadata

	modified:   roverlay/metadata/__init__.py

---
 roverlay/metadata/__init__.py |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/roverlay/metadata/__init__.py b/roverlay/metadata/__init__.py
index 8d94325..3385119 100644
--- a/roverlay/metadata/__init__.py
+++ b/roverlay/metadata/__init__.py
@@ -40,25 +40,22 @@ class MetadataJob ( object ):
 
 		max_textline_width = roverlay.config.get ( 'METADATA.linewidth', 65 )
 
-		have_desc = False
+		# FIXME/TODO remove long/not long bool from DescriptionNode!
 
-		if 'Title' in desc_data:
+		if 'Description' in desc_data:
+			# !passing have_desc for DescriptionNode's is_long parameter redirects
+			# !the second description info into <longdescription.../>
 			mref.add ( nodes.DescriptionNode (
-				desc_data ['Title'],
-				is_long=have_desc,
+				desc_data ['Description'],
+				is_long=True,
 				linewidth=max_textline_width
 			) )
-			have_desc = True
-
-		if 'Description' in desc_data:
-			# passing have_desc for DescriptionNode's is_long parameter redirects
-			# the second description info into <longdescription.../>
+		elif 'Title' in desc_data:
 			mref.add ( nodes.DescriptionNode (
-				desc_data ['Description'],
-				is_long=have_desc,
+				desc_data ['Title'],
+				is_long=True,
 				linewidth=max_textline_width
 			) )
-			have_desc = True
 
 		# these USE flags are described in profiles/use.desc,
 		#  no need to include them here