Added set computer arch via config

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2017-10-07 22:11:05 +02:00
parent cbd151ca90
commit 30979bf5b1
4 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,7 @@
3.3.1 - 07/10/2017
Added:
- Set Slackware version via configuration file /etc/slpkg/slpkg.conf
- Set computer architecture via configuration file /etc/slpkg/slpkg.conf
3.3.0 - 01/10/2017
Fixed:

View file

@ -26,10 +26,12 @@
# Slackware release "stable" or "current".
RELEASE=stable
# Set Slackware version. It's not necessary only for some reasons.
# Default is "off".
# Set Slackware version if it's necessary. Default is "off".
SLACKWARE_VERSION=off
# Set computer architecture if it's necessary. Default is "off".
COMP_ARCH=off
# Build directory for repository "sbo" slackbuilds.org. In this
# directory downloaded sources and scripts for building.
BUILD_PATH=/tmp/slpkg/build/

View file

@ -98,6 +98,7 @@ class MetaData(object):
_conf_slpkg = {
"RELEASE": "stable",
"SLACKWARE_VERSION": "off",
"COMP_ARCH": "off",
"REPOSITORIES": ["slack", "sbo", "rlw", "alien",
"slacky", "conrad", "slonly",
"ktown{latest}", "multi", "slacke{18}",
@ -150,6 +151,7 @@ class MetaData(object):
# Set values from configuration file
slack_rel = _conf_slpkg["RELEASE"]
slackware_version = _conf_slpkg["SLACKWARE_VERSION"]
comp_arch = _conf_slpkg["COMP_ARCH"]
build_path = _conf_slpkg["BUILD_PATH"]
sbosrcarch = _conf_slpkg["SBOSRCARCH"]
sbosrcarch_link = _conf_slpkg["SBOSRCARCH_LINK"]
@ -238,7 +240,10 @@ class MetaData(object):
slackpkg_lib_path = "/var/lib/slackpkg/"
# computer architecture
arch = os.uname()[4]
if comp_arch == "off" or comp_arch == "OFF":
arch = os.uname()[4]
else:
arch = comp_arch
# get sbo OUTPUT enviroment variable
try:

View file

@ -44,6 +44,7 @@ class Config(object):
conf_args = [
"RELEASE",
"SLACKWARE_VERSION",
"COMP_ARCH",
"BUILD_PATH",
"PACKAGES",
"PATCHES",