Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.1:Update
calibre
calibre-no-update-manpage.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File calibre-no-update-manpage.diff of Package calibre
Index: src/calibre/linux.py =================================================================== --- src/calibre/linux.py.orig +++ src/calibre/linux.py @@ -306,10 +306,11 @@ class PostInstall: if isbsd: manpath = os.path.join(self.opts.staging_root, 'man/man1') else: - manpath = os.path.join(self.opts.staging_sharedir, 'man/man1') - if not os.path.exists(manpath): - os.makedirs(manpath) - self.info('Installing MAN pages...') + self.info('Directory for MAN pages: %s' % self.opts.staging_mandir) + manpath = os.path.join(self.opts.staging_mandir, 'man1') + if not os.path.exists(manpath): + os.makedirs(manpath) + self.info('Installing MAN pages to %s...' % manpath) for src in entry_points['console_scripts']: prog, right = src.split('=') prog = prog.strip() @@ -322,7 +323,7 @@ class PostInstall: if isbsd: manfile = os.path.join(manpath, prog+'.1') else: - manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2') + manfile = os.path.join(manpath, prog+'.1'+'.gz') self.info('\tInstalling MAN page for', prog) open(manfile, 'wb').write(raw) self.manifest.append(manfile) Index: src/calibre/utils/help2man.py =================================================================== --- src/calibre/utils/help2man.py.orig +++ src/calibre/utils/help2man.py @@ -3,7 +3,7 @@ __license__ = 'GPL 3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' -import time, bz2 +import time, gzip, StringIO from calibre.constants import isbsd from calibre.constants import __version__, __appname__, __author__ @@ -59,7 +59,14 @@ def create_man_page(prog, parser): x in lines] if not isbsd: - return bz2.compress((u'\n'.join(lines)).encode('utf-8')) + #return bz2.compress((u'\n'.join(lines)).encode('utf-8')) + buf = StringIO.StringIO() + f = gzip.GzipFile(mode="wb", fileobj=buf) + try: + f.write((u'\n'.join(lines)).encode('utf-8') ) + finally: + f.close() + return buf.getvalue() else: return (u'\n'.join(lines)).encode('utf-8')
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor