* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2011-03-18 2:03 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2011-03-18 2:03 UTC (permalink / raw
To: gentoo-commits
commit: 99f70f24a8c61aac3226a038c0b1832aa7b93746
Author: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Fri Mar 18 02:01:59 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Mar 18 02:01:59 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=99f70f24
add the Homepage to epkginfo/equery meta's Upstream option as per idl0r's request.
---
pym/gentoolkit/equery/meta.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py
index b67cbc6..01e090a 100644
--- a/pym/gentoolkit/equery/meta.py
+++ b/pym/gentoolkit/equery/meta.py
@@ -244,6 +244,14 @@ def format_keywords_line(pkg, fmtd_keywords, slot, verstr_len):
return result
+def format_homepage(homepage):
+ """format the homepage(s) entries for dispaly"""
+ result = []
+ for page in homepage.split():
+ result.append(format_line(page, "Homepage: ", " " * 13))
+ return result
+
+
# R0912: *Too many branches (%s/%s)*
# pylint: disable-msg=R0912
def call_format_functions(best_match, matches):
@@ -284,11 +292,13 @@ def call_format_functions(best_match, matches):
if QUERY_OPTS["upstream"] or not got_opts:
upstream = format_upstream(best_match.metadata.upstream())
+ homepage = format_homepage(best_match.environment("HOMEPAGE"))
if QUERY_OPTS["upstream"]:
upstream = format_list(upstream)
else:
upstream = format_list(upstream, "Upstream: ", " " * 13)
print_sequence(upstream)
+ print_sequence(homepage)
if not got_opts:
pkg_loc = best_match.package_path()
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2011-05-16 16:40 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2011-05-16 16:40 UTC (permalink / raw
To: gentoo-commits
commit: b366d0b32de20ede0581678123d33a0c044175c9
Author: dol-sen <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Mon May 16 16:40:18 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon May 16 16:40:18 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=b366d0b3
add CONFIG['termWidth'] setting to the no-pipe option to effectively turn off textwraping.
This fixes issues with scripts parsing output.
---
pym/gentoolkit/equery/__init__.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index e25ec54..0d24222 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -275,6 +275,7 @@ def parse_global_options(global_opts, args):
pp.output.nocolor()
elif opt in ('-N', '--no-pipe'):
CONFIG['piping'] = False
+ CONFIG['termWidth'] = 400
elif opt in ('-V', '--version'):
print_version()
sys.exit(0)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2011-05-17 0:38 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2011-05-17 0:38 UTC (permalink / raw
To: gentoo-commits
commit: c751af5aeaaeb90ea6117037827da0bf5457a4c6
Author: dol-sen <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Tue May 17 00:36:49 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue May 17 00:36:49 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=c751af5a
found a better spot to set piping wrap width so as to disable for all piping regardless of the --no-pipe option which would turn off setting 'quiet' on.
Signed-off-by: dol-sen <brian.dolbec <AT> gmail.com>
---
pym/gentoolkit/equery/__init__.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index 0d24222..b362bca 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -221,6 +221,9 @@ def initialize_configuration():
if CONFIG['piping']:
CONFIG['verbose'] = False
+ # set extra wide, should disable wrapping unless
+ # there is some extra long text
+ CONFIG['termWidth'] = 600
CONFIG['debug'] = bool(os.getenv('DEBUG', False))
@@ -275,7 +278,6 @@ def parse_global_options(global_opts, args):
pp.output.nocolor()
elif opt in ('-N', '--no-pipe'):
CONFIG['piping'] = False
- CONFIG['termWidth'] = 400
elif opt in ('-V', '--version'):
print_version()
sys.exit(0)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2011-05-20 5:27 Paul Varner
0 siblings, 0 replies; 19+ messages in thread
From: Paul Varner @ 2011-05-20 5:27 UTC (permalink / raw
To: gentoo-commits
commit: 674776f13984d40a1cd7eb6929be81618708e1fa
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Fri May 20 05:27:17 2011 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Fri May 20 05:27:17 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=674776f1
uniqify the list of returned use flags in uses.py. Bug 368113
---
pym/gentoolkit/equery/uses.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/gentoolkit/equery/uses.py b/pym/gentoolkit/equery/uses.py
index 08ff585..6b9eb9e 100644
--- a/pym/gentoolkit/equery/uses.py
+++ b/pym/gentoolkit/equery/uses.py
@@ -175,7 +175,7 @@ def get_output_descriptions(pkg, global_usedesc):
local_usedesc = pkg.metadata.use()
iuse, final_use = get_flags(pkg.cpv, final_setting=True)
- usevar = reduce_flags(iuse)
+ usevar = uniqify(reduce_flags(iuse))
usevar.sort()
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2011-05-20 5:54 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2011-05-20 5:54 UTC (permalink / raw
To: gentoo-commits
commit: 61a0d050975ce5309d9d5247e0e2f6c15bf941a6
Author: dol-sen <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Fri May 20 05:48:06 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri May 20 05:53:00 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=61a0d050
Revert "uniqify the list of returned use flags in uses.py. Bug 368113"
in favour of fixing it at the source so all of gentoolkit's modules benefit.
This reverts commit 674776f13984d40a1cd7eb6929be81618708e1fa.
---
pym/gentoolkit/equery/uses.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/gentoolkit/equery/uses.py b/pym/gentoolkit/equery/uses.py
index 6b9eb9e..08ff585 100644
--- a/pym/gentoolkit/equery/uses.py
+++ b/pym/gentoolkit/equery/uses.py
@@ -175,7 +175,7 @@ def get_output_descriptions(pkg, global_usedesc):
local_usedesc = pkg.metadata.use()
iuse, final_use = get_flags(pkg.cpv, final_setting=True)
- usevar = uniqify(reduce_flags(iuse))
+ usevar = reduce_flags(iuse)
usevar.sort()
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2011-07-14 4:21 Paul Varner
0 siblings, 0 replies; 19+ messages in thread
From: Paul Varner @ 2011-07-14 4:21 UTC (permalink / raw
To: gentoo-commits
commit: 2dbf7cdbf216f257b564c3a9d1c00ca1981e6617
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 04:21:08 2011 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 04:21:08 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=2dbf7cdb
Fix help for --binpkgs-missing option
---
pym/gentoolkit/equery/list_.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/gentoolkit/equery/list_.py b/pym/gentoolkit/equery/list_.py
index 92b3c1e..c859057 100644
--- a/pym/gentoolkit/equery/list_.py
+++ b/pym/gentoolkit/equery/list_.py
@@ -74,7 +74,7 @@ def print_help(with_description=True):
print(format_options((
(" -h, --help", "display this help message"),
(" -d, --duplicates", "list only installed duplicate packages"),
- (" -b, --missing-binpkgs", "list only installed packages without a corresponding binary package"),
+ (" -b, --binpkgs-missing", "list only installed packages without a corresponding binary package"),
(" -f, --full-regex", "query is a regular expression"),
(" -m, --mask-reason", "include reason for package mask"),
(" -I, --exclude-installed",
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2011-08-25 7:10 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2011-08-25 7:10 UTC (permalink / raw
To: gentoo-commits
commit: 92e6be628307b0643307202ba9994cab9a4dd439
Author: dol-sen <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Thu Aug 25 07:04:47 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Aug 25 07:08:24 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=92e6be62
fix bug 380573.
---
pym/gentoolkit/equery/meta.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py
index 01e090a..f617cfa 100644
--- a/pym/gentoolkit/equery/meta.py
+++ b/pym/gentoolkit/equery/meta.py
@@ -22,7 +22,7 @@ from functools import partial
import gentoolkit.pprinter as pp
from gentoolkit import errors
-from gentoolkit import keyword
+from gentoolkit.keyword import Keyword
from gentoolkit.equery import format_options, mod_usage, CONFIG
from gentoolkit.helpers import print_sequence, print_file
from gentoolkit.textwrap_ import TextWrapper
@@ -217,7 +217,7 @@ def format_keywords(keywords):
result = []
- for kw in sorted(keywords, keyword.compare_strs):
+ for kw in sorted(keywords, key=Keyword):
if kw.startswith('-'):
# arch masked
kw = pp.keyword(kw, stable=False, hard_masked=True)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2011-12-23 6:25 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2011-12-23 6:25 UTC (permalink / raw
To: gentoo-commits
commit: a6b7a7adced1a55327cd947c424987899e6f48ae
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 23 06:24:53 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Dec 23 06:24:53 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=a6b7a7ad
Fix equery's term_width too.
---
pym/gentoolkit/equery/__init__.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index b362bca..e79e04f 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -207,7 +207,7 @@ def initialize_configuration():
# Get terminal size
term_width = pp.output.get_term_size()[1]
- if term_width == -1:
+ if term_width < 1:
# get_term_size() failed. Set a sane default width:
term_width = 80
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2012-03-19 6:50 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2012-03-19 6:50 UTC (permalink / raw
To: gentoo-commits
commit: 167e4c05ba1057eac50cfadee3c074a2edda1fe8
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 19 06:47:38 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Mar 19 06:47:38 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=167e4c05
add an ebuild listing option to equery which as requested by Calchan and ryao.
---
pym/gentoolkit/equery/which.py | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/pym/gentoolkit/equery/which.py b/pym/gentoolkit/equery/which.py
index 5259d46..da60a1b 100644
--- a/pym/gentoolkit/equery/which.py
+++ b/pym/gentoolkit/equery/which.py
@@ -30,7 +30,10 @@ from gentoolkit.query import Query
# Globals
# =======
-QUERY_OPTS = {"include_masked": False}
+QUERY_OPTS = {
+ "include_masked": False,
+ "ebuild":False
+ }
# =========
# Functions
@@ -51,9 +54,17 @@ def print_help(with_description=True):
print(pp.command("options"))
print(format_options((
(" -h, --help", "display this help message"),
- (" -m, --include-masked", "return highest version ebuild available")
+ (" -m, --include-masked", "return highest version ebuild available"),
+ (" -e, --ebuild", "print the ebuild")
)))
+def print_ebuild(ebuild_path):
+ """Output the ebuild to std_out"""
+ with open(ebuild_path) as f:
+ lines = f.readlines()
+ print("\n\n")
+ print("".join(lines))
+ print("\n")
def parse_module_options(module_opts):
"""Parse module options and update QUERY_OPTS"""
@@ -65,13 +76,15 @@ def parse_module_options(module_opts):
sys.exit(0)
elif opt in ('-m', '--include-masked'):
QUERY_OPTS['include_masked'] = True
+ elif opt in ('-e', '--ebuild'):
+ QUERY_OPTS['ebuild'] = True
def main(input_args):
"""Parse input and run the program"""
- short_opts = "hm"
- long_opts = ('help', 'include-masked')
+ short_opts = "hme"
+ long_opts = ('help', 'include-masked', 'ebuild')
try:
module_opts, queries = gnu_getopt(input_args, short_opts, long_opts)
@@ -97,6 +110,8 @@ def main(input_args):
ebuild_path = pkg.ebuild_path()
if ebuild_path:
pp.uprint(os.path.normpath(ebuild_path))
+ if QUERY_OPTS['ebuild']:
+ print_ebuild(ebuild_path)
else:
sys.stderr.write(
pp.warn("No ebuilds to satisfy %s" % pkg.cpv)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2012-06-02 18:01 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2012-06-02 18:01 UTC (permalink / raw
To: gentoo-commits
commit: 2a0d53373fb0b7e1bae370725472822d94096f61
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 2 17:59:49 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Jun 2 17:59:49 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=2a0d5337
add a -S, --stablereq option to equery meta to list the arch cc's to add to STABLEREQ bug on b.g.o.
---
pym/gentoolkit/equery/meta.py | 55 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py
index f617cfa..2e331c5 100644
--- a/pym/gentoolkit/equery/meta.py
+++ b/pym/gentoolkit/equery/meta.py
@@ -42,11 +42,27 @@ QUERY_OPTS = {
'herd': False,
'keywords': False,
'maintainer': False,
+ 'stablereq': False,
'useflags': False,
'upstream': False,
'xml': False
}
+STABLEREQ_arches = {
+ 'alpha': 'alpha@gentoo.org',
+ 'amd64': 'amd64@gentoo.org',
+ 'arm': 'arm@gentoo.org',
+ 'hppa': 'hppa@gentoo.org',
+ 'ia64': 'ia64@gentoo.org',
+ 'm68k': 'm68k@gentoo.org',
+ 'ppc64': 'ppc64@gentoo.org',
+ 'ppc': 'ppc@gentoo.org',
+ 's390': 's390@gentoo.org',
+ 'sh': 'sh@gentoo.org',
+ 'sparc': 'sparc@gentoo.org',
+ 'x86': 'x86@gentoo.org',
+}
+
# =========
# Functions
# =========
@@ -71,11 +87,31 @@ def print_help(with_description=True, with_usage=True):
(" -H, --herd", "show the herd(s) for the package"),
(" -k, --keywords", "show keywords for all matching package versions"),
(" -m, --maintainer", "show the maintainer(s) for the package"),
+ (" -S, --stablreq", "show STABLEREQ arches (cc's) for all matching package versions"),
(" -u, --useflags", "show per-package USE flag descriptions"),
(" -U, --upstream", "show package's upstream information"),
(" -x, --xml", "show the plain metadata.xml file")
)))
+def stablereq(matches):
+ """Produce the list of cc's for a STABLREQ bug
+ @type matches: array
+ @param matches: set of L{gentoolkit.package.Package} instances whose
+ 'key' are all the same.
+ @rtype: dict
+ @return: a dict with L{gentoolkit.package.Package} instance keys and
+ 'array of cc's to be added to a STABLEREQ bug.
+ """
+ result = {}
+ for pkg in matches:
+ keywords_str = pkg.environment(('KEYWORDS'), prefer_vdb=False)
+ # get any unstable keywords
+ keywords = set([x.lstrip('~') for x in keywords_str.split() if'~' in x])
+ stable_arches = set(list(STABLEREQ_arches))
+ cc_keywords = stable_arches.intersection(keywords)
+ # add cc's
+ result[pkg] = [STABLEREQ_arches[x] for x in cc_keywords]
+ return result
def filter_keywords(matches):
"""Filters non-unique keywords per slot.
@@ -329,6 +365,19 @@ def call_format_functions(best_match, matches):
useflags = format_useflags(best_match.metadata.use())
print_sequence(format_list(useflags))
+ if QUERY_OPTS["stablereq"]:
+ # Get {<Package 'dev-libs/glib-2.20.5'>: [u'ia64', u'm68k', ...], ...}
+ stablereq_map = stablereq(matches)
+ for match in matches:
+ slot = match.environment('SLOT')
+ verstr_len = len(match.fullversion) + len(slot)
+ fmtd_ccs = ','.join(sorted(stablereq_map[match]))
+ stablereq_line = format_keywords_line(
+ match, fmtd_ccs, slot, verstr_len
+ )
+ #print("STABLEREQ:", )
+ pp.uprint(stablereq_line)
+
if QUERY_OPTS["xml"]:
print_file(os.path.join(best_match.package_path(), 'metadata.xml'))
@@ -448,6 +497,8 @@ def parse_module_options(module_opts):
QUERY_OPTS["maintainer"] = True
elif opt in ('-k', '--keywords'):
QUERY_OPTS["keywords"] = True
+ elif opt in ('-S', '--stablereq'):
+ QUERY_OPTS["stablereq"] = True
elif opt in ('-u', '--useflags'):
QUERY_OPTS["useflags"] = True
elif opt in ('-U', '--upstream'):
@@ -459,9 +510,9 @@ def parse_module_options(module_opts):
def main(input_args):
"""Parse input and run the program."""
- short_opts = "hdHkmuUx"
+ short_opts = "hdHkmSuUx"
long_opts = ('help', 'description', 'herd', 'keywords', 'maintainer',
- 'useflags', 'upstream', 'xml')
+ 'stablereq', 'useflags', 'upstream', 'xml')
try:
module_opts, queries = gnu_getopt(input_args, short_opts, long_opts)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2012-06-02 18:53 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2012-06-02 18:53 UTC (permalink / raw
To: gentoo-commits
commit: 228b774543706722435259d8e8c61ea785476579
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 2 18:52:10 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Jun 2 18:52:10 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=228b7745
remove the auto linewrapping from the stablereq output line so it does not mess up the copy/paste of the cc's
---
pym/gentoolkit/equery/meta.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py
index 2e331c5..9beb3eb 100644
--- a/pym/gentoolkit/equery/meta.py
+++ b/pym/gentoolkit/equery/meta.py
@@ -280,6 +280,12 @@ def format_keywords_line(pkg, fmtd_keywords, slot, verstr_len):
return result
+def format_stablereq_line(pkg, fmtd_ccs, slot):
+ """Format the entire stablereq line for display (no indented linewrapping)
+ """
+ return "%s:%s: %s" % (pkg.fullversion, pp.slot(slot), fmtd_ccs)
+
+
def format_homepage(homepage):
"""format the homepage(s) entries for dispaly"""
result = []
@@ -372,8 +378,8 @@ def call_format_functions(best_match, matches):
slot = match.environment('SLOT')
verstr_len = len(match.fullversion) + len(slot)
fmtd_ccs = ','.join(sorted(stablereq_map[match]))
- stablereq_line = format_keywords_line(
- match, fmtd_ccs, slot, verstr_len
+ stablereq_line = format_stablereq_line(
+ match, fmtd_ccs, slot
)
#print("STABLEREQ:", )
pp.uprint(stablereq_line)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2012-08-24 15:53 Paul Varner
0 siblings, 0 replies; 19+ messages in thread
From: Paul Varner @ 2012-08-24 15:53 UTC (permalink / raw
To: gentoo-commits
commit: 305cc402de2081e1219b4d0457b247ec0fdfb416
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 24 15:51:56 2012 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Fri Aug 24 15:51:56 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=305cc402
Strip initial whitespace at the start of the description (Bug 432530).
---
pym/gentoolkit/equery/uses.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/pym/gentoolkit/equery/uses.py b/pym/gentoolkit/equery/uses.py
index 08ff585..8837e02 100644
--- a/pym/gentoolkit/equery/uses.py
+++ b/pym/gentoolkit/equery/uses.py
@@ -94,6 +94,11 @@ def display_useflags(output):
flag_name += " " + color[in_makeconf](flag.ljust(maxflag_len))
flag_name += " : "
+ # Strip initial whitespace at the start of the description
+ # Bug 432530
+ if desc:
+ desc = desc.lstrip()
+
# print description
if restrict:
restrict = "(%s %s)" % (pp.emph("Restricted to"),
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2012-09-06 21:36 Paul Varner
0 siblings, 0 replies; 19+ messages in thread
From: Paul Varner @ 2012-09-06 21:36 UTC (permalink / raw
To: gentoo-commits
commit: e2e77301eb234aecfa5160d0de7bfda7bbe38a64
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 6 21:34:19 2012 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Thu Sep 6 21:34:19 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=e2e77301
Remove check of isatty when guessing color.
When going through a pipe, color is already turned off. This allows
color to be restored with the --no-pipe option. If color is not desired
with --no-pipe, then --nocolor should also be specified.
---
pym/gentoolkit/equery/__init__.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index a73ef1b..65f3ec1 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -215,8 +215,8 @@ def initialize_configuration():
CONFIG['termWidth'] = term_width - 1
# Guess color output
- if (CONFIG['color'] == -1 and (not sys.stdout.isatty() or
- os.getenv("NOCOLOR") in ("yes", "true")) or CONFIG['color'] == 0):
+ if (CONFIG['color'] == -1 and os.getenv("NOCOLOR") in ("yes", "true") or
+ CONFIG['color'] == 0):
pp.output.nocolor()
if CONFIG['piping']:
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2012-12-22 20:10 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2012-12-22 20:10 UTC (permalink / raw
To: gentoo-commits
commit: 35132cb5822d4209cec0272ccc875a45bf830cf8
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 22 20:09:09 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Dec 22 20:09:09 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=35132cb5
Add a blank line between pkgs in a query, bug 448190
---
pym/gentoolkit/equery/check.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/pym/gentoolkit/equery/check.py b/pym/gentoolkit/equery/check.py
index e903355..77042f8 100644
--- a/pym/gentoolkit/equery/check.py
+++ b/pym/gentoolkit/equery/check.py
@@ -228,6 +228,7 @@ def checks_printer(cpv, data, verbose=True, only_failures=False):
n_checked = pp.number(str(n_checked))
info = " %(n_passed)s out of %(n_checked)s files passed"
print(info % locals())
+ print()
else:
print("failed(%s)" % n_failed)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2013-08-11 17:21 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2013-08-11 17:21 UTC (permalink / raw
To: gentoo-commits
commit: 11dd993b67271054cf7a5746e55ebaf41795cfc0
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 11 15:58:02 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Aug 11 15:59:25 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=11dd993b
Add fifo type to equery files, bug 480308.
---
pym/gentoolkit/equery/__init__.py | 5 ++++-
pym/gentoolkit/equery/files.py | 16 +++++++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index c44de90..7f20103 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -145,7 +145,7 @@ def format_filetype(path, fdesc, show_type=False, show_md5=False,
@param path: the path
@type fdesc: list
@param fdesc: [file_type, timestamp, MD5 sum/symlink target]
- file_type is one of dev, dir, obj, sym.
+ file_type is one of dev, dir, obj, sym, fif.
If file_type is dir, there is no timestamp or MD5 sum.
If file_type is sym, fdesc[2] is the target of the symlink.
@type show_type: bool
@@ -179,6 +179,9 @@ def format_filetype(path, fdesc, show_type=False, show_md5=False,
elif fdesc[0] == "dev":
ftype = "dev"
fpath = path
+ elif fdesc[0] == "fif":
+ ftype = "fifo"
+ fpath = path
else:
sys.stderr.write(
pp.error("%s has unknown type: %s" % (path, fdesc[0]))
diff --git a/pym/gentoolkit/equery/files.py b/pym/gentoolkit/equery/files.py
index 2843baf..9ef87cf 100644
--- a/pym/gentoolkit/equery/files.py
+++ b/pym/gentoolkit/equery/files.py
@@ -43,7 +43,8 @@ QUERY_OPTS = {
}
FILTER_RULES = (
- 'dir', 'obj', 'sym', 'dev', 'path', 'conf', 'cmd', 'doc', 'man', 'info'
+ 'dir', 'obj', 'sym', 'dev', 'path', 'conf', 'cmd', 'doc', 'man', 'info',
+ 'fifo'
)
# =========
@@ -199,6 +200,17 @@ def filter_by_conf(contents):
return filtered_content
+def filter_by_fifo(contents):
+ """Return a copy of content filtered by fifo entries."""
+
+ filtered_content = {}
+ for path in contents:
+ if contents[path][0] in ['fif']:
+ filtered_content[path] = contents[path]
+
+ return filtered_content
+
+
def filter_contents(contents):
"""Filter files by type if specified by the user.
@@ -228,6 +240,8 @@ def filter_contents(contents):
filtered_content.update(filter_by_conf(contents))
if frozenset(('doc' ,'man' ,'info')).intersection(content_filter):
filtered_content.update(filter_by_doc(contents, content_filter))
+ if "fifo" in content_filter:
+ filtered_content.update(filter_by_fifo(contents))
return filtered_content
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2013-08-18 16:31 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2013-08-18 16:31 UTC (permalink / raw
To: gentoo-commits
commit: 91d27979bc7b8534f531074936b3e4ca826fb470
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 18 16:30:44 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Aug 18 16:30:44 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=91d27979
Add license field to equery meta as requested by hasufell
---
pym/gentoolkit/equery/meta.py | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py
index 9beb3eb..e2d2124 100644
--- a/pym/gentoolkit/equery/meta.py
+++ b/pym/gentoolkit/equery/meta.py
@@ -41,6 +41,7 @@ QUERY_OPTS = {
'description': False,
'herd': False,
'keywords': False,
+ 'license': False,
'maintainer': False,
'stablereq': False,
'useflags': False,
@@ -86,6 +87,7 @@ def print_help(with_description=True, with_usage=True):
(" -d, --description", "show an extended package description"),
(" -H, --herd", "show the herd(s) for the package"),
(" -k, --keywords", "show keywords for all matching package versions"),
+ (" -l, --license", "show licenses for the best maching version"),
(" -m, --maintainer", "show the maintainer(s) for the package"),
(" -S, --stablreq", "show STABLEREQ arches (cc's) for all matching package versions"),
(" -u, --useflags", "show per-package USE flag descriptions"),
@@ -371,6 +373,13 @@ def call_format_functions(best_match, matches):
useflags = format_useflags(best_match.metadata.use())
print_sequence(format_list(useflags))
+ _license = best_match.environment(["LICENSE"])
+ if QUERY_OPTS["license"]:
+ _license = format_list(_license)
+ else:
+ _license = format_list(_license, "License: ", " " * 13)
+ print_sequence(_license)
+
if QUERY_OPTS["stablereq"]:
# Get {<Package 'dev-libs/glib-2.20.5'>: [u'ia64', u'm68k', ...], ...}
stablereq_map = stablereq(matches)
@@ -499,6 +508,8 @@ def parse_module_options(module_opts):
QUERY_OPTS["description"] = True
elif opt in ('-H', '--herd'):
QUERY_OPTS["herd"] = True
+ elif opt in ('-l', '--license'):
+ QUERY_OPTS["license"] = True
elif opt in ('-m', '--maintainer'):
QUERY_OPTS["maintainer"] = True
elif opt in ('-k', '--keywords'):
@@ -516,9 +527,9 @@ def parse_module_options(module_opts):
def main(input_args):
"""Parse input and run the program."""
- short_opts = "hdHkmSuUx"
- long_opts = ('help', 'description', 'herd', 'keywords', 'maintainer',
- 'stablereq', 'useflags', 'upstream', 'xml')
+ short_opts = "hdHklmSuUx"
+ long_opts = ('help', 'description', 'herd', 'keywords', 'license',
+ 'maintainer', 'stablereq', 'useflags', 'upstream', 'xml')
try:
module_opts, queries = gnu_getopt(input_args, short_opts, long_opts)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2013-11-01 18:15 Julian Ospald
0 siblings, 0 replies; 19+ messages in thread
From: Julian Ospald @ 2013-11-01 18:15 UTC (permalink / raw
To: gentoo-commits
commit: 07c7d909a9f36e2cccda406adb97091631f71f25
Author: Julian Ospald <hasufell <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 1 18:07:54 2013 +0000
Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org>
CommitDate: Fri Nov 1 18:07:54 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=07c7d909
equery: add --ignore-linguas switch to 'equery uses'
---
pym/gentoolkit/equery/uses.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/pym/gentoolkit/equery/uses.py b/pym/gentoolkit/equery/uses.py
index 22e6488..cedac96 100644
--- a/pym/gentoolkit/equery/uses.py
+++ b/pym/gentoolkit/equery/uses.py
@@ -34,7 +34,7 @@ from gentoolkit.flag import get_flags, reduce_flags
# Globals
# =======
-QUERY_OPTS = {"all_versions" : False}
+QUERY_OPTS = {"all_versions" : False, "ignore_linguas" : False}
# =========
# Functions
@@ -55,7 +55,8 @@ def print_help(with_description=True):
print(pp.command("options"))
print(format_options((
(" -h, --help", "display this help message"),
- (" -a, --all", "include all package versions")
+ (" -a, --all", "include all package versions"),
+ (" -i, --ignore-linguas", "don't show linguas USE flags")
)))
@@ -183,6 +184,11 @@ def get_output_descriptions(pkg, global_usedesc):
usevar = reduce_flags(iuse)
usevar.sort()
+ if QUERY_OPTS['ignore_linguas']:
+ for a in usevar[:]:
+ if a.startswith("linguas_"):
+ usevar.remove(a)
+
if pkg.is_installed():
used_flags = pkg.use().split()
@@ -235,6 +241,8 @@ def parse_module_options(module_opts):
sys.exit(0)
elif opt in ('-a', '--all'):
QUERY_OPTS['all_versions'] = True
+ elif opt in ('-i', '--ignore-linguas'):
+ QUERY_OPTS['ignore_linguas'] = True
def print_legend():
@@ -249,8 +257,8 @@ def print_legend():
def main(input_args):
"""Parse input and run the program"""
- short_opts = "ha"
- long_opts = ('help', 'all')
+ short_opts = "hai"
+ long_opts = ('help', 'all', 'ignore-linguas')
try:
module_opts, queries = gnu_getopt(input_args, short_opts, long_opts)
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2014-04-19 18:26 Tobias Heinlein
0 siblings, 0 replies; 19+ messages in thread
From: Tobias Heinlein @ 2014-04-19 18:26 UTC (permalink / raw
To: gentoo-commits
commit: 9a33ceffe2e0045bf75b1209a90e9a53530d4e0d
Author: Tobias Heinlein <keytoaster <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 19 16:39:03 2014 +0000
Commit: Tobias Heinlein <keytoaster <AT> gentoo <DOT> org>
CommitDate: Sat Apr 19 18:23:23 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=9a33ceff
equery: Don't always print the license field (bug #508114).
---
pym/gentoolkit/equery/meta.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py
index e2d2124..d3342cd 100644
--- a/pym/gentoolkit/equery/meta.py
+++ b/pym/gentoolkit/equery/meta.py
@@ -373,12 +373,13 @@ def call_format_functions(best_match, matches):
useflags = format_useflags(best_match.metadata.use())
print_sequence(format_list(useflags))
- _license = best_match.environment(["LICENSE"])
- if QUERY_OPTS["license"]:
- _license = format_list(_license)
- else:
- _license = format_list(_license, "License: ", " " * 13)
- print_sequence(_license)
+ if QUERY_OPTS["license"] or not got_opts:
+ _license = best_match.environment(["LICENSE"])
+ if QUERY_OPTS["license"]:
+ _license = format_list(_license)
+ else:
+ _license = format_list(_license, "License: ", " " * 13)
+ print_sequence(_license)
if QUERY_OPTS["stablereq"]:
# Get {<Package 'dev-libs/glib-2.20.5'>: [u'ia64', u'm68k', ...], ...}
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
@ 2014-08-29 4:04 Brian Dolbec
0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2014-08-29 4:04 UTC (permalink / raw
To: gentoo-commits
commit: 1351a6b8f09ab2f4a7469d6e2be874b56a31d3c4
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 29 03:56:22 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Aug 29 04:01:13 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=1351a6b8
equery has: Add CFLAGS, CXXFLAGS, LDFLAGS to strip the leading '-'
Strip the leading '-' from values found in these files.
---
pym/gentoolkit/equery/has.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pym/gentoolkit/equery/has.py b/pym/gentoolkit/equery/has.py
index 15c60b9..180f7f0 100644
--- a/pym/gentoolkit/equery/has.py
+++ b/pym/gentoolkit/equery/has.py
@@ -74,7 +74,7 @@ def query_in_env(query, env_var, pkg):
"""Check if the query is in the pkg's environment."""
try:
- if env_var in ("USE", "IUSE"):
+ if env_var in ("USE", "IUSE", "CFLAGS", "CXXFLAGS", "LDFLAGS"):
results = set(
[x.lstrip("+-") for x in pkg.environment(env_var).split()]
)
^ permalink raw reply related [flat|nested] 19+ messages in thread
end of thread, other threads:[~2014-08-29 4:05 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-25 7:10 [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/ Brian Dolbec
-- strict thread matches above, loose matches on Subject: below --
2014-08-29 4:04 Brian Dolbec
2014-04-19 18:26 Tobias Heinlein
2013-11-01 18:15 Julian Ospald
2013-08-18 16:31 Brian Dolbec
2013-08-11 17:21 Brian Dolbec
2012-12-22 20:10 Brian Dolbec
2012-09-06 21:36 Paul Varner
2012-08-24 15:53 Paul Varner
2012-06-02 18:53 Brian Dolbec
2012-06-02 18:01 Brian Dolbec
2012-03-19 6:50 Brian Dolbec
2011-12-23 6:25 Brian Dolbec
2011-07-14 4:21 Paul Varner
2011-05-20 5:54 Brian Dolbec
2011-05-20 5:27 Paul Varner
2011-05-17 0:38 Brian Dolbec
2011-05-16 16:40 Brian Dolbec
2011-03-18 2:03 Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox