Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 160144 Details for
Bug 199788
GLEP56: metadata DTD updates for USE flag descriptions & validate metadata.xml at commit
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
repoman's utilities.py patch to implement GLEP 56
repoman-utilities-glep-56.py.patch (text/plain), 1.30 KB, created by
Doug Goldstein (RETIRED)
on 2008-07-11 21:42:03 UTC
(
hide
)
Description:
repoman's utilities.py patch to implement GLEP 56
Filename:
MIME Type:
Creator:
Doug Goldstein (RETIRED)
Created:
2008-07-11 21:42:03 UTC
Size:
1.30 KB
patch
obsolete
>--- /usr/lib/portage/pym/repoman/utilities.py.old 2008-06-20 09:10:06.000000000 -0400 >+++ /usr/lib/portage/pym/repoman/utilities.py 2008-07-11 17:34:09.000000000 -0400 >@@ -12,6 +12,8 @@ > import os > import sys > >+from xml.dom import minidom >+from xml.dom import NotFoundErr > from portage import output > from portage.output import red, green > from portage import exception >@@ -109,6 +111,33 @@ > usedict[pkg].add(flag) > return usedict > >+def parse_metadata_use(mylines, uselist=None): >+ """ >+ Records are wrapped in XML as per GLEP 56 >+ returns a dict of the form a list of flags""" >+ if uselist is None: >+ uselist = [] >+ metadatadom = minidom.parse(mylines) >+ >+ try: >+ usetag = metadatadom.getElementsByTagName("use") >+ if not usetag: >+ return uselist >+ except NotFoundErr: >+ return uselist >+ >+ try: >+ flags = usetag[0].getElementsByTagName("flag") >+ except NotFoundErr: >+ raise exception,ParseError("metadata.xml: Malformed input: missing 'flag' tag(s)") >+ for flag in flags: >+ pkg_flag = flag.getAttribute("name") >+ if pkg_flag is "": >+ raise exception,ParseError("metadata.xml: Malformed input: missing 'name' attribute for 'flag' tag") >+ uselist.append(pkg_flag) >+ metadatadom.unlink() >+ return uselist >+ > > def FindPackagesToScan(settings, startdir, reposplit): > """ Try to find packages that need to be scanned
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 199788
:
136492
|
137127
|
137138
|
160085
|
160087
| 160144 |
160145
|
160377
|
160458
|
160472
|
160476