aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--CHANGES13
-rw-r--r--ChangeLog22
-rw-r--r--RELEASE_NOTES19
-rw-r--r--layman/action.py9
-rw-r--r--layman/overlay.py6
-rw-r--r--layman/overlays/git.py2
-rw-r--r--layman/overlays/overlay.py35
-rw-r--r--layman/version.py2
9 files changed, 84 insertions, 25 deletions
diff --git a/AUTHORS b/AUTHORS
index f09e6c8..8bdad29 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -17,3 +17,4 @@ Mike Auty (ikelos@gentoo.org) - Updates for python-2.6
A. F. T. Arahesis (arfrever.fta@gmail.com) - Quieten the VC systems
- Better locale support.
Donnie Berkholz (dberkholz@gentoo.org) - git support fixes
+Martin von Gagern (Martin.vGagern@gmx.net) - Better list format.
diff --git a/CHANGES b/CHANGES
index b3654b3..86bb4f9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,19 @@
CHANGES
-------
+Version 1.2.2 - Released 2008/12/28
+===================================
+
+ - layman -L: better use of screen real estate for source URLs
+ (#251032)
+
+ - Execute subprocesses in a shell. Fixes app-portage/layman-1.2.1:
+ --quietness=2 is broken (#247792)
+
+ - app-portage/layman - 'layman -S --quiet' yields "git: 'pull-q' is
+ not a git-command." (#247964)
+
+
Version 1.2.1 - Released 2008/11/15
===================================
diff --git a/ChangeLog b/ChangeLog
index 2bcf8eb..e3212f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2008-12-28 Gunnar Wrobel <p@rdus.de>
+
+ * layman/version.py (VERSION): Bump to 1.2.2.
+
+ * layman/overlays/overlay.py (Overlay.short_list.terminal_width):
+ layman -L: better use of screen real estate for source
+ URLs (#251032).
+ Submitted by Martin von Gagern <Martin.vGagern@gmx.net>.
+ https://bugs.gentoo.org/show_bug.cgi?id=251032
+
+2008-12-03 Gunnar Wrobel <p@rdus.de>
+
+ * layman/overlays/overlay.py (Overlay.cmd): Execute subprocesses
+ in a shell. Fixes app-portage/layman-1.2.1: --quietness=2 is
+ broken (#247792).
+ http://bugs.gentoo.org/show_bug.cgi?id=247792
+
+ * layman/overlays/git.py (GitOverlay.sync): app-portage/layman -
+ 'layman -S --quiet' yields "git: 'pull-q' is not a
+ git-command." (#247964)
+ http://bugs.gentoo.org/show_bug.cgi?id=247964
+
2008-11-15 Gunnar Wrobel <p@rdus.de>
* layman/version.py (VERSION): Bump to 1.2.1.
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 4635feb..cc9ae84 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,25 +1,22 @@
-Version 1.2.0 - Released 2008/06/02
+Version 1.2.2 - Released 2008/12/28
===================================
FULL CHANGES
------------
- - Pass --quiet flag down to the version control
- system (#236165).
+ - layman -L: better use of screen real estate for source URLs
+ (#251032)
- - Fixes for python-2.6 (#237625)
+ - Execute subprocesses in a shell. Fixes app-portage/layman-1.2.1:
+ --quietness=2 is broken (#247792)
- - Better locale support (#235165)
-
- - Handle git+ssh://, ssh:// correctly (#230702)
-
- - Do not remove directories if adding an
- overlay failed (#236945)
+ - app-portage/layman - 'layman -S --quiet' yields "git: 'pull-q' is
+ not a git-command." (#247964)
SHORT CHANGES
-------------
- layman-1.2.1 is a bug fix release that fixes a few minor bugs.
+ layman-1.2.2 is a bug fix release that fixes a few minor bugs.
FRESHMEAT
=========
diff --git a/layman/action.py b/layman/action.py
index a54e4a5..daddc3c 100644
--- a/layman/action.py
+++ b/layman/action.py
@@ -90,7 +90,7 @@ class Sync:
self.rdb = RemoteDB(config)
- self.quiet = config['quiet']
+ self.quiet = int(config['quietness']) < 3
self.selection = config['sync']
@@ -119,6 +119,7 @@ class Sync:
'as correct location. Please consider removing and rea'
'dding the overlay!')
+ self.db.sync(i, self.quiet)
try:
self.db.sync(i, self.quiet)
success.append('Successfully synchronized overlay "' + i + '".')
@@ -157,7 +158,7 @@ class Add:
self.rdb = RemoteDB(config)
- self.quiet = config['quiet']
+ self.quiet = int(config['quietness']) < 3
self.selection = config['add']
@@ -338,8 +339,8 @@ class List:
>>> a = List(config)
>>> a.rdb.cache()
>>> OUT.color_off()
- >>> a.run()
- * wrobel [Subversion] (source: https://overlays.gentoo.or...)
+ >>> a.run() #doctest: +ELLIPSIS
+ * wrobel [Subversion] (https://overlays.gentoo.or...)
0
>>> a.config['verbose'] = True
>>> a.run()
diff --git a/layman/overlay.py b/layman/overlay.py
index 702fe81..ce4fc93 100644
--- a/layman/overlay.py
+++ b/layman/overlay.py
@@ -209,9 +209,9 @@ class Overlays:
<BLANKLINE>
>>> for i in a.list(False):
- ... print i[0]
- wrobel [Subversion] (source: https://overlays.gentoo.or...)
- wrobel-stable [Rsync ] (source: rsync://gunnarwrobel.de/wr...)
+ ... print i[0] #doctest: +ELLIPSIS
+ wrobel [Subversion] (https://overlays.gentoo.or...)
+ wrobel-stable [Rsync ] (rsync://gunnarwrobel.de/wr...)
'''
result = []
diff --git a/layman/overlays/git.py b/layman/overlays/git.py
index d0c8a5a..bda2df0 100644
--- a/layman/overlays/git.py
+++ b/layman/overlays/git.py
@@ -63,7 +63,7 @@ class GitOverlay(Overlay):
self.supported()
if quiet:
- quiet_option = '-q '
+ quiet_option = ' -q'
else:
quiet_option = ''
diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py
index 7a86a1b..2887ec4 100644
--- a/layman/overlays/overlay.py
+++ b/layman/overlays/overlay.py
@@ -161,8 +161,10 @@ class Overlay:
if not self.quiet:
return os.system(command)
else:
- cmd = subprocess.Popen([command], stdout=subprocess.PIPE,
- stderr=subprocess.PIPE, close_fds=True)
+ cmd = subprocess.Popen([command], shell = True,
+ stdout = subprocess.PIPE,
+ stderr = subprocess.PIPE,
+ close_fds = True)
result = cmd.wait()
return result
@@ -220,8 +222,8 @@ class Overlay:
>>> document = xml.dom.minidom.parseString(document)
>>> overlays = document.getElementsByTagName('overlay')
>>> a = Overlay(overlays[0])
- >>> print a.short_list()
- wrobel [None ] (source: https://overlays.gentoo.or...)
+ >>> print a.short_list() #doctest: +ELLIPSIS
+ wrobel [None ] (https://overlays.gentoo.or...)
'''
def pad(string, length):
@@ -231,9 +233,32 @@ class Overlay:
else:
return string[:length - 3] + '...'
+ def terminal_width():
+ '''Determine width of terminal window.'''
+ try:
+ width = int(os.environ['COLUMNS'])
+ if width > 0:
+ return width
+ except:
+ pass
+ try:
+ import struct, fcntl, termios
+ query = struct.pack('HHHH', 0, 0, 0, 0)
+ response = fcntl.ioctl(1, termios.TIOCGWINSZ, query)
+ width = struct.unpack('HHHH', response)[1]
+ if width > 0:
+ return width
+ except:
+ pass
+ return 80
+
name = pad(self.name, 25)
mtype = ' [' + pad(self.type, 10) + ']'
- source = ' (source: ' + pad(self.src, 29) + ')'
+ srclen = terminal_width() - 43
+ source = self.src
+ if len(source) > srclen:
+ source = source.replace("overlays.gentoo.org", "o.g.o")
+ source = ' (' + pad(source, srclen) + ')'
return name + mtype + source
diff --git a/layman/version.py b/layman/version.py
index cf95349..ad74cdb 100644
--- a/layman/version.py
+++ b/layman/version.py
@@ -18,7 +18,7 @@
__version__ = "$Id: version.py 309 2007-04-09 16:23:38Z wrobel $"
-VERSION = '1.2.1'
+VERSION = '1.2.2'
if __name__ == '__main__':
print VERSION