added config option

This commit is contained in:
Dimitris Zlatanidis 2015-06-03 17:56:44 +03:00
parent 540f04340d
commit a46cdc0b50
5 changed files with 24 additions and 3 deletions

View file

@ -1,3 +1,12 @@
Version 2.4.1
03-06-2015
[Feature] - Added option to upgrade only the distribution packages installed.
[Updated] - Fixed upgrade packages.
- Fixed checksum on/off.
Version 2.4.0
02-06-2015

View file

@ -81,3 +81,8 @@ WGET_OPTIONS=-c -N
# Automatically synchronizes the command 'slackpkg update' with
# 'slpkg -c slack --upgrade'.
SLACKPKG_LOG=on
# This option applies only to the distribution upgrade and repository
# slack. If you want to update only packages that are installed
# choose 'on'. Default is 'off'.
ONLY_INSTALLED=off

View file

@ -125,7 +125,8 @@ class MetaData(object):
'DEL_DEPS': 'off',
'USE_COLORS': 'on',
'WGET_OPTIONS': '-c -N',
'SLACKPKG_LOG': 'on'
'SLACKPKG_LOG': 'on',
'ONLY_INSTALLED': 'off'
}
default_repositories = ['slack', 'sbo', 'rlw', 'alien', 'slacky', 'studio',
@ -162,6 +163,7 @@ class MetaData(object):
use_colors = _conf_slpkg['USE_COLORS']
wget_options = _conf_slpkg['WGET_OPTIONS']
slackpkg_log = _conf_slpkg['SLACKPKG_LOG']
only_installed = _conf_slpkg['ONLY_INSTALLED']
# Remove any gaps
repositories = [repo.strip() for repo in repositories]

View file

@ -54,7 +54,8 @@ class Config(object):
'DEL_DEPS',
'USE_COLORS',
'WGET_OPTIONS',
'SLACKPKG_LOG'
'SLACKPKG_LOG',
'ONLY_INSTALLED'
]
read_conf = Utils().read_file(self.config_file)
for line in read_conf.splitlines():

View file

@ -193,7 +193,11 @@ class ArgParse(object):
BinaryInstall(pkg_upgrade(self.args[1], skip),
self.args[1]).start(True)
elif self.args[1] == 'slack':
Patches(skip).start()
if _m.only_installed in ['on', 'ON']:
BinaryInstall(pkg_upgrade('slack', skip),
'slack').start(True)
else:
Patches(skip).start()
elif self.args[1] == 'sbo':
SBoInstall(sbo_upgrade(skip)).start(True)
else: