Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "André Erdmann" <dywi@...>
Subject: proj/R_overlay:master commit in: roverlay/metadata/
Date: Tue, 26 Jun 2012 15:42:55 +0000 (UTC)
commit:     b0739582a711f64395226e8c33a4a3a6b9b66298
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Tue Jun 26 15:38:46 2012 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Tue Jun 26 15:38:46 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=b0739582

fix metadata creation

* replaces yesterday's workaround

	modified:   roverlay/metadata/__init__.py
	modified:   roverlay/metadata/nodes.py

---
 roverlay/metadata/__init__.py |   37 ++++++++++++++++++++-----------------
 roverlay/metadata/nodes.py    |   10 ++++------
 2 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/roverlay/metadata/__init__.py b/roverlay/metadata/__init__.py
index 3385119..13fc169 100644
--- a/roverlay/metadata/__init__.py
+++ b/roverlay/metadata/__init__.py
@@ -6,6 +6,8 @@ import roverlay.config
 
 from roverlay.metadata import nodes
 
+USE_FULL_DESCRIPTION = True
+
 class MetadataJob ( object ):
 	"""R package description data -> metadata.xml interface."""
 
@@ -34,28 +36,29 @@ class MetadataJob ( object ):
 
 		returns: None (implicit)
 		"""
-		desc_data = package_info ['desc_data']
+		data = package_info ['desc_data']
 
 		mref = self._metadata
 
 		max_textline_width = roverlay.config.get ( 'METADATA.linewidth', 65 )
 
-		# FIXME/TODO remove long/not long bool from DescriptionNode!
-
-		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 ['Description'],
-				is_long=True,
-				linewidth=max_textline_width
-			) )
-		elif 'Title' in desc_data:
-			mref.add ( nodes.DescriptionNode (
-				desc_data ['Title'],
-				is_long=True,
-				linewidth=max_textline_width
-			) )
+
+		description = None
+
+		if USE_FULL_DESCRIPTION and 'Title' in data and 'Description' in data:
+			description = data ['Title'] + ' // ' + data ['Description']
+
+		elif 'Description' in data:
+			description = ddata ['Description']
+
+		elif 'Title' in data:
+			description = data ['Title']
+
+		#if description:
+		if description is not None:
+			mref.add (
+				nodes.DescriptionNode ( description, linewidth=max_textline_width )
+			)
 
 		# these USE flags are described in profiles/use.desc,
 		#  no need to include them here

diff --git a/roverlay/metadata/nodes.py b/roverlay/metadata/nodes.py
index 4d4d5fd..1fba079 100644
--- a/roverlay/metadata/nodes.py
+++ b/roverlay/metadata/nodes.py
@@ -100,25 +100,23 @@ class MetadataRoot ( MetadataNodeNamedAccess ):
 
 
 class DescriptionNode ( MetadataLeaf ):
-	"""A description (<description.../>, <longdescription.../>) node."""
+	"""A description (<longdescription.../>) node."""
 
-	def __init__ ( self, description, is_long=False, linewidth=None ):
+	def __init__ ( self, description, linewidth=None ):
 		"""Initializes a DescriptionNode.
 
 		arguments:
 		* description -- description text
-		* is_long     -- if this is a longdescription or a description node
 		* linewidth   -- max text line width
 		"""
 		super ( DescriptionNode, self ) . __init__ (
-			'longdescription' if is_long else 'description',
-			value=description,
+			'longdescription', value=description
 		)
 
 		if not linewidth is None and linewidth > 0:
 			self.linewidth = linewidth
 
-		self.priority = 150 if is_long else 149
+		self.priority = 150
 	# --- end of __init__ (...) ---
 
 	# using value formatting


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
proj/R_overlay:master commit in: roverlay/metadata/
Next by thread:
proj/R_overlay:master commit in: roverlay/remote/
Previous by date:
proj/R_overlay:master commit in: /
Next by date:
proj/R_overlay:master commit in: roverlay/overlay/


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.