mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-24 08:55:43 +01:00
IGN: Fix #3542 (Fix/enhance non-root develop/install)
This commit is contained in:
parent
fcceef0dd3
commit
ac3e3497a0
1 changed files with 4 additions and 0 deletions
|
|
@ -286,9 +286,13 @@ def setup_udev_rules(self):
|
|||
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':
|
||||
|
|
|
|||
Loading…
Reference in a new issue