* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2011-02-23 9:10 Brian Dolbec
0 siblings, 0 replies; 18+ messages in thread
From: Brian Dolbec @ 2011-02-23 9:10 UTC (permalink / raw
To: gentoo-commits
commit: 10ae0f76a9aa56c467f0a9afc187411149444bf5
Author: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Fri Feb 11 05:54:34 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Feb 11 05:54:34 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=10ae0f76
Merge branch 'gentoolkit' of git+ssh://git.overlays.gentoo.org/proj/gentoolkit into gentoolkit
bin/glsa-check | 17 +++++----
pym/gentoolkit/eshowkw/keywords_content.py | 53 ++++++++++++++++-----------
pym/gentoolkit/glsa/__init__.py | 1 +
3 files changed, 42 insertions(+), 29 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2011-05-12 2:55 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2011-05-12 2:55 UTC (permalink / raw
To: gentoo-commits
commit: 923f15361bc2ce6f015012e840c5a9e41717abf0
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Thu May 12 02:52:13 2011 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Thu May 12 02:52:13 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=923f1536
Merge branch 'gentoolkit' of git+ssh://git.overlays.gentoo.org/proj/gentoolkit into gentoolkit
bin/{analyse => enalyze} | 6 +-
man/{analyse.1 => enalyze.1} | 46 ++++++++++----------
pym/gentoolkit/{analyse => enalyze}/__init__.py | 10 ++--
.../{analyse/analyse.py => enalyze/analyze.py} | 46 ++++++++++----------
pym/gentoolkit/{analyse => enalyze}/base.py | 4 +-
pym/gentoolkit/{analyse => enalyze}/lib.py | 4 +-
pym/gentoolkit/{analyse => enalyze}/output.py | 2 +-
pym/gentoolkit/{analyse => enalyze}/rebuild.py | 26 ++++++------
8 files changed, 72 insertions(+), 72 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2011-05-12 2:55 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2011-05-12 2:55 UTC (permalink / raw
To: gentoo-commits
commit: a98e28073a6a533eeb094bae1fc20a3ffe1911ee
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Thu May 12 02:55:15 2011 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Thu May 12 02:55:15 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=a98e2807
Update setup.py for namespace change of analyse to enalyze
---
setup.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index 91f9e9c..09feb8f 100755
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@ python_scripts = [os.path.join(cwd, path) for path in (
'bin/epkginfo',
'bin/glsa-check',
'pym/gentoolkit/eclean/cli.py',
- 'pym/gentoolkit/analyse/__init__.py',
+ 'pym/gentoolkit/enalyze/__init__.py',
'pym/gentoolkit/equery/__init__.py',
'pym/gentoolkit/eshowkw/__init__.py'
)]
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2011-05-29 10:59 Christian Ruppert
0 siblings, 0 replies; 18+ messages in thread
From: Christian Ruppert @ 2011-05-29 10:59 UTC (permalink / raw
To: gentoo-commits
commit: c9bd257c7cdd4c64ccefb687643958098c3c6d75
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Sat May 28 21:22:12 2011 +0000
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Sat May 28 21:22:12 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=c9bd257c
Merge branch 'gentoolkit' of git+ssh://overlays.gentoo.org/proj/gentoolkit into gentoolkit
bin/{analyse => enalyze} | 6 +-
bin/euse | 111 +++++++++++---------
bin/revdep-rebuild | 38 ++++---
man/{analyse.1 => enalyze.1} | 46 ++++----
pym/gentoolkit/dependencies.py | 41 ++++----
pym/gentoolkit/eclean/search.py | 16 +++-
pym/gentoolkit/{analyse => enalyze}/__init__.py | 10 +-
.../{analyse/analyse.py => enalyze/analyze.py} | 46 ++++----
pym/gentoolkit/{analyse => enalyze}/base.py | 4 +-
pym/gentoolkit/{analyse => enalyze}/lib.py | 4 +-
pym/gentoolkit/{analyse => enalyze}/output.py | 2 +-
pym/gentoolkit/{analyse => enalyze}/rebuild.py | 26 +++---
pym/gentoolkit/eprefix.py | 28 ++----
pym/gentoolkit/equery/__init__.py | 3 +
pym/gentoolkit/equery/meta.py | 10 ++
pym/gentoolkit/eshowkw/__init__.py | 12 ++-
pym/gentoolkit/eshowkw/display_pretty.py | 9 +-
pym/gentoolkit/eshowkw/keywords_content.py | 6 +-
pym/gentoolkit/eshowkw/keywords_header.py | 4 +-
pym/gentoolkit/flag.py | 3 +-
pym/gentoolkit/helpers.py | 2 +-
pym/gentoolkit/package.py | 10 ++-
pym/gentoolkit/test/eclean/test_search.py | 2 +-
setup.py | 2 +-
24 files changed, 243 insertions(+), 198 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2011-07-14 1:44 Brian Dolbec
0 siblings, 0 replies; 18+ messages in thread
From: Brian Dolbec @ 2011-07-14 1:44 UTC (permalink / raw
To: gentoo-commits
commit: 040600057ca333a4285e321a08bdf69cc0f11231
Author: dol-sen <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Thu Jul 14 01:43:17 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Jul 14 01:43:17 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=04060005
Merge branch 'gentoolkit' of git+ssh://git.overlays.gentoo.org/proj/gentoolkit into gentoolkit
Conflicts:
pym/gentoolkit/revdep_rebuild/collect.py
pym/gentoolkit/revdep_rebuild/rebuild.py
pym/gentoolkit/revdep_rebuild/settings.py
pym/gentoolkit/revdep_rebuild/stuff.py
^ permalink raw reply [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2011-12-19 19:40 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2011-12-19 19:40 UTC (permalink / raw
To: gentoo-commits
commit: 10aaed2b07c11065418d0e9e2c7aa52ae0837300
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 19 19:38:40 2011 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Mon Dec 19 19:38:40 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=10aaed2b
Fix setup.py to work with EPREFIX changes in Portage (Bug 394909).
---
setup.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/setup.py b/setup.py
index f65a933..1efba94 100755
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ cwd = os.getcwd()
try:
from portage.const import EPREFIX
except ImportError:
- EPREFIX='/'
+ EPREFIX=''
# Bash files that need `VERSION=""` subbed, relative to this dir:
@@ -127,10 +127,10 @@ core.setup(
package_data = test_data,
scripts=(glob('bin/*')),
data_files=(
- (os.path.join(EPREFIX, 'etc/env.d'), ['data/99gentoolkit-env']),
- (os.path.join(EPREFIX, 'etc/revdep-rebuild'), ['data/revdep-rebuild/99revdep-rebuild']),
- (os.path.join(EPREFIX, 'etc/eclean'), glob('data/eclean/*')),
- (os.path.join(EPREFIX, 'usr/share/man/man1'), glob('man/*')),
+ (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/env.d'), ['data/99gentoolkit-env']),
+ (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/revdep-rebuild'), ['data/revdep-rebuild/99revdep-rebuild']),
+ (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/eclean'), glob('data/eclean/*')),
+ (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man1'), glob('man/*')),
),
cmdclass={
'test': load_test(),
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2012-02-06 16:23 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2012-02-06 16:23 UTC (permalink / raw
To: gentoo-commits
commit: d1ee16c4194e7a94c91924d62332363d06e64aae
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 6 16:22:51 2012 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Mon Feb 6 16:22:51 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=d1ee16c4
Merge branch 'gentoolkit' of git+ssh://git.overlays.gentoo.org/proj/gentoolkit into gentoolkit
pym/gentoolkit/base.py | 8 ++++++--
pym/gentoolkit/eclean/cli.py | 11 +++++++----
pym/gentoolkit/equery/__init__.py | 8 +++++---
pym/gentoolkit/revdep_rebuild/rebuild.py | 7 +++++--
4 files changed, 23 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2012-06-29 2:24 Brian Dolbec
0 siblings, 0 replies; 18+ messages in thread
From: Brian Dolbec @ 2012-06-29 2:24 UTC (permalink / raw
To: gentoo-commits
commit: ff3efed8119fa347d35b3fd133385f5df47b1af5
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 29 02:23:15 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jun 29 02:23:15 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=ff3efed8
update authors with my contributions.
---
AUTHORS | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 019803b..72cb7f6 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,6 +5,7 @@
* eclean
Original author: Thomas de Grenier de Latour (tgl) <degrenier@easyconnect.fr>
+ re-write author Brian Dolbec <dolsen@gentoo.org>
* epkginfo
Author: Ned Ludd <solar@gentoo.org>
@@ -14,6 +15,7 @@
* equery
Original author: Karl Trygve Kalleberg <karltk@gentoo.org>
0.3.0 author: Douglas Anderson <douglasjanderson@gmail.com>
+ api rewrite work for 0.3.0 Brian Dolbec <dolsen@gentoo.org
* eread
Original author: Donnie Berkholz <dberkholz@gentoo.org>
@@ -27,3 +29,6 @@
* revdep-rebuild
Original author: Stanislav Brabec
Rewrite author: Michael A. Smith
+
+* enalyze
+ Original author: Brian Dolbec <dolsen@gentoo.org>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2012-12-18 10:42 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2012-12-18 10:42 UTC (permalink / raw
To: gentoo-commits
commit: 8745911eb903f1da301d99d5949f655b0190ca6f
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 18 10:40:56 2012 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Tue Dec 18 10:40:56 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=8745911e
Fix setup.py so that either VERSION or PVR will set the version.
This fixes the issue with egg-info always having a version number of
9999. Fix is from Brian Dolbec courtesy of mirrorselect.
---
setup.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index 1efba94..e50d76f 100755
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ import io
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pym'))
-__version__ = os.getenv('VERSION', default='9999')
+__version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
cwd = os.getcwd()
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2012-12-22 17:12 Brian Dolbec
0 siblings, 0 replies; 18+ messages in thread
From: Brian Dolbec @ 2012-12-22 17:12 UTC (permalink / raw
To: gentoo-commits
commit: e3abb5ee8493c88a52c83333ff2e798babdbd992
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 22 17:11:50 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Dec 22 17:11:50 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=e3abb5ee
fix a typo, change use of log to print() to debug set_version() not working correctly.
---
setup.py | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/setup.py b/setup.py
index e50d76f..d07ab98 100755
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ from __future__ import print_function
import re
import sys
import distutils
-from distutils import core, log
+from distutils import core #, log
from glob import glob
import os
@@ -18,11 +18,11 @@ __version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
cwd = os.getcwd()
-# Load EPREFIX from Portage, fall back to the empty string if it fails
-try:
- from portage.const import EPREFIX
-except ImportError:
- EPREFIX=''
+# Load EPREFIX from Portage, fall back to the empty string if it fails
+try:
+ from portage.const import EPREFIX
+except ImportError:
+ EPREFIX=''
# Bash files that need `VERSION=""` subbed, relative to this dir:
@@ -57,7 +57,7 @@ class set_version(core.Command):
def run(self):
ver = 'svn' if __version__ == '9999' else __version__
- print("Settings version to %s" % ver)
+ print("Setting version to %s" % ver)
def sub(files, pattern):
for f in files:
updated_file = []
@@ -65,10 +65,12 @@ class set_version(core.Command):
for line in s:
newline = re.sub(pattern, '"%s"' % ver, line, 1)
if newline != line:
- log.info("%s: %s" % (f, newline))
+ #log.info("%s: %s" % (f, newline))
+ print("%s: %s" % (f, newline))
updated_file.append(newline)
with io.open(f, 'w', 1, 'utf_8') as s:
s.writelines(updated_file)
+
quote = r'[\'"]{1}'
bash_re = r'(?<=VERSION=)' + quote + '[^\'"]*' + quote
sub(bash_scripts, bash_re)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2012-12-23 1:53 Brian Dolbec
0 siblings, 0 replies; 18+ messages in thread
From: Brian Dolbec @ 2012-12-23 1:53 UTC (permalink / raw
To: gentoo-commits
commit: 9557946ecdb28ebebc38f664dd770a690e50d64a
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 23 01:47:45 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Dec 23 01:47:45 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=9557946e
doh! fix setup.py breakage
---
setup.py | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/setup.py b/setup.py
index 620ded8..c70d580 100755
--- a/setup.py
+++ b/setup.py
@@ -26,13 +26,13 @@ except ImportError:
# Bash files that need `VERSION=""` subbed, relative to this dir:
-bash_scripts = [os.path.join(cwd, path) for path in (
+bash_scripts = [(os.path.join(cwd, path), 'VERSION=') for path in (
'bin/euse',
'bin/revdep-rebuild.sh'
)]
# Python files that need `__version__ = ""` subbed, relative to this dir:
-python_scripts = [(os.path.join(cwd, path), None) for path in (
+python_scripts = [(os.path.join(cwd, path), '__version__ = ') for path in (
'bin/eclean',
'bin/epkginfo',
'bin/glsa-check',
@@ -67,31 +67,27 @@ class set_version(core.Command):
pass
def run(self):
- ver = 'svn' if __version__ == '9999' else __version__
+ ver = 'git' if __version__ == '9999' else __version__
print("Setting version to %s" % ver)
def sub(files, pattern):
for f in files:
updated_file = []
with io.open(f[0], 'r', 1, 'utf_8') as s:
- if f[1]:
- _pattern = pattern % f[1]
- else:
- _pattern = pattern
for line in s:
- newline = re.sub(_pattern, '"%s"' % ver, line, 1)
+ newline = re.sub(pattern %f[1], '"%s"' % ver, line, 1)
if newline != line:
#log.info("%s: %s" % (f, newline))
- print("%s: %s" % (f, newline))
+ print("%s: %s" % (f[0], newline.strip('\n')))
updated_file.append(newline)
- with io.open(f, 'w', 1, 'utf_8') as s:
+ with io.open(f[0], 'w', 1, 'utf_8') as s:
s.writelines(updated_file)
quote = r'[\'"]{1}'
- bash_re = r'(?<=VERSION=)' + quote + '[^\'"]*' + quote
+ bash_re = r'(?<=%s)' + quote + '[^\'"]*' + quote
sub(bash_scripts, bash_re)
- python_re = r'(?<=^__version__ = )' + quote + '[^\'"]*' + quote
+ python_re = r'(?<=^%s)' + quote + '[^\'"]*' + quote
sub(python_scripts, python_re)
- man_re = r'(?<=^.TH "[.*]" "[0-9]" )' + quote + '[^\'"]*' + quote
+ man_re = r'(?<=^.TH "%s" "[0-9]" )' + quote + '[^\'"]*' + quote
sub(manpages, man_re)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2013-01-02 23:12 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2013-01-02 23:12 UTC (permalink / raw
To: gentoo-commits
commit: 0ae5906ca169bf575ed39f55acd83f91709efdfd
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 2 23:10:17 2013 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Wed Jan 2 23:10:17 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=0ae5906c
Modify setup.py to accept VERSION as an argument as well as an environment variable.
---
setup.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index c70d580..fab0326 100755
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,10 @@ import io
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pym'))
-__version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
+if ( len(sys.argv) > 2 ) and ( sys.argv[1] == "set_version" ):
+ __version__ = sys.argv[2]
+else:
+ __version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
cwd = os.getcwd()
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2013-01-04 2:31 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2013-01-04 2:31 UTC (permalink / raw
To: gentoo-commits
commit: 377dae69453689db43aa122b2a2c0cab762846bb
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 4 02:31:04 2013 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Fri Jan 4 02:31:04 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=377dae69
Fix unicode error when printing unicode strings in set_version.
---
setup.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index fab0326..b4ec763 100755
--- a/setup.py
+++ b/setup.py
@@ -80,7 +80,7 @@ class set_version(core.Command):
newline = re.sub(pattern %f[1], '"%s"' % ver, line, 1)
if newline != line:
#log.info("%s: %s" % (f, newline))
- print("%s: %s" % (f[0], newline.strip('\n')))
+ print("%s: %s" % (f[0], newline.encode('utf_8').strip('\n')))
updated_file.append(newline)
with io.open(f[0], 'w', 1, 'utf_8') as s:
s.writelines(updated_file)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2013-09-05 14:47 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2013-09-05 14:47 UTC (permalink / raw
To: gentoo-commits
commit: 9793ca9adf7b722c65af63664df0b87c54cddd88
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 5 14:46:14 2013 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Thu Sep 5 14:46:14 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=9793ca9a
Modify setup.py to include eclean-dist and eclean-pkg.
---
setup.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/setup.py b/setup.py
index b4ec763..f372fe9 100755
--- a/setup.py
+++ b/setup.py
@@ -37,6 +37,8 @@ bash_scripts = [(os.path.join(cwd, path), 'VERSION=') for path in (
# Python files that need `__version__ = ""` subbed, relative to this dir:
python_scripts = [(os.path.join(cwd, path), '__version__ = ') for path in (
'bin/eclean',
+ 'bin/eclean-dist',
+ 'bin/eclean-pkg',
'bin/epkginfo',
'bin/glsa-check',
'pym/gentoolkit/eclean/cli.py',
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2013-11-02 17:50 Paul Varner
0 siblings, 0 replies; 18+ messages in thread
From: Paul Varner @ 2013-11-02 17:50 UTC (permalink / raw
To: gentoo-commits
commit: 11eb5742928c8b2fcb9e8c74b84a46e8f66f0343
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 2 17:49:29 2013 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Sat Nov 2 17:49:29 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=11eb5742
Add contributing section to README.dev
---
README.dev | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/README.dev b/README.dev
index 951b707..62a35fe 100644
--- a/README.dev
+++ b/README.dev
@@ -1,3 +1,20 @@
+Contributing:
+=============
+Gentoo Developers have full priviledges to the gentoolkit repository and
+any Gentoo developer can do work on the gentoolkit source.
+
+We only have several requirements. If you want to do a major change (i.e
+rewrite/refactor something), please talk to us before pushing any
+commits. If you break something, please fix it.
+
+If you want a new release of gentoolkit or gentoolkit-dev, please coordinate
+it with fuzzyray (gentoolkit) or idl0r (gentoolkit-dev).
+
+Any non Gentoo developers who wish to contribute, the best way to get
+started is by pulling a copy of the repository and submitting patches to
+bugzilla. Additionally, we can be found in the #gentoo-portage IRC
+channel.
+
Adding or modifying code:
=========================
- If you add new code, best practice is to write a test for it.
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2014-01-21 11:25 slis
0 siblings, 0 replies; 18+ messages in thread
From: slis @ 2014-01-21 11:25 UTC (permalink / raw
To: gentoo-commits
commit: 4335bf979f374300ac6678765f490f92ee805ab4
Author: slis <lis.slawek <AT> gmail <DOT> com>
AuthorDate: Tue Jan 21 10:48:32 2014 +0000
Commit: slis <lis.slawek <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 10:48:32 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=4335bf97
Merged revdep-rebuild branch
bin/{enalyze => revdep-ng} | 9 +-
pym/gentoolkit/revdep_rebuild/analyse.py | 200 +++++++++++++++++-------
pym/gentoolkit/revdep_rebuild/assign.py | 23 ++-
pym/gentoolkit/revdep_rebuild/cache.py | 50 +++---
pym/gentoolkit/revdep_rebuild/collect.py | 33 ++--
pym/gentoolkit/revdep_rebuild/rebuild.py | 30 ++--
pym/gentoolkit/revdep_rebuild/revdep-rebuild.py | 17 ++
pym/gentoolkit/revdep_rebuild/runner.py | 114 ++++++++++++++
pym/gentoolkit/revdep_rebuild/stuff.py | 4 +
9 files changed, 364 insertions(+), 116 deletions(-)
diff --cc pym/gentoolkit/revdep_rebuild/analyse.py
index aad8f81,e630bc9..7b17517
--- a/pym/gentoolkit/revdep_rebuild/analyse.py
+++ b/pym/gentoolkit/revdep_rebuild/analyse.py
@@@ -19,33 -14,35 +19,39 @@@ from .cache import save_cach
def prepare_checks(files_to_check, libraries, bits, cmd_max_args):
- ''' Calls scanelf for all files_to_check, then returns found libraries and dependencies
+ ''' Calls scanelf for all files_to_check,
+ then returns found libraries and dependencies
'''
- libs = [] # libs found by scanelf
- dependencies = [] # list of lists of files (from file_to_check) that uses
- # library (for dependencies[id] and libs[id] => id==id)
+ # libs found by scanelf
+ libs = []
+ # list of lists of files (from file_to_check) that uses
+ # library (for dependencies[id] and libs[id] => id==id)
+ dependencies = []
- for line in scan(
- ['-M', str(bits), '-nBF', '%F %n'],
- files_to_check, cmd_max_args
- ):
+
- parts = line.strip().split(' ')
- if len(parts) < 2: # no dependencies?
+ bits = []
+
+
+ # from runner import ScanRunner
+ # sr = ScanRunner(['-M', str(bits), '-nBF', '%F %n'], files_to_check, cmd_max_args)
+ # sr.wait()
+
+ for line in scan(['-M', str(bits), '-nBF', '%F %n %M'], files_to_check, cmd_max_args):
+ #call_program(['scanelf', '-M', str(bits), '-nBF', '%F %n',]+files_to_check).strip().split('\n'):
+ r = line.strip().split(' ')
+ if len(r) < 2: # no dependencies?
continue
- deps = parts[1].split(',')
- for dep in deps:
- if dep in libs:
- index = libs.index(dep)
- dependencies[index].append(parts[0])
+ deps = r[1].split(',')
+ for d in deps:
+ if d in libs:
+ i = libs.index(d)
+ dependencies[i].append(r[0])
else:
- libs.append(dep)
- dependencies.append([parts[0],])
-
+ #print d, 'bits:', r[2][8:] # 8: -> strlen('ELFCLASS')
+ libs.append(d)
+ dependencies.append([r[0],])
+
return (libs, dependencies)
@@@ -122,21 -136,40 +149,40 @@@ def find_broken(found_libs, system_libr
return broken
+ def find_broken2(scanned_files, logger):
+ broken_libs = {}
+ for bits, libs in scanned_files.items():
+ logger.debug('Checking for bits: %s' % bits)
+ alllibs = '|'.join(libs.keys()) + '|'
+ for soname, needed in libs.items():
+ for l in needed[1]:
+ if not l+'|' in alllibs:
+ try:
+ broken_libs[bits][l].add(soname)
+ except KeyError:
+ try:
+ broken_libs[bits][l] = set([soname])
+ except KeyError:
+ broken_libs = {bits: {l: set([soname])}}
+
+ return broken_libs
+
+
-def main_checks(found_libs, broken, dependencies, logger):
+def main_checks(found_libs, broken_list, dependencies, logger):
''' Checks for broken dependencies.
found_libs have to be the same as returned by prepare_checks
- broken is list of libraries found by scanelf
+ broken_list is list of libraries found by scanelf
dependencies is the value returned by prepare_checks
'''
broken_pathes = []
- for b in broken:
- f = found_libs[b]
+ for broken in broken_list:
+ found = found_libs[broken]
- logger.info('Broken files that requires: ' + bold(found))
+ logger.info('Broken files that requires: ' + bold(f))
- for d in dependencies[b]:
- logger.info(yellow(' * ') + d)
- broken_pathes.append(d)
+ for dep_path in dependencies[broken]:
+ logger.info(yellow(' * ') + dep_path)
+ broken_pathes.append(dep_path)
return broken_pathes
@@@ -152,31 -197,20 +210,32 @@@ def analyse(settings, logger, libraries
"""
if libraries and la_libraries and libraries_links and binaries:
- logger.info(blue(' * ') + bold('Found a valid cache, skipping collecting phase'))
+ logger.info(blue(' * ') +
+ bold('Found a valid cache, skipping collecting phase'))
else:
- #TODO: add partial cache (for ex. only libraries) when found for some reason
+ #TODO: add partial cache (for ex. only libraries)
+ # when found for some reason
- logger.warn(green(' * ') + bold('Collecting system binaries and libraries'))
+ logger.warn(green(' * ') +
+ bold('Collecting system binaries and libraries'))
bin_dirs, lib_dirs = prepare_search_dirs(logger, settings)
- masked_dirs, masked_files, ld = parse_revdep_config(settings['REVDEP_CONFDIR'])
+ masked_dirs, masked_files, ld = \
+ parse_revdep_config(settings['REVDEP_CONFDIR'])
- lib_dirs.update(ld)
- bin_dirs.update(ld)
- masked_dirs.update([
- '/lib/modules',
- '/lib32/modules',
- '/lib64/modules'
- ]
- )
+ lib_dirs = lib_dirs.union(ld)
+ bin_dirs = bin_dirs.union(ld)
- masked_dirs = masked_dirs.union(set(['/lib/modules', '/lib32/modules', '/lib64/modules',]))
-
- logger.info(green(' * ') + bold('Collecting dynamic linking informations'))
- libraries, la_libraries, libraries_links, symlink_pairs = collect_libraries_from_dir(lib_dirs, masked_dirs, logger)
++ masked_dirs = masked_dirs.union(
++ set([
++ '/lib/modules',
++ '/lib32/modules',
++ '/lib64/modules',
++ ])
++ )
+
+ logger.info(green(' * ') +
+ bold('Collecting dynamic linking informations'))
+ libraries, la_libraries, libraries_links, symlink_pairs = \
+ collect_libraries_from_dir(lib_dirs, masked_dirs, logger)
binaries = collect_binaries_from_dir(bin_dirs, masked_dirs, logger)
if settings['USE_TMP_FILES']:
@@@ -188,56 -222,75 +247,79 @@@
)
- logger.debug('Found '+ str(len(libraries)) +
- ' libraries (+' + str(len(libraries_links)) +
- ' symlinks) and ' + str(len(binaries)) +
- ' binaries')
- logger.debug('Found '+ str(len(libraries)) + ' libraries (+' + str(len(libraries_links)) + ' symlinks) and ' + str(len(binaries)) + ' binaries')
++ logger.debug('Found %i libraries (+%i symlinks) and %i binaries' %
++ (len(libraries), len(libraries_links), len(binaries))
++ )
+ logger.info(green(' * ') + bold('Scanning files'))
+
+ libs_and_bins = libraries+binaries
+ scanned_files = scan_files(libs_and_bins, settings['CMD_MAX_ARGS'])
+
logger.warn(green(' * ') + bold('Checking dynamic linking consistency'))
- logger.debug('Search for ' + str(len(binaries)+len(libraries)) +
- ' within ' + str(len(libraries)+len(libraries_links)))
- libs_and_bins = libraries+binaries
- logger.debug('Search for ' + str(len(binaries)+len(libraries)) + ' within ' + str(len(libraries)+len(libraries_links)))
++ logger.debug('Search for %i within %i' %
++ (len(binaries)+len(libraries), len(libraries)+len(libraries_links))
++ )
+
+ broken = find_broken2(scanned_files, logger)
+ broken_pathes = main_checks2(broken, scanned_files, logger)
+
+ broken_la = extract_dependencies_from_la(la_libraries, libraries+libraries_links, _libs_to_check, logger)
+ broken_pathes += broken_la
- found_libs = []
- dependencies = []
+ logger.warn(green(' * ') + bold('Assign files to packages'))
+
+ return assign_packages(broken_pathes, logger, settings)
- if _libs_to_check:
- nltc = []
- for ltc in _libs_to_check:
- if os.path.isfile(ltc):
- ltc = scan(['-nBSF', '%S'], [ltc,], settings['CMD_MAX_ARGS'])[0].split()[0]
- nltc += [ltc,]
- _libs_to_check = nltc
+ import sys
+ sys.exit()
+
+ #l = []
+ #for line in call_program(['scanelf', '-M', '64', '-BF', '%F',] + libraries).strip().split('\n'):
+ #l.append(line)
+ #libraries = l
- _bits, linkg = platform.architecture()
- if _bits.startswith('32'):
- bits = 32
- elif _bits.startswith('64'):
- bits = 64
+ ## old version from here
+ #found_libs = []
+ #dependencies = []
- broken = []
- for av_bits in glob.glob('/lib[0-9]*') or ('/lib32',):
- bits = int(av_bits[4:])
+ #if _libs_to_check:
+ #nltc = []
+ #for ltc in _libs_to_check:
+ #if os.path.isfile(ltc):
+ #ltc = scan(['-nBSF', '%S'], [ltc,], settings['CMD_MAX_ARGS'])[0].split()[0]
+ #nltc += [ltc,]
+ #_libs_to_check = nltc
- _libraries = libraries+libraries_links
+ #_bits, linkg = platform.architecture()
+ #if _bits.startswith('32'):
+ #bits = 32
+ #elif _bits.startswith('64'):
+ #bits = 64
- found_libs, dependencies = prepare_checks(libs_and_bins,
- _libraries, bits, settings['CMD_MAX_ARGS'])
- broken = find_broken(found_libs, _libraries, _libs_to_check)
+ #import time
+ #broken = []
+ #for av_bits in glob.glob('/lib[0-9]*') or ('/lib32',):
+ #bits = int(av_bits[4:])
- bits /= 2
- bits = int(bits)
+ ##_libraries = scan(['-M', str(bits), '-BF', '%F'], libraries+libraries_links, settings['CMD_MAX_ARGS'])
+ #_libraries = libraries+libraries_links
- broken_la = extract_dependencies_from_la(la_libraries,
- libraries+libraries_links, _libs_to_check, logger)
+ #found_libs, dependencies = prepare_checks(libs_and_bins, _libraries, bits, settings['CMD_MAX_ARGS'])
+ #broken = find_broken(found_libs, _libraries, _libs_to_check)
+ #bits /= 2
+ #bits = int(bits)
- broken_pathes = main_checks(found_libs, broken, dependencies, logger)
- broken_pathes += broken_la
+ #broken_la = extract_dependencies_from_la(la_libraries, libraries+libraries_links, _libs_to_check, logger)
- logger.warn(green(' * ') + bold('Assign files to packages'))
- return assign_packages(broken_pathes, logger, settings)
+ #broken_pathes = main_checks(found_libs, broken, dependencies, logger)
+ #broken_pathes += broken_la
+
+ #logger.warn(green(' * ') + bold('Assign files to packages'))
+
+ #return assign_packages(broken_pathes, logger, settings)
diff --cc pym/gentoolkit/revdep_rebuild/assign.py
index e8e87b3,bb9ec1f..2a93fe1
--- a/pym/gentoolkit/revdep_rebuild/assign.py
+++ b/pym/gentoolkit/revdep_rebuild/assign.py
@@@ -27,34 -13,26 +27,49 @@@ def assign_packages(broken, logger, set
Broken is list of files
'''
assigned = set()
- if not broken:
- return assigned
+ for group in os.listdir(settings['PKG_DIR']):
+ for pkg in os.listdir(settings['PKG_DIR'] + group):
+ f = settings['PKG_DIR'] + group + '/' + pkg + '/CONTENTS'
+ if os.path.exists(f):
+ try:
+ with open(f, 'r') as cnt:
+ for line in cnt.readlines():
+ m = re.match('^obj (/[^ ]+)', line)
+ if m is not None:
+ m = m.group(1)
+ if m in broken:
+ found = group+'/'+pkg
+ if found not in assigned:
+ assigned.add(found)
+ logger.info('\t' + m + ' -> ' + bold(found))
+ except Exception as e:
+ logger.warn(red(' !! Failed to read ' + f))
- pkgset = set(get_installed_cpvs())
+ return assigned
+ # Map all files in CONTENTS database to package names
+ fname_pkg_dict = {}
+ for pkg in pkgset:
+ contents = Package(pkg).parsed_contents()
+ for fname in contents.keys():
+ if contents[fname][0] == "obj":
+ fname_pkg_dict[fname] = str(pkg)
+
+ for fname in broken:
+ realname = os.path.realpath(fname)
+ if realname in fname_pkg_dict.keys():
+ pkgname = fname_pkg_dict[realname]
+ elif fname in fname_pkg_dict.keys():
+ pkgname = fname_pkg_dict[fname]
+ else:
+ pkgname = None
+ if pkgname and pkgname not in assigned:
+ assigned.add(pkgname)
+ if not pkgname:
+ pkgname = "(none)"
+ logger.info('\t' + fname + ' -> ' + bold(pkgname))
+
+ return assigned
def get_best_match(cpv, cp, logger):
"""Tries to find another version of the pkg with the same slot
diff --cc pym/gentoolkit/revdep_rebuild/cache.py
index d6ef7ce,8b1a8ed..1be8cb0
--- a/pym/gentoolkit/revdep_rebuild/cache.py
+++ b/pym/gentoolkit/revdep_rebuild/cache.py
@@@ -18,54 -12,42 +18,50 @@@ def read_cache(temp_path=DEFAULTS['DEFA
This function does not checks if files exists nor timestamps,
check_temp_files should be called first
@param temp_path: directory where all temp files should reside
- @return tuple with values of: libraries, la_libraries, libraries_links, symlink_pairs, binaries
+ @return tuple with values of:
+ libraries, la_libraries, libraries_links, symlink_pairs, binaries
'''
- ret = {'libraries':[], 'la_libraries':[], 'libraries_links':[], 'binaries':[]}
+ ret = {
+ 'libraries':[],
+ 'la_libraries':[],
+ 'libraries_links':[],
+ 'binaries':[]
+ }
try:
- for key, val in list(ret.items()):
- _file = open(os.path.join(temp_path, key))
- for line in _file .readlines():
+ for key,val in ret.iteritems():
- f = open(os.path.join(temp_path, key))
- for line in f.readlines():
++ _file = open(os.path.join(temp_path, key))
++ for line in _file.readlines():
val.append(line.strip())
#libraries.remove('\n')
- f.close()
+ _file .close()
except EnvironmentError:
pass
- return (ret['libraries'], ret['la_libraries'], ret['libraries_links'], ret['binaries'])
+ return (ret['libraries'], ret['la_libraries'],
+ ret['libraries_links'], ret['binaries'])
- def save_cache(logger, to_save=None, temp_path=DEFAULTS['DEFAULT_TMP_DIR']):
+ def save_cache(logger, to_save={}, temp_path=DEFAULTS['DEFAULT_TMP_DIR']):
''' Tries to store caching information.
@param logger
- @param to_save have to be dict with keys: libraries, la_libraries, libraries_links and binaries
+ @param to_save have to be dict with keys:
+ libraries, la_libraries, libraries_links and binaries
'''
- if to_save is None:
- to_save = {}
-
- # TODO: Don't blindly make the cache directory, see Bug 203414
- # if not os.path.exists(temp_path):
- # os.makedirs(temp_path)
+ if not os.path.exists(temp_path):
+ os.makedirs(temp_path)
try:
- f = open(os.path.join(temp_path, 'timestamp'), 'w')
- f.write(str(int(time.time())))
- f.close()
+ _file = open(os.path.join(temp_path, 'timestamp'), 'w')
+ _file.write(str(int(time.time())))
+ _file.close()
- for key, val in list(to_save.items()):
+ for key,val in to_save.iteritems():
- f = open(os.path.join(temp_path, key), 'w')
+ _file = open(os.path.join(temp_path, key), 'w')
for line in val:
- f.write(line + '\n')
- f.close()
+ _file.write(line + '\n')
+ _file.close()
except Exception as ex:
logger.warn(red('Could not save cache: %s' %str(ex)))
@@@ -106,31 -84,23 +101,30 @@@ def check_temp_files(temp_path=DEFAULTS
if __name__ == '__main__':
- print 'Preparing cache ... '
+ print('Preparing cache ... ')
- from collect import *
+ from .collect import (prepare_search_dirs, parse_revdep_config,
+ collect_libraries_from_dir, collect_binaries_from_dir)
-
import logging
- bin_dirs, lib_dirs = prepare_search_dirs(logging, DEFAULTS)
+ bin_dirs, lib_dirs = prepare_search_dirs()
- masked_dirs, masked_files, ld = parse_revdep_config("/etc/revdep-rebuild/")
- lib_dirs.update(ld)
- bin_dirs.update(ld)
- masked_dirs = masked_dirs.update([
- '/lib/modules',
- '/lib32/modules',
- '/lib64/modules'
- ]
- )
+ masked_dirs, masked_files, ld = parse_revdep_config()
+ lib_dirs = lib_dirs.union(ld)
+ bin_dirs = bin_dirs.union(ld)
- masked_dirs = masked_dirs.union(set(['/lib/modules', '/lib32/modules', '/lib64/modules',]))
++ masked_dirs = masked_dirs.union(
++ set([
++ '/lib/modules',
++ '/lib32/modules',
++ '/lib64/modules',
++ ])
++ )
- libraries, la_libraries, libraries_links, symlink_pairs = \
- collect_libraries_from_dir(lib_dirs, masked_dirs, logging)
+ libraries, la_libraries, libraries_links, symlink_pairs = collect_libraries_from_dir(lib_dirs, masked_dirs, logging)
binaries = collect_binaries_from_dir(bin_dirs, masked_dirs, logging)
- save_cache(logger=logging,
- to_save={'libraries':libraries, 'la_libraries':la_libraries,
+ save_cache(logger=logging,
+ to_save={'libraries':libraries, 'la_libraries':la_libraries,
'libraries_links':libraries_links, 'binaries':binaries}
)
diff --cc pym/gentoolkit/revdep_rebuild/collect.py
index 740ae32,b7ed469..f8ee60d
--- a/pym/gentoolkit/revdep_rebuild/collect.py
+++ b/pym/gentoolkit/revdep_rebuild/collect.py
@@@ -26,8 -22,8 +26,8 @@@ def parse_conf(conf_file, visited=None
for conf in conf_file:
try:
- with open(conf) as f:
- for line in f.readlines():
+ with open(conf) as _file:
- for line in _file:
++ for line in _file.readlines():
line = line.strip()
if line.startswith('#'):
continue
@@@ -66,13 -62,12 +66,13 @@@ def prepare_search_dirs(logger, setting
lib_dirs = set(['/lib', '/usr/lib', ])
#try:
- with open(os.path.join(portage.root, settings['DEFAULT_ENV_FILE']), 'r') as f:
- for line in f.readlines():
+ with open(os.path.join(
+ portage.root, settings['DEFAULT_ENV_FILE']), 'r') as _file:
- for line in _file:
++ for line in _file.readlines():
line = line.strip()
- m = re.match("^export (ROOT)?PATH='([^']+)'", line)
- if m is not None:
- bin_dirs = bin_dirs.union(set(m.group(2).split(':')))
+ match = re.match("^export (ROOT)?PATH='([^']+)'", line)
+ if match is not None:
+ bin_dirs.update(set(match.group(2).split(':')))
#except EnvironmentError:
#logger.debug(yellow('Could not open file %s' % f))
@@@ -250,21 -230,17 +250,26 @@@ def collect_binaries_from_dir(dirs, mas
if __name__ == '__main__':
import logging
- from .settings import DEFAULTS
- mbin_dirs, mlib_dirs = prepare_search_dirs(logging, DEFAULTS)
-
- mmasked_dirs, mmasked_files, mld = parse_revdep_config("/etc/revdep-rebuild/")
- mlib_dirs.update(mld)
- mbin_dirs.update(mld)
- mmasked_dirs.update(['/lib/modules', '/lib32/modules', '/lib64/modules'])
+ bin_dirs, lib_dirs = prepare_search_dirs(logging)
+
+ masked_dirs, masked_files, ld = parse_revdep_config()
+ lib_dirs = lib_dirs.union(ld)
+ bin_dirs = bin_dirs.union(ld)
- masked_dirs = masked_dirs.union(set(['/lib/modules', '/lib32/modules', '/lib64/modules',]))
-
- libraries, la_libraries, libraries_links, symlink_pairs = collect_libraries_from_dir(lib_dirs, masked_dirs, logging)
- binaries = collect_binaries_from_dir(bin_dirs, masked_dirs, logging)
-
- logging.debug('Found: %i binaries and %i libraries.' %(len(binaries), len(libraries)))
++ masked_dirs = masked_dirs.union(
++ set([
++ '/lib/modules',
++ '/lib32/modules',
++ '/lib64/modules',
++ ])
++ )
+
+ libraries, la_libraries, libraries_links, msymlink_pairs = \
+ collect_libraries_from_dir(mlib_dirs, mmasked_dirs, logging)
+ binaries = collect_binaries_from_dir(mbin_dirs, mmasked_dirs, logging)
+
+ logging.debug(
+ 'Found: %i binaries and %i libraries.' %(
+ len(binaries), len(libraries)))
diff --cc pym/gentoolkit/revdep_rebuild/rebuild.py
index 8d21b76,a943902..386ac33
--- a/pym/gentoolkit/revdep_rebuild/rebuild.py
+++ b/pym/gentoolkit/revdep_rebuild/rebuild.py
@@@ -103,10 -103,10 +103,11 @@@ def parse_options()
'keep-temp', 'library=', 'no-ld-path', 'no-order',
'pretend', 'no-pretend', 'no-progress', 'quiet', 'verbose'])
+ do_help = False
for key, val in opts:
if key in ('-h', '--help'):
- do_help = True
+ print_usage()
+ sys.exit(0)
elif key in ('-q', '--quiet'):
settings['quiet'] = True
settings['VERBOSITY'] = 0
@@@ -134,9 -134,6 +135,7 @@@
print(red('Unrecognized option\n'))
print_usage()
sys.exit(2)
- if do_help:
- print_usage()
- sys.exit(0)
++
return settings
@@@ -195,25 -181,25 +194,33 @@@ def main(settings=None, logger=None)
if not settings['stdout'].isatty() or settings['nocolor']:
nocolor()
+ #TODO: Development warning
+ logger.warn(blue(' * ') +
+ yellow('This is a development version, '
+ 'so it may not work correctly'))
+ logger.warn(blue(' * ') +
+ yellow('The original revdep-rebuild script is '
+ 'installed as revdep-rebuild.sh'))
+
if os.getuid() != 0 and not settings['PRETEND']:
- logger.warn(blue(' * ') +
+ logger.warn(blue(' * ') +
yellow('You are not root, adding --pretend to portage options'))
settings['PRETEND'] = True
+ elif not settings['PRETEND'] \
+ and settings['IS_DEV'] \
+ and not settings['NO_PRETEND']:
+ logger.warn(blue(' * ') +
+ yellow('This is a development version, '
+ 'so it may not work correctly'))
+ logger.warn(blue(' * ') +
+ yellow('Adding --pretend to portage options anyway'))
+ logger.info(blue(' * ') +
+ 'If you\'re sure, you can add --no-pretend to revdep options')
+ settings['PRETEND'] = True
- if settings['library']:
- logger.warn(green(' * ') +
- "Looking for libraries: %s" % (bold(', '.join(settings['library']))))
-
+ analyze_cache = {}
if settings['USE_TMP_FILES'] \
- and check_temp_files(settings['DEFAULT_TMP_DIR'], logger=logger):
+ and check_temp_files(settings['DEFAULT_TMP_DIR']):
libraries, la_libraries, libraries_links, binaries = read_cache(
settings['DEFAULT_TMP_DIR'])
assigned = analyse(
diff --cc pym/gentoolkit/revdep_rebuild/stuff.py
index e78748c,7b287b1..0bebce2
--- a/pym/gentoolkit/revdep_rebuild/stuff.py
+++ b/pym/gentoolkit/revdep_rebuild/stuff.py
@@@ -43,12 -31,11 +43,16 @@@ def scan(params, files, max_args)
return out
+ def exithandler(signum, frame):
+ sys.exit(1)
+
+
def get_masking_status(ebuild):
+ """returns the masking status of an ebuild
+
+ @param ebuild: str
+ @return list
+ """
try:
status = portage.getmaskingstatus(ebuild)
except KeyError:
^ permalink raw reply [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2014-08-29 4:04 Brian Dolbec
0 siblings, 0 replies; 18+ messages in thread
From: Brian Dolbec @ 2014-08-29 4:04 UTC (permalink / raw
To: gentoo-commits
commit: df3c18b4650f379bcab4e4a70bc9ef0db10f0269
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 29 04:00:38 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Aug 29 04:02:23 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=df3c18b4
setup.py: Fix installation on slackware systems
Make sure it evaluates the absolute path of the file.
This was reported by tampakrap while trying to package it on a slackware system.
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index f372fe9..ae4b7c7 100755
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ from glob import glob
import os
import io
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pym'))
+sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pym'))
if ( len(sys.argv) > 2 ) and ( sys.argv[1] == "set_version" ):
__version__ = sys.argv[2]
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: /
@ 2014-11-12 7:16 Slawek Lis
0 siblings, 0 replies; 18+ messages in thread
From: Slawek Lis @ 2014-11-12 7:16 UTC (permalink / raw
To: gentoo-commits
commit: d0aff719f8b1522c427d3caa9c48bc0fa06e8425
Author: Slawek Lis <slis <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 12 07:14:47 2014 +0000
Commit: Slawek Lis <slis <AT> gentoo <DOT> org>
CommitDate: Wed Nov 12 07:14:47 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=d0aff719
Merge branch 'gentoolkit' of git+ssh://git.overlays.gentoo.org/proj/gentoolkit into gentoolkit
bin/revdep-rebuild.sh | 38 ++++++++++++++++++++++++++++++++++++--
man/revdep-rebuild.1 | 3 +++
2 files changed, 39 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2014-11-12 7:25 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 7:16 [gentoo-commits] proj/gentoolkit:gentoolkit commit in: / Slawek Lis
-- strict thread matches above, loose matches on Subject: below --
2014-08-29 4:04 Brian Dolbec
2014-01-21 11:25 slis
2013-11-02 17:50 Paul Varner
2013-09-05 14:47 Paul Varner
2013-01-04 2:31 Paul Varner
2013-01-02 23:12 Paul Varner
2012-12-23 1:53 Brian Dolbec
2012-12-22 17:12 Brian Dolbec
2012-12-18 10:42 Paul Varner
2012-06-29 2:24 Brian Dolbec
2012-02-06 16:23 Paul Varner
2011-12-19 19:40 Paul Varner
2011-07-14 1:44 Brian Dolbec
2011-05-29 10:59 Christian Ruppert
2011-05-12 2:55 Paul Varner
2011-05-12 2:55 Paul Varner
2011-02-23 9:10 Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox