Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 190594 Details for
Bug 268895
[patch] app-portage/gentoolkit-0.3.0_rc5: equery meta traceback
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make meta get and check package dirs in a manner similar to other gentoolkit scripts
gentoolkit-meta-packagedirfix.patch (text/plain), 3.54 KB, created by
Douglas Anderson
on 2009-05-07 03:40:25 UTC
(
hide
)
Description:
Make meta get and check package dirs in a manner similar to other gentoolkit scripts
Filename:
MIME Type:
Creator:
Douglas Anderson
Created:
2009-05-07 03:40:25 UTC
Size:
3.54 KB
patch
obsolete
>Index: trunk/gentoolkit/pym/gentoolkit/equery/meta.py >=================================================================== >--- trunk/gentoolkit/pym/gentoolkit/equery/meta.py (revision 616) >+++ trunk/gentoolkit/pym/gentoolkit/equery/meta.py (working copy) >@@ -275,32 +275,19 @@ > return ' '.join(result) > > >-def get_package_directory(queries): >+def get_package_directory(query): > """Find a package's portage directory.""" > >- # Find queries' Portage directory and throw error if invalid >- if not QUERY_OPTS["current"]: >- # We need at least one program name to run >- if not queries: >- print_help() >- sys.exit(2) >- else: >- package_dir = [] >- for query in queries: >- matches = find_packages(query, include_masked=True) >- # Prefer a package that's in the Portage tree over one in an >- # overlay. Start with oldest first. >- pkg = None >- while reversed(matches): >- pkg = matches.pop() >- if not pkg.is_overlay(): >- break >- if pkg: >- package_dir.append(pkg.get_package_path()) >- else: >- package_dir = [os.getcwd()] >+ matches = find_packages(query, include_masked=True) >+ # Prefer a package that's in the Portage tree over one in an >+ # overlay. Start with oldest first. >+ pkg = None >+ while list(reversed(matches)): >+ pkg = matches.pop() >+ if not pkg.is_overlay(): >+ break > >- return package_dir >+ return pkg.get_package_path() if pkg else None > > > def get_useflags(xml_tree): >@@ -496,38 +483,48 @@ > > parse_module_options(module_opts) > >- package_dir = get_package_directory(queries) >- if not package_dir: >- raise errors.GentoolkitNoMatches(queries) >+ # We need at least one program name to run >+ if not queries: >+ print_help() >+ sys.exit(2) >+ >+ # Find queries' Portage directory and throw error if invalid >+ if QUERY_OPTS["current"]: >+ package_dir = [os.getcwd()] >+ else: >+ package_dir = [] >+ for query in queries: >+ first_run = True >+ package_dir = get_package_directory(query) >+ if not package_dir: >+ raise errors.GentoolkitNoMatches(query) >+ metadata_path = os.path.join(package_dir, "metadata.xml") > >- metadata_path = [os.path.join(d, "metadata.xml") for d in package_dir] >- >- # -------------------------------- >- # Check options and call functions >- # -------------------------------- >- >- first_run = True >- for p_dir, meta in zip(package_dir, metadata_path): >- if not first_run: >- print >- >- if VERBOSE: >- print get_overlay_name(p_dir) >- >- try: >- xml_tree = ET.parse(meta) >- except IOError: >- pp.print_error("No metadata available") >+ # -------------------------------- >+ # Check options and call functions >+ # -------------------------------- >+ >+ if not first_run: >+ print >+ >+ if VERBOSE: >+ print get_overlay_name(package_dir) >+ >+ try: >+ xml_tree = ET.parse(metadata_path) >+ except IOError: >+ pp.print_error("No metadata available") >+ first_run = False >+ continue >+ >+ got_opts = False >+ if (QUERY_OPTS["herd"] or QUERY_OPTS["description"] or >+ QUERY_OPTS["useflags"] or QUERY_OPTS["maintainer"] or >+ QUERY_OPTS["upstream"] or QUERY_OPTS["xml"]): >+ # Specific information requested, less formatting >+ got_opts = True >+ >+ call_get_functions(xml_tree, metadata_path, got_opts) >+ > first_run = False >- continue >- >- got_opts = False >- if (QUERY_OPTS["herd"] or QUERY_OPTS["description"] or >- QUERY_OPTS["useflags"] or QUERY_OPTS["maintainer"] or >- QUERY_OPTS["upstream"] or QUERY_OPTS["xml"]): >- # Specific information requested, less formatting >- got_opts = True >- >- call_get_functions(xml_tree, meta, got_opts) >- >- first_run = False >+ >\ No newline at end of file
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 268895
:
190594
|
190598