diff options
author | Gunnar Wrobel <p@rdus.de> | 2008-12-28 22:39:52 +0000 |
---|---|---|
committer | Gunnar Wrobel <p@rdus.de> | 2008-12-28 22:39:52 +0000 |
commit | 4f4943dd906d010d728b6581fd4095c82d8d636f (patch) | |
tree | dd92c8c7ee5dcd22fae006fbe40a4f99e6b78b42 | |
parent | Copyright. (diff) | |
download | layman-4f4943dd906d010d728b6581fd4095c82d8d636f.tar.gz layman-4f4943dd906d010d728b6581fd4095c82d8d636f.tar.bz2 layman-4f4943dd906d010d728b6581fd4095c82d8d636f.zip |
layman-1.2.2.v1.2.2
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | CHANGES | 13 | ||||
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | RELEASE_NOTES | 19 | ||||
-rw-r--r-- | layman/action.py | 9 | ||||
-rw-r--r-- | layman/overlay.py | 6 | ||||
-rw-r--r-- | layman/overlays/git.py | 2 | ||||
-rw-r--r-- | layman/overlays/overlay.py | 35 | ||||
-rw-r--r-- | layman/version.py | 2 |
9 files changed, 84 insertions, 25 deletions
@@ -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. @@ -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 =================================== @@ -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 |