[PC-BSD Commits] r7578 - pcbsd/current/src-qt4/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Thu Sep 16 12:34:41 PDT 2010


Author: kris
Date: 2010-09-16 12:34:41 -0700 (Thu, 16 Sep 2010)
New Revision: 7578

Modified:
   pcbsd/current/src-qt4/pbi-manager/pbi-manager
Log:

Fix up the root detection a bit, let regular users run pbi_info / pbi_crashhandler



Modified: pcbsd/current/src-qt4/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-qt4/pbi-manager/pbi-manager	2010-09-16 19:25:16 UTC (rev 7577)
+++ pcbsd/current/src-qt4/pbi-manager/pbi-manager	2010-09-16 19:34:41 UTC (rev 7578)
@@ -919,20 +919,18 @@
 
 # Star the make patch process
 pbi_makepatch_init() {
+  	require_root
 	parse_makepatch_pbi_cmdline "$@"
 
-  	require_root
-
 	# Create a new patch file from the two PBIs specified
 	make_pbi_patchfile "${PBI_FILENAME}" "${PBI_OLDFILENAME}" "${PBI_PATCHOUTDIR}"
 }
 
 # Start the patch process
 pbi_patch_init() {
+  	require_root
 	parse_patch_pbi_cmdline "$@"
 
-  	require_root
-
 	# Check if we are only displaying information
 	check_pbi_info_display
 	check_pbi_gui_display
@@ -1166,7 +1164,6 @@
 pbi_add_init() {
 	parse_add_pbi_cmdline "$@"
 
-  	require_root
 
 	# Check if we are only displaying information
 	check_pbi_info_display
@@ -1179,6 +1176,8 @@
 		exit_trap
 	fi
 
+  	require_root
+
 	check_agree_lic
 	check_existing_pbi
 	do_pbi_add
@@ -1700,6 +1699,8 @@
 # Starting pbi_create
 pbi_create_init() {
 
+	require_root
+
 	parse_create_pbi_cmdline "$@"
 
 	load_pbi_conffile
@@ -2333,9 +2334,9 @@
 }
 
 pbi_delete_init() {
+  	require_root
 	init_tmpdir
 	parse_delete_pbi_cmdline "$@"
-  	require_root
 	do_pbi_delete
 }
 
@@ -2654,10 +2655,11 @@
 
 # Start pbi_update processing
 pbi_update_init() {
-  	parse_update_pbi_cmdline "$@"
- 
+
   	require_root
 
+  	parse_update_pbi_cmdline "$@"
+
 	start_update_checks
 
 	do_pbi_update
@@ -2953,9 +2955,10 @@
 # start processing autobuild
 pbi_autob_init() {
 
+        require_root
+
         parse_autob_pbi_cmdline "$@"
 
-        require_root
 
         do_pbi_autob
 }
@@ -3492,9 +3495,10 @@
 # start processing for make port / pbi compile
 pbi_make_init() {
 
+  	require_root
+
   	parse_make_pbi_cmdline "$@"
  
-  	require_root
 
   	do_pbi_make
 }
@@ -3712,7 +3716,6 @@
 # Main program operation
 ##############################################################
 init_vars
-require_root
 mk_required_dirs
 load_pbi_etcconf
 



More information about the Commits mailing list