Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 315735 - Repoman dies on metadata.xml USE-related errors without printing the full metadata.xml path
Summary: Repoman dies on metadata.xml USE-related errors without printing the full met...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 335925
  Show dependency tree
 
Reported: 2010-04-17 12:50 UTC by Michał Górny
Modified: 2010-09-22 03:47 UTC (History)
0 users

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


Attachments
The described patch (portage-315735-repoman-metadata-useflag-errors.diff,1.62 KB, patch)
2010-04-17 12:51 UTC, Michał Górny
Details | Diff
git-am format patch (0002-Make-metadata.xml-flag-errors-non-fatal-to-repoman.patch,1.88 KB, patch)
2010-04-23 22:05 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.