[game-data-packager] 02/02: Remove some more unnecessary abbreviations
Simon McVittie
smcv at debian.org
Mon Mar 20 07:07:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 37e473d1c364e1adc1c0dbe0c6ba7281d357a3b5
Author: Simon McVittie <smcv at debian.org>
Date: Sun Mar 19 13:17:07 2017 +0000
Remove some more unnecessary abbreviations
---
game_data_packager/build.py | 14 +++++++-------
game_data_packager/packaging/arch.py | 4 ++--
game_data_packager/steam.py | 18 +++++++++---------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 1ccf35a..8e11a76 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1547,11 +1547,11 @@ class PackagingTask(object):
self.verbose = getattr(args, 'verbose', False)
if self.packaging.__class__ is self.builder_packaging.__class__:
- preserve_pkgs = (getattr(args, 'destination', None) is not None)
- install_pkgs = getattr(args, 'install', True)
+ preserve = (getattr(args, 'destination', None) is not None)
+ install = getattr(args, 'install', True)
else:
- preserve_pkgs = True
- install_pkgs = False
+ preserve = True
+ install = False
if args.destination is None:
raise SystemExit('Must specify a destination when '
'building packages for a different packaging '
@@ -1567,7 +1567,7 @@ class PackagingTask(object):
if getattr(args, 'compress', None) is None:
# default to not compressing if we aren't going to install it
# anyway
- args.compress = preserve_pkgs
+ args.compress = preserve
self.save_downloads = args.save_downloads
@@ -1652,11 +1652,11 @@ class PackagingTask(object):
rm_rf(os.path.join(self.get_workdir(), 'tmp'))
- if preserve_pkgs:
+ if preserve:
for deb in debs:
print('generated "%s"' % os.path.abspath(deb))
- if install_pkgs:
+ if install:
self.packaging.install_packages(debs, method=args.install_method,
gain_root=args.gain_root_command)
diff --git a/game_data_packager/packaging/arch.py b/game_data_packager/packaging/arch.py
index 128f90c..9e6f50b 100644
--- a/game_data_packager/packaging/arch.py
+++ b/game_data_packager/packaging/arch.py
@@ -98,8 +98,8 @@ class ArchPackaging(PackagingSystem):
except subprocess.CalledProcessError:
return None
- def install_packages(self, pkgs, method=None, gain_root='su'):
- run_as_root(['pacman', '-U'] + list(pkgs), gain_root)
+ def install_packages(self, packages, method=None, gain_root='su'):
+ run_as_root(['pacman', '-U'] + list(packages), gain_root)
def format_relation(self, pr):
assert not pr.contextual
diff --git a/game_data_packager/steam.py b/game_data_packager/steam.py
index be50e01..5a3b96a 100644
--- a/game_data_packager/steam.py
+++ b/game_data_packager/steam.py
@@ -180,14 +180,14 @@ def run_steam_meta_mode(args, games):
logger.info('Please specify --all or --new to create desired packages.')
return
- preserve_pkgs = (getattr(args, 'destination', None) is not None)
- install_pkgs = getattr(args, 'install', True)
+ preserve = (getattr(args, 'destination', None) is not None)
+ install = getattr(args, 'install', True)
if getattr(args, 'compress', None) is None:
# default to not compressing if we aren't going to install it
# anyway
- args.compress = preserve_pkgs
+ args.compress = preserve
- all_pkgs = set()
+ all_packages = set()
for shortname in sorted(found_games):
task = tasks[shortname]
@@ -230,18 +230,18 @@ def run_steam_meta_mode(args, games):
destination=destination)
rm_rf(os.path.join(task.get_workdir(), 'tmp'))
- if preserve_pkgs:
+ if preserve:
for deb in debs:
print('generated "%s"' % os.path.abspath(deb))
- all_pkgs = all_pkgs.union(debs)
+ all_packages = all_packages.union(debs)
- if not all_pkgs:
+ if not all_packages:
logger.error('Unable to package any game.')
if workdir:
rm_rf(workdir)
raise SystemExit(1)
- if install_pkgs:
- packaging.install_packages(all_pkgs, args.install_method, args.gain_root_command)
+ if install:
+ packaging.install_packages(all_packages, args.install_method, args.gain_root_command)
if workdir:
rm_rf(workdir)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list