Linux install:calibre_postinstall now installs desktop integration even for non-root user

This commit is contained in:
Kovid Goyal 2009-02-27 09:03:51 -08:00
parent 4d44f2d8bd
commit 39e35cf677

View File

@ -455,17 +455,16 @@ def post_install():
parser = option_parser() parser = option_parser()
opts = parser.parse_args()[0] opts = parser.parse_args()[0]
if not opts.no_root and os.geteuid() != 0:
print >> sys.stderr, 'You must be root to run this command.'
sys.exit(1)
global use_destdir global use_destdir
use_destdir = opts.destdir use_destdir = opts.destdir
manifest = [] manifest = []
manifest += setup_udev_rules(opts.group_file, not opts.dont_reload, opts.fatal_errors)
manifest += setup_completion(opts.fatal_errors)
setup_desktop_integration(opts.fatal_errors) setup_desktop_integration(opts.fatal_errors)
manifest += install_man_pages(opts.fatal_errors) if opts.no_root or os.geteuid() == 0:
manifest += setup_udev_rules(opts.group_file, not opts.dont_reload, opts.fatal_errors)
manifest += setup_completion(opts.fatal_errors)
manifest += install_man_pages(opts.fatal_errors)
else:
print "Skipping udev, completion, and man-page install for non-root user."
try: try:
from PyQt4 import Qt from PyQt4 import Qt