Skip to content

Commit

Permalink
Merge pull request #57 from L0ric0/master
Browse files Browse the repository at this point in the history
paccommand option in ini-file
  • Loading branch information
Kwpolska authored Jul 31, 2018
2 parents f8a62d9 + 0040ab7 commit c2843eb
Show file tree
Hide file tree
Showing 2 changed files with 6 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
10 changes: 5 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 Down

0 comments on commit c2843eb

Please sign in to comment.