aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2010-07-15 22:55:18 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2010-07-15 22:55:18 -0300
commit4dc90cf7d9e5a1103b0d9ef2be6ac9cc47885332 (patch)
tree5d330a05306b0f02f402dd8c45487654f215d875 /scripts
parentadded a security test, to check if the current user belongs to the user (diff)
downloadg-octave-4dc90cf7d9e5a1103b0d9ef2be6ac9cc47885332.tar.gz
g-octave-4dc90cf7d9e5a1103b0d9ef2be6ac9cc47885332.tar.bz2
g-octave-4dc90cf7d9e5a1103b0d9ef2be6ac9cc47885332.zip
added a test to verify if the selected package manager is currently
installed.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/g-octave6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/g-octave b/scripts/g-octave
index 458d3db..7241431 100755
--- a/scripts/g-octave
+++ b/scripts/g-octave
@@ -193,6 +193,12 @@ def main():
out.eerror('Invalid package manager: %s' % conf_prefetch.package_manager)
return os.EX_CONFIG
+ # checking if the package manager is installed
+ if not pkg_manager.is_installed():
+ log.error('Package manager not installed: %s' % conf_prefetch.package_manager)
+ out.eerror('Package manager not installed: %s' % conf_prefetch.package_manager)
+ return os.EX_CONFIG
+
# checking if the current user is allowed to run g-octave
current_user = getpass.getuser()
if current_user not in pkg_manager.allowed_users():