From ac3e3497a04e35c79688e57006b8e69eed60f38e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 27 Sep 2009 22:50:16 -0600 Subject: [PATCH] IGN: Fix #3542 (Fix/enhance non-root develop/install) --- src/calibre/linux.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/linux.py b/src/calibre/linux.py index 440f6d2ff0..25d3542d42 100644 --- a/src/calibre/linux.py +++ b/src/calibre/linux.py @@ -286,9 +286,13 @@ class PostInstall: self.info('Trying to setup udev rules...') try: group_file = os.path.join(self.opts.staging_etc, 'group') + if not os.path.exists(group_file): + group_file = '/etc/group' groups = open(group_file, 'rb').read() group = 'plugdev' if 'plugdev' in groups else 'usb' old_udev = '/etc/udev/rules.d/95-calibre.rules' + if not os.path.exists(old_udev): + old_udev = os.path.join(self.opts.staging_etc, 'udev/rules.d/95-calibre.rules') if os.path.exists(old_udev): os.remove(old_udev) if self.opts.staging_root == '/usr':