aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <p@rdus.de>2009-01-01 07:39:39 +0000
committerGunnar Wrobel <p@rdus.de>2009-01-01 07:39:39 +0000
commit6d9311c911387ef9e58a1fd21921672dd10ef82b (patch)
tree1d7486c09aa0808b8a3f0bec56e379f41f05e4ee
parentlayman-1.2.2. (diff)
downloadoverlord-6d9311c911387ef9e58a1fd21921672dd10ef82b.tar.gz
overlord-6d9311c911387ef9e58a1fd21921672dd10ef82b.tar.bz2
overlord-6d9311c911387ef9e58a1fd21921672dd10ef82b.zip
layman-1.2.3.
-rw-r--r--CHANGES8
-rw-r--r--ChangeLog12
-rw-r--r--RELEASE_NOTES13
-rw-r--r--layman/action.py10
-rw-r--r--layman/config.py11
-rw-r--r--layman/overlay.py12
-rw-r--r--layman/overlays/overlay.py10
-rw-r--r--layman/version.py2
8 files changed, 52 insertions, 26 deletions
diff --git a/CHANGES b/CHANGES
index 86bb4f9..4e11896 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,14 @@
CHANGES
-------
+Version 1.2.3 - Released 2009/01/01
+===================================
+
+ - Support setting the terminal screen width (also fixes #253016)
+
+ - layman -S fetches each overlay twice (#253241)
+
+
Version 1.2.2 - Released 2008/12/28
===================================
diff --git a/ChangeLog b/ChangeLog
index e3212f1..367924f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-01-01 Gunnar Wrobel <p@rdus.de>
+
+ * layman/version.py (VERSION): Bump to 1.2.3.
+
+ * layman/overlays/overlay.py (Overlay.short_list): Support setting
+ the terminal screen width (also fixes #253016)
+ http://bugs.gentoo.org/show_bug.cgi?id=253016
+
+ * layman/action.py (Sync.run): layman -S fetches each overlay
+ twice (#253241)
+ http://bugs.gentoo.org/show_bug.cgi?id=253241
+
2008-12-28 Gunnar Wrobel <p@rdus.de>
* layman/version.py (VERSION): Bump to 1.2.2.
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index cc9ae84..01286b9 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,22 +1,17 @@
-Version 1.2.2 - Released 2008/12/28
+Version 1.2.3 - Released 2009/01/01
===================================
FULL CHANGES
------------
- - layman -L: better use of screen real estate for source URLs
- (#251032)
+ - Support setting the terminal screen width (also fixes #253016)
- - 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)
+ - layman -S fetches each overlay twice (#253241)
SHORT CHANGES
-------------
- layman-1.2.2 is a bug fix release that fixes a few minor bugs.
+ layman-1.2.3 is a bug fix release that fixes a few minor bugs.
FRESHMEAT
=========
diff --git a/layman/action.py b/layman/action.py
index daddc3c..b7b36b6 100644
--- a/layman/action.py
+++ b/layman/action.py
@@ -119,7 +119,6 @@ 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 + '".')
@@ -335,12 +334,13 @@ class List:
... 'proxy' : None,
... 'nocheck' : False,
... 'verbose': False,
- ... 'quietness':3}
+ ... 'quietness':3,
+ ... 'width':80}
>>> a = List(config)
>>> a.rdb.cache()
>>> OUT.color_off()
- >>> a.run() #doctest: +ELLIPSIS
- * wrobel [Subversion] (https://overlays.gentoo.or...)
+ >>> a.run()
+ * wrobel [Subversion] (https://o.g.o/svn/dev/wrobel )
0
>>> a.config['verbose'] = True
>>> a.run()
@@ -377,7 +377,7 @@ class List:
def run(self):
''' List the available overlays.'''
- for i in self.rdb.list(self.config['verbose']):
+ for i in self.rdb.list(self.config['verbose'], self.config['width']):
# Is the overlay supported?
if i[1]:
# Is this an official overlay?
diff --git a/layman/config.py b/layman/config.py
index 3af852a..1e6c8a8 100644
--- a/layman/config.py
+++ b/layman/config.py
@@ -52,7 +52,7 @@ class Config(object):
>>> a['overlays']
'\\nhttp://www.gentoo.org/proj/en/overlays/layman-global.txt'
>>> sorted(a.keys())
- ['cache', 'config', 'local_list', 'make_conf', 'nocheck', 'overlays', 'proxy', 'quietness', 'storage', 'umask']
+ ['cache', 'config', 'local_list', 'make_conf', 'nocheck', 'overlays', 'proxy', 'quietness', 'storage', 'umask', 'width']
'''
self.defaults = {'config' : '/etc/layman/layman.cfg',
@@ -197,6 +197,15 @@ class Config(object):
' you set this below 2 the same warning as given for --'
'quiet applies! ')
+ group.add_option('-W',
+ '--width',
+ action = 'store',
+ type = 'int',
+ default = '0',
+ help = 'Sets the screen width. This setting is usually '
+ 'not required as layman is capable of detecting the ava'
+ 'available number of columns automatically.')
+
group.add_option('-k',
'--nocheck',
action = 'store_true',
diff --git a/layman/overlay.py b/layman/overlay.py
index ce4fc93..a9a1980 100644
--- a/layman/overlay.py
+++ b/layman/overlay.py
@@ -181,7 +181,7 @@ class Overlays:
if overlay in self.overlays.keys():
return self.overlays[overlay]
- def list(self, verbose = False):
+ def list(self, verbose = False, width = 0):
'''
List all overlays.
@@ -208,10 +208,10 @@ class Overlays:
A collection of ebuilds from Gunnar Wrobel [wrobel@gentoo.org].
<BLANKLINE>
- >>> for i in a.list(False):
- ... print i[0] #doctest: +ELLIPSIS
- wrobel [Subversion] (https://overlays.gentoo.or...)
- wrobel-stable [Rsync ] (rsync://gunnarwrobel.de/wr...)
+ >>> for i in a.list(False, 80):
+ ... print i[0]
+ wrobel [Subversion] (https://o.g.o/svn/dev/wrobel )
+ wrobel-stable [Rsync ] (rsync://gunnarwrobel.de/wrobel-stable)
'''
result = []
@@ -221,7 +221,7 @@ class Overlays:
result.append((str(overlay), overlay.is_supported(),
overlay.is_official()))
else:
- result.append((overlay.short_list(), overlay.is_supported(),
+ result.append((overlay.short_list(width), overlay.is_supported(),
overlay.is_official()))
result = sorted(result)
diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py
index 2887ec4..b9568b1 100644
--- a/layman/overlays/overlay.py
+++ b/layman/overlays/overlay.py
@@ -214,7 +214,7 @@ class Overlay:
return result
- def short_list(self):
+ def short_list(self, width = 0):
'''
>>> here = os.path.dirname(os.path.realpath(__file__))
>>> document = open(here + '/../tests/testfiles/global-overlays.xml').read()
@@ -222,8 +222,8 @@ class Overlay:
>>> document = xml.dom.minidom.parseString(document)
>>> overlays = document.getElementsByTagName('overlay')
>>> a = Overlay(overlays[0])
- >>> print a.short_list() #doctest: +ELLIPSIS
- wrobel [None ] (https://overlays.gentoo.or...)
+ >>> print a.short_list(80)
+ wrobel [None ] (https://o.g.o/svn/dev/wrobel )
'''
def pad(string, length):
@@ -254,7 +254,9 @@ class Overlay:
name = pad(self.name, 25)
mtype = ' [' + pad(self.type, 10) + ']'
- srclen = terminal_width() - 43
+ if not width:
+ width = terminal_width()
+ srclen = width - 43
source = self.src
if len(source) > srclen:
source = source.replace("overlays.gentoo.org", "o.g.o")
diff --git a/layman/version.py b/layman/version.py
index ad74cdb..a366b47 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.2'
+VERSION = '1.2.3'
if __name__ == '__main__':
print VERSION