Remove unused mount helper

Fixes #1225696 [Add patch to compile with CLANG](https://bugs.launchpad.net/calibre/+bug/1225696)
This commit is contained in:
Kovid Goyal 2013-09-15 21:58:18 +05:30
parent 53b752fb4a
commit 7d54d25844
3 changed files with 1 additions and 34 deletions

View File

@ -6,7 +6,7 @@ __license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
import sys, os, textwrap, subprocess, shutil, tempfile, atexit, shlex, glob import sys, os, textwrap, subprocess, shutil, tempfile, atexit, glob
from setup import (Command, islinux, isbsd, basenames, modules, functions, from setup import (Command, islinux, isbsd, basenames, modules, functions,
__appname__, __version__) __appname__, __version__)
@ -133,7 +133,6 @@ class Develop(Command):
self.regain_privileges() self.regain_privileges()
self.consolidate_paths() self.consolidate_paths()
self.write_templates() self.write_templates()
self.setup_mount_helper()
self.install_files() self.install_files()
self.run_postinstall() self.run_postinstall()
self.install_env_module() self.install_env_module()
@ -150,23 +149,6 @@ class Develop(Command):
else: else:
self.warn('Cannot install calibre environment module to: '+libdir) self.warn('Cannot install calibre environment module to: '+libdir)
def setup_mount_helper(self):
def warn():
self.warn('Failed to compile mount helper. Auto mounting of',
' devices will not work')
src = os.path.join(self.SRC, 'calibre', 'devices', 'linux_mount_helper.c')
dest = os.path.join(self.staging_bindir, 'calibre-mount-helper')
self.info('Installing mount helper to '+ dest)
cflags = os.environ.get('OVERRIDE_CFLAGS', '-Wall -pedantic')
cflags = shlex.split(cflags)
p = subprocess.Popen(['gcc']+cflags+[src, '-o', dest])
ret = p.wait()
if ret != 0:
return warn()
self.manifest.append(dest)
return dest
def install_files(self): def install_files(self):
pass pass

View File

@ -86,7 +86,6 @@ class LinuxFreeze(Command):
self.initbase() self.initbase()
self.copy_libs() self.copy_libs()
self.copy_python() self.copy_python()
self.compile_mount_helper()
self.build_launchers() self.build_launchers()
self.create_tarfile() self.create_tarfile()
@ -144,13 +143,6 @@ class LinuxFreeze(Command):
else: else:
shutil.copyfile(x, d) shutil.copyfile(x, d)
def compile_mount_helper(self):
self.info('Compiling mount helper...')
dest = self.j(self.bin_dir, 'calibre-mount-helper')
subprocess.check_call(['gcc', '-Wall', '-pedantic',
self.j(self.SRC, 'calibre', 'devices',
'linux_mount_helper.c'), '-o', dest])
def copy_python(self): def copy_python(self):
self.info('Copying python...') self.info('Copying python...')

View File

@ -1,7 +0,0 @@
#include <stdlib.h>
int main(int argc, char** argv)
{
return EXIT_FAILURE;
}