Skip to content

Commit

Permalink
custom pacman command in ini-file
Browse files Browse the repository at this point in the history
  • Loading branch information
L0ric0 committed Jul 31, 2018
1 parent f8a62d9 commit 4d9c5b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions pkgbuilder/data/pkgbuilder.ini.skel
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ verbosepkglists=true
; overrides -S, useful if /tmp is small
; (default: empty/unused)
chdir=
paccommand=pacman
12 changes: 7 additions & 5 deletions pkgbuilder/pbds.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ class PBDS(object):
console = None
_pyc = None

if os.getenv('PACMAN') is None:
paccommand = 'pacman'
else:
paccommand = os.getenv('PACMAN')

hassudo = os.path.exists('/usr/bin/sudo')

uid = os.geteuid()
Expand Down Expand Up @@ -100,6 +95,11 @@ class PBDS(object):
'pkgbuilder', 'data/pkgbuilder.ini.skel').decode('utf-8'))
config.read([confpath], encoding='utf-8')

if os.getenv('PACMAN') is None:
paccommand = config.get('extras', 'paccommand', fallback='pacman')
else:
paccommand = os.getenv('PACMAN')

# Language changing
language = config.get('PKGBUILDer', 'language')
if language != 'auto':
Expand All @@ -115,6 +115,8 @@ class PBDS(object):
log = logging.getLogger('pkgbuilder')
log.info('*** PKGBUILDer v' + __version__)



def get_setting(self, name, config_section, config_option,
positive, negative):
"""Get the value of a setting, based on config file and arguments.
Expand Down

0 comments on commit 4d9c5b8

Please sign in to comment.