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

Bug 315735

Summary: Repoman dies on metadata.xml USE-related errors without printing the full metadata.xml path
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: RepomanAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: minor Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 335925    
Attachments: The described patch
git-am format patch

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-17 12:50:23 UTC
If a particular metadata.xml file contains errors directly related to USE definitions (i.e. <use/> with no <flag/> inside), repoman.utilities.parse_metadata_use() function raises uncatched exception which causes repoman to die. Moreover, the message used doesn't include the full path to the broken metadata.xml file, which makes it useless when repoman is called upon a large repository (like Sunrise).

I have prepared a patch which causes repoman to catch that exception and report is as metadata.bad, which I guess is the best solution. Additionally, I have simplified the message passed with the exception to make it suitable for direct use for repoman output.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-17 12:51:11 UTC
Created attachment 228141 [details, diff]
The described patch
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-23 22:05:00 UTC
Created attachment 228927 [details, diff]
git-am format patch
Comment 4 Zac Medico gentoo-dev 2010-09-22 03:47:32 UTC
This is fixed in 2.1.9.