mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
added view default repositories
This commit is contained in:
parent
6e60eabfa8
commit
a962d7b345
2 changed files with 14 additions and 10 deletions
|
@ -10,6 +10,7 @@ Version 2.1.6
|
|||
- Added Slackware 'patches' repository in PACKAGES.txt file.
|
||||
- Added Alien's restricted repository.
|
||||
- Added wget option.
|
||||
- Added view default repositories in repo-list.
|
||||
|
||||
Version 2.1.5
|
||||
27-12-2014
|
||||
|
|
|
@ -60,22 +60,25 @@ class RepoList(object):
|
|||
'''
|
||||
print('')
|
||||
template(78)
|
||||
print('{0}{1}{2}{3}{4}'.format(
|
||||
'| Repo id', ' ' * 10,
|
||||
'Repo URL', ' ' * 45,
|
||||
print('{0}{1}{2}{3}{4}{5}{6}'.format(
|
||||
'| Repo id', ' ' * 2,
|
||||
'Repo URL', ' ' * 44,
|
||||
'Default', ' ' * 3,
|
||||
'Status'))
|
||||
template(78)
|
||||
for repo_id, repo_URL in sorted(self.all_repos.iteritems()):
|
||||
status, COLOR = 'disabled', color['RED']
|
||||
if repo_id not in default_repositories:
|
||||
repo_id = repo_id + ' *'
|
||||
if len(repo_URL) > 45:
|
||||
repo_URL = repo_URL[:44] + '~'
|
||||
default = 'yes'
|
||||
if len(repo_URL) > 49:
|
||||
repo_URL = repo_URL[:48] + '~'
|
||||
if repo_id in repositories:
|
||||
status, COLOR = 'enabled', color['GREEN']
|
||||
print(' {0}{1}{2}{3}{4}{5:>15}{6}'.format(
|
||||
repo_id, ' ' * (17 - len(repo_id)),
|
||||
repo_URL, ' ' * (45 - len(repo_URL)),
|
||||
if repo_id not in default_repositories:
|
||||
default = 'no'
|
||||
print(' {0}{1}{2}{3}{4}{5}{6}{7:>8}{8}'.format(
|
||||
repo_id, ' ' * (9 - len(repo_id)),
|
||||
repo_URL, ' ' * (52 - len(repo_URL)),
|
||||
default, ' ' * (8 - len(default)),
|
||||
COLOR, status, color['ENDC']))
|
||||
print("\nFor enable or disable default repositories edit "
|
||||
"'/etc/slpkg/slpkg.conf' file\n")
|
||||
|
|
Loading…
Reference in a new issue