mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-16 03:41:11 +01:00
fix release message
This commit is contained in:
parent
1d06eb2317
commit
bf2e677d11
2 changed files with 8 additions and 8 deletions
|
@ -79,9 +79,8 @@ def select_slack_release(slack_rel):
|
||||||
defined wrong
|
defined wrong
|
||||||
'''
|
'''
|
||||||
if slack_rel not in ['stable', 'current']:
|
if slack_rel not in ['stable', 'current']:
|
||||||
print("\n You have not specified the Slackware release.\n"
|
return 'FAULT'
|
||||||
" Edit file '/etc/slpkg/slpkg.conf' and change the \n"
|
return slack_rel
|
||||||
" value of the variable RELEASE.\n")
|
|
||||||
|
|
||||||
|
|
||||||
class MetaData(object):
|
class MetaData(object):
|
||||||
|
@ -131,6 +130,7 @@ class MetaData(object):
|
||||||
'slackr', 'slonly', 'ktown', 'multi', 'slacke',
|
'slackr', 'slonly', 'ktown', 'multi', 'slacke',
|
||||||
'salix', 'slackl', 'rested']
|
'salix', 'slackl', 'rested']
|
||||||
|
|
||||||
|
# read value from configuration file
|
||||||
if os.path.isfile('%s%s' % (conf_path, 'slpkg.conf')):
|
if os.path.isfile('%s%s' % (conf_path, 'slpkg.conf')):
|
||||||
f = open('%s%s' % (conf_path, 'slpkg.conf'), 'r')
|
f = open('%s%s' % (conf_path, 'slpkg.conf'), 'r')
|
||||||
conf = f.read()
|
conf = f.read()
|
||||||
|
@ -164,7 +164,7 @@ class MetaData(object):
|
||||||
repositories = [repo.strip() for repo in repositories]
|
repositories = [repo.strip() for repo in repositories]
|
||||||
|
|
||||||
# Check Slackware release
|
# Check Slackware release
|
||||||
select_slack_release(slack_rel)
|
slack_rel = select_slack_release(slack_rel)
|
||||||
|
|
||||||
# Grap sub repositories
|
# Grap sub repositories
|
||||||
ktown_kde_repo = grab_sub_repo(repositories, 'ktown')
|
ktown_kde_repo = grab_sub_repo(repositories, 'ktown')
|
||||||
|
|
|
@ -28,8 +28,8 @@ from __metadata__ import MetaData as _m
|
||||||
|
|
||||||
def options():
|
def options():
|
||||||
arguments = [
|
arguments = [
|
||||||
"\nslpkg - version {0} | set: {1}\n".format(_m.__version__,
|
"\nslpkg - version {0} | Slackware release: {1}\n".format(
|
||||||
_m.slack_rel),
|
_m.__version__, _m.slack_rel),
|
||||||
"Slpkg is a user-friendly package manager for Slackware "
|
"Slpkg is a user-friendly package manager for Slackware "
|
||||||
"installations\n",
|
"installations\n",
|
||||||
"Commands:",
|
"Commands:",
|
||||||
|
@ -88,8 +88,8 @@ def usage(repo):
|
||||||
error_repo = ("slpkg: error: repository '{0}' does not exist"
|
error_repo = ("slpkg: error: repository '{0}' does not exist"
|
||||||
"\n".format(repo))
|
"\n".format(repo))
|
||||||
view = [
|
view = [
|
||||||
"\nslpkg - version {0} | set: {1}\n".format(_m.__version__,
|
"\nslpkg - version {0} | Slackware release: {1}\n".format(
|
||||||
_m.slack_rel),
|
_m.__version__, _m.slack_rel),
|
||||||
"Usage: slpkg Commands:",
|
"Usage: slpkg Commands:",
|
||||||
" [update] [upgrade] [repo-add [repository name] [URL]]",
|
" [update] [upgrade] [repo-add [repository name] [URL]]",
|
||||||
" [repo-remove [repository]] [repo-list]",
|
" [repo-remove [repository]] [repo-list]",
|
||||||
|
|
Loading…
Reference in a new issue