diff options
author | wiz <wiz@pkgsrc.org> | 2008-12-06 18:40:33 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2008-12-06 18:40:33 +0000 |
commit | 090706619cd54da05182d1174aebced221bd61c6 (patch) | |
tree | c55525c56813f46710187229274d208ccb08c005 /graphics/comix | |
parent | b02bc7294ed3140143879e4310619a4f61d3aaac (diff) | |
download | pkgsrc-090706619cd54da05182d1174aebced221bd61c6.tar.gz |
Update to 4.0.0:
Comix 4.0.0
- Comix has been completely rewritten from scratch. On the surface things
look quite a bit like they used to, but the internal workings are
entirely new. There are too many changes for them all to be mentioned
here, but a couple of highlights are a much more functional library and a
new archive editing dialog. The work on this new version of Comix has
been going on in rather sporadic phases for almost two years, and during
that time I have received help from lots of different people. Now, I must
admit, I can no longer remember them all. So instead of trying to list as
many as I can here, I will instead simply say thank you to everyone who
have contributed fixes, patches, suggestions or encouraging words. Thanks!
Diffstat (limited to 'graphics/comix')
-rw-r--r-- | graphics/comix/Makefile | 13 | ||||
-rw-r--r-- | graphics/comix/PLIST | 175 | ||||
-rw-r--r-- | graphics/comix/distinfo | 10 | ||||
-rw-r--r-- | graphics/comix/patches/patch-aa | 117 | ||||
-rw-r--r-- | graphics/comix/patches/patch-ab | 182 |
5 files changed, 137 insertions, 360 deletions
diff --git a/graphics/comix/Makefile b/graphics/comix/Makefile index fd52f57a14f..1e1ca4b5e3f 100644 --- a/graphics/comix/Makefile +++ b/graphics/comix/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.12 2008/08/10 16:05:28 joerg Exp $ +# $NetBSD: Makefile,v 1.13 2008/12/06 18:40:33 wiz Exp $ # -DISTNAME= comix-3.6.4 -PKGREVISION= 2 +DISTNAME= comix-4.0.0 CATEGORIES= graphics python MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=comix/} @@ -23,17 +22,19 @@ SUBST_MESSAGE.install-path= Fixing man page installation path. SUBST_FILES.install-path= install.py SUBST_SED.install-path= -e "s,share/man/man,${PKGMANDIR}/man,g" -PYTHON_PATCH_SCRIPTS= comix mime/comicthumb +PYTHON_PATCH_SCRIPTS= src/comix.py mime/comicthumb do-build: do-install: - cd ${WRKSRC} && ${PYTHONBIN} install.py install --installdir ${DESTDIR}${PREFIX} + cd ${WRKSRC} && ${PYTHONBIN} install.py install --dir ${DESTDIR}${PREFIX} -.include "../../databases/shared-mime-info/buildlink3.mk" +.include "../../databases/shared-mime-info/mimedb.mk" .include "../../devel/GConf/buildlink3.mk" .include "../../graphics/hicolor-icon-theme/buildlink3.mk" +BUILDLINK_API_DEPENDS.pyimaging+= ${PYPKGPREFIX}-imaging>=1.1.5 .include "../../graphics/py-imaging/buildlink3.mk" .include "../../lang/python/application.mk" +BUILDLINK_API_DEPENDS.pygtk2+= ${PYPKGPREFIX}-gtk2>=2.12 .include "../../x11/py-gtk2/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/graphics/comix/PLIST b/graphics/comix/PLIST index 75cb5631434..29ed8dbf7cb 100644 --- a/graphics/comix/PLIST +++ b/graphics/comix/PLIST @@ -1,60 +1,137 @@ -@comment $NetBSD: PLIST,v 1.7 2007/06/01 00:45:49 wiz Exp $ +@comment $NetBSD: PLIST,v 1.8 2008/12/06 18:40:33 wiz Exp $ bin/comicthumb bin/comix man/man1/comicthumb.1 man/man1/comix.1 share/applications/comix.desktop +share/comix/images/16x16/comix.png +share/comix/images/comix.svg +share/comix/images/comments.png +share/comix/images/double-page.png +share/comix/images/fitbest.png +share/comix/images/fitheight.png +share/comix/images/fitmanual.png +share/comix/images/fitwidth.png +share/comix/images/gimp-flip-horizontal.png +share/comix/images/gimp-flip-vertical.png +share/comix/images/gimp-rotate-180.png +share/comix/images/gimp-rotate-270.png +share/comix/images/gimp-rotate-90.png +share/comix/images/gimp-thumbnails.png +share/comix/images/gimp-transform.png +share/comix/images/lens.png +share/comix/images/library.png +share/comix/images/manga.png +share/comix/images/tango-add-bookmark.png +share/comix/images/tango-archive.png +share/comix/images/tango-enhance-image.png +share/comix/images/tango-image.png +share/comix/images/zoom.png +share/comix/src/about.py +share/comix/src/about.pyc +share/comix/src/archive.py +share/comix/src/archive.pyc +share/comix/src/bookmark.py +share/comix/src/bookmark.pyc +share/comix/src/comix.py +share/comix/src/comment.py +share/comix/src/comment.pyc +share/comix/src/constants.py +share/comix/src/constants.pyc +share/comix/src/cursor.py +share/comix/src/cursor.pyc +share/comix/src/deprecated.py +share/comix/src/deprecated.pyc +share/comix/src/edit.py +share/comix/src/edit.pyc +share/comix/src/encoding.py +share/comix/src/encoding.pyc +share/comix/src/enhance.py +share/comix/src/enhance.pyc +share/comix/src/event.py +share/comix/src/event.pyc +share/comix/src/filechooser.py +share/comix/src/filechooser.pyc +share/comix/src/filehandler.py +share/comix/src/filehandler.pyc +share/comix/src/histogram.py +share/comix/src/histogram.pyc +share/comix/src/icons.py +share/comix/src/icons.pyc +share/comix/src/image.py +share/comix/src/image.pyc +share/comix/src/labels.py +share/comix/src/labels.pyc +share/comix/src/lens.py +share/comix/src/lens.pyc +share/comix/src/library.py +share/comix/src/library.pyc +share/comix/src/librarybackend.py +share/comix/src/librarybackend.pyc +share/comix/src/main.py +share/comix/src/main.pyc +share/comix/src/preferences.py +share/comix/src/preferences.pyc +share/comix/src/process.py +share/comix/src/process.pyc +share/comix/src/properties.py +share/comix/src/properties.pyc +share/comix/src/recent.py +share/comix/src/recent.pyc +share/comix/src/slideshow.py +share/comix/src/slideshow.pyc +share/comix/src/status.py +share/comix/src/status.pyc +share/comix/src/thumbbar.py +share/comix/src/thumbbar.pyc +share/comix/src/thumbnail.py +share/comix/src/thumbnail.pyc +share/comix/src/thumbremover.py +share/comix/src/thumbremover.pyc +share/comix/src/ui.py +share/comix/src/ui.pyc +share/icons/hicolor/16x16/apps/comix.png +share/icons/hicolor/16x16/mimetypes/application-x-cbr.png +share/icons/hicolor/16x16/mimetypes/application-x-cbt.png +share/icons/hicolor/16x16/mimetypes/application-x-cbz.png +share/icons/hicolor/22x22/apps/comix.png +share/icons/hicolor/22x22/mimetypes/application-x-cbr.png +share/icons/hicolor/22x22/mimetypes/application-x-cbt.png +share/icons/hicolor/22x22/mimetypes/application-x-cbz.png +share/icons/hicolor/24x24/apps/comix.png +share/icons/hicolor/24x24/mimetypes/application-x-cbr.png +share/icons/hicolor/24x24/mimetypes/application-x-cbt.png +share/icons/hicolor/24x24/mimetypes/application-x-cbz.png +share/icons/hicolor/32x32/apps/comix.png +share/icons/hicolor/32x32/mimetypes/application-x-cbr.png +share/icons/hicolor/32x32/mimetypes/application-x-cbt.png +share/icons/hicolor/32x32/mimetypes/application-x-cbz.png share/icons/hicolor/48x48/apps/comix.png +share/icons/hicolor/48x48/mimetypes/application-x-cbr.png +share/icons/hicolor/48x48/mimetypes/application-x-cbt.png +share/icons/hicolor/48x48/mimetypes/application-x-cbz.png share/icons/hicolor/scalable/apps/comix.svg -share/locale/ca/LC_MESSAGES/comix.mo -share/locale/de/LC_MESSAGES/comix.mo -share/locale/el/LC_MESSAGES/comix.mo +share/locale/cs/LC_MESSAGES/comix.mo share/locale/es/LC_MESSAGES/comix.mo -share/locale/fr/LC_MESSAGES/comix.mo -share/locale/hr/LC_MESSAGES/comix.mo -share/locale/hu/LC_MESSAGES/comix.mo -share/locale/it/LC_MESSAGES/comix.mo +share/locale/id/LC_MESSAGES/comix.mo share/locale/ja/LC_MESSAGES/comix.mo -share/locale/nl/LC_MESSAGES/comix.mo -share/locale/pl/LC_MESSAGES/comix.mo -share/locale/pt_BR/LC_MESSAGES/comix.mo -share/locale/ru/LC_MESSAGES/comix.mo +share/locale/ko/LC_MESSAGES/comix.mo share/locale/sv/LC_MESSAGES/comix.mo -share/locale/zh_CN/LC_MESSAGES/comix.mo -share/locale/zh_TW/LC_MESSAGES/comix.mo share/mime/packages/comix.xml -share/pixmaps/comix.png -share/pixmaps/comix/cbr.png -share/pixmaps/comix/cbt.png -share/pixmaps/comix/cbz.png -share/pixmaps/comix/double-page.png -share/pixmaps/comix/fitheight.png -share/pixmaps/comix/fitnone.png -share/pixmaps/comix/fitscreen.png -share/pixmaps/comix/fitwidth.png -share/pixmaps/comix/flip-horizontal-jpeg.png -share/pixmaps/comix/flip-horizontal.png -share/pixmaps/comix/flip-vertical-jpeg.png -share/pixmaps/comix/flip-vertical.png -share/pixmaps/comix/lens.png -share/pixmaps/comix/manga.png -share/pixmaps/comix/rotate-180.png -share/pixmaps/comix/rotate-270-jpeg.png -share/pixmaps/comix/rotate-270.png -share/pixmaps/comix/rotate-90-jpeg.png -share/pixmaps/comix/rotate-90.png -share/pixmaps/comix/silk-bookmarks.png -share/pixmaps/comix/silk-colour-adjust.png -share/pixmaps/comix/silk-desaturate.png -share/pixmaps/comix/silk-edit-bookmarks.png -share/pixmaps/comix/silk-file-operations.png -share/pixmaps/comix/silk-library-add.png -share/pixmaps/comix/silk-library.png -share/pixmaps/comix/silk-recent-files.png -share/pixmaps/comix/silk-slideshow.png -share/pixmaps/comix/silk-thumbnails.png -share/pixmaps/comix/silk-toolbars.png -share/pixmaps/comix/silk-transform.png -share/pixmaps/comix/silk-view.png -share/pixmaps/comix/silk-zoom.png -@dirrm share/pixmaps/comix +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/scalable/apps +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/48x48/mimetypes +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/48x48/apps +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/32x32/mimetypes +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/32x32/apps +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/24x24/mimetypes +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/24x24/apps +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/22x22/mimetypes +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/22x22/apps +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/16x16/mimetypes +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/16x16/apps +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor +@dirrm share/comix/src +@dirrm share/comix/images/16x16 +@dirrm share/comix/images +@dirrm share/comix +@comment in xdg-dirs: @dirrm share/applications diff --git a/graphics/comix/distinfo b/graphics/comix/distinfo index 3798910e110..3a5ce06468f 100644 --- a/graphics/comix/distinfo +++ b/graphics/comix/distinfo @@ -1,7 +1,5 @@ -$NetBSD: distinfo,v 1.10 2008/04/19 14:28:46 tonnerre Exp $ +$NetBSD: distinfo,v 1.11 2008/12/06 18:40:33 wiz Exp $ -SHA1 (comix-3.6.4.tar.gz) = c14a1ba9d931436eb7215f8065f1bbda22f00409 -RMD160 (comix-3.6.4.tar.gz) = 8cd0f6459f56efb35cea7b7a899e4420796535d7 -Size (comix-3.6.4.tar.gz) = 398202 bytes -SHA1 (patch-aa) = 2bb137273d14134c5c040ae7fd6b83d665cbaeb8 -SHA1 (patch-ab) = 4445829d4c9f20ca783adc26089ab042488288bf +SHA1 (comix-4.0.0.tar.gz) = 554513f8ac04d862b84ff66e5483101f999a2733 +RMD160 (comix-4.0.0.tar.gz) = 98d1af837f0e734c68456620b02ec703084d78b3 +Size (comix-4.0.0.tar.gz) = 338650 bytes diff --git a/graphics/comix/patches/patch-aa b/graphics/comix/patches/patch-aa deleted file mode 100644 index 51c3327acba..00000000000 --- a/graphics/comix/patches/patch-aa +++ /dev/null @@ -1,117 +0,0 @@ -$NetBSD: patch-aa,v 1.1 2008/04/19 14:28:46 tonnerre Exp $ - -Fix insecure temporary file handling in comicthumb utility. -Eliminate insufficient escaping on shell calls for rar archives/jpegtran. - ---- mime/comicthumb.orig -+++ mime/comicthumb -@@ -22,6 +22,10 @@ - import StringIO - import re - import shutil -+ -+import subprocess -+import tempfile -+ - try: - import Image - except: -@@ -48,9 +52,13 @@ - sys.exit(1) - - # temp directory needed for multiple archives --if not os.path.exists('/tmp/comicthumb/'): -- os.makedirs('/tmp/comicthumb/') -- os.chmod('/tmp/comicthumb/', 0700) -+#if not os.path.exists('/tmp/comicthumb/'): -+# os.makedirs('/tmp/comicthumb/') -+# os.chmod('/tmp/comicthumb/', 0700) -+_tmp_dir = tempfile.mkdtemp(prefix='comixthumb', suffix=os.sep, -+ dir = '/tmp') -+_tmp_dir += "/" -+ - - # return the first image in the list - def first_image (filelist): -@@ -101,10 +109,10 @@ - else: - subarchive = first_archive(zipfiles) - if subarchive: -- output = open("/tmp/comicthumb/archive%d" % (depth), "wb") -+ output = open( _tmp_dir + "archive%d" % (depth), "wb") - output.write(zip.read(subarchive)) - output.close() -- return get_image("/tmp/comicthumb/archive%d" % (depth), -+ return get_image( _tmp_dir + "archive%d" % (depth), - depth + 1) - elif tarfile.is_tarfile(compressed_file): - TYPE = TYPE or 'cbt' -@@ -119,10 +127,10 @@ - else: - subarchive = first_archive(tarfiles) - if subarchive: -- output = open("/tmp/comicthumb/archive%d" % (depth), "wb") -+ output = open( _tmp_dir + "archive%d" % (depth), "wb") - output.write(tar.extractfile(subarchive).read()) - output.close() -- return get_image("/tmp/comicthumb/archive%d" % (depth), -+ return get_image( _tmp_dir + "archive%d" % (depth), - depth + 1) - elif open(compressed_file, 'rb').read(4) == 'Rar!': - TYPE = TYPE or 'cbr' -@@ -138,20 +146,36 @@ - if not rar: - print "You must install unrar or rar to thumbnail RAR archives." - sys.exit(1) -- rarfiles = os.popen('%s vb "%s"' % (rar, compressed_file)).readlines() -+ #rarfiles = os.popen('%s vb "%s"' % (rar, compressed_file)).readlines() -+ rarfiles = subprocess.Popen([rar, 'vb', compressed_file], -+ stdout=subprocess.PIPE).communicate()[0].splitlines() - for i in range(len(rarfiles)): - rarfiles[i] = rarfiles[i].rstrip("\n") - rarfiles.sort() - cover = guessCover(rarfiles) - if cover: -- picture = StringIO.StringIO(os.popen('%s p -inul -- "%s" "%s"' -- % (rar, compressed_file, cover), "r").read()) -+ #picture = StringIO.StringIO(os.popen('%s p -inul -- "%s" "%s"' -+ #% (rar, compressed_file, cover), "r").read()) -+ picture = StringIO.StringIO(subprocess.Popen( -+ [rar, 'p', '-inul', '--', compressed_file, cover], -+ stdout=subprocess.PIPE).stdout.read()) - else: - subarchive = first_archive(rarfiles) - if subarchive: -- os.popen('%s p -inul -- "%s" "%s" > "/tmp/comicthumb/archive%d"' -- % (rar, compressed_file, subarchive, depth), "r") -- return get_image("/tmp/comicthumb/archive%d" % (depth), -+ #os.popen('%s p -inul -- "%s" "%s" > "/tmp/comicthumb/archive%d"' -+ #% (rar, compressed_file, subarchive, depth), "r") -+ filen = _tmp_dir + "archive%d"%(depth) -+ try: -+ os.remove(filen) -+ except: -+ pass -+ fp = open(filen, 'w') -+ fdp = fp.fileno() -+ subprocess.Popen( -+ [rar, 'p', '-inul', '--', compressed_file, subarchive], -+ stdout = fdp).wait() -+ fp.close() -+ return get_image( _tmp_dir + "archive%d" % (depth), - depth + 1) - return picture - -@@ -207,8 +231,8 @@ - exit_flag = 1 - - # remove tempory stuff --if os.path.isdir('/tmp/comicthumb/'): -- shutil.rmtree('/tmp/comicthumb/') -+if os.path.isdir(_tmp_dir): -+ shutil.rmtree(_tmp_dir) - - # and exit - sys.exit(exit_flag) -only in patch2: -unchanged: diff --git a/graphics/comix/patches/patch-ab b/graphics/comix/patches/patch-ab deleted file mode 100644 index bcccfe8bd9e..00000000000 --- a/graphics/comix/patches/patch-ab +++ /dev/null @@ -1,182 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2008/04/19 14:28:46 tonnerre Exp $ - -Fix insecure temporary file handling in comic utility. -Eliminate insufficient escaping on shell calls for rar archives/jpegtran. - ---- comix.orig -+++ comix -@@ -44,6 +44,11 @@ - import pwd - import cPickle - -+import subprocess -+import string -+ -+import tempfile -+ - try: - import pygtk - pygtk.require('2.0') -@@ -254,6 +259,8 @@ - window_height = 0 - colour_adjust_signal_kill = False - colour_adjust_dialog_displayed = False -+ -+ _tmp_dir = None - - def close_application(self, widget, event=None): - -@@ -267,8 +274,8 @@ - self.prefs['page of last file'] = self.file_number - if os.path.exists(self.base_dir): - shutil.rmtree(self.base_dir) -- if len(os.listdir('/tmp/comix')) == 0: -- shutil.rmtree('/tmp/comix') -+ if len(os.listdir(self._tmp_dir)) == 0: -+ shutil.rmtree(self._tmp_dir) - self.exit = True - - # ======================================================= -@@ -366,9 +373,9 @@ - # ======================================================= - if os.path.exists(self.base_dir): - shutil.rmtree(self.base_dir) -- if os.path.isdir('/tmp/comix'): -- if len(os.listdir('/tmp/comix')) == 0: -- shutil.rmtree('/tmp/comix') -+ if os.path.isdir(self._tmp_dir): -+ if len(os.listdir(self._tmp_dir)) == 0: -+ shutil.rmtree(self._tmp_dir) - - - # ======================================================= -@@ -6277,9 +6284,12 @@ - archive = tarfile.open(path, 'r') - files = archive.getnames() - elif type == 'rar': -+ #files = \ -+ #os.popen(self.rar + ' vb "' + path + -+ #'"').readlines() - files = \ -- os.popen(self.rar + ' vb "' + path + -- '"').readlines() -+ subprocess.Popen([self.rar, 'vb', path], -+ stdout=subprocess.PIPE).communicate()[0].splitlines() - files = [file.rstrip('\n') for file in files] - cover = None - files.sort() -@@ -6302,9 +6312,20 @@ - break - if cover != None: - if type == 'rar': -- os.popen(self.rar + ' p -inul -- "' + path + '" "' + -- cover + '" > "' + thumb_dir + -- '/temp" 2>/dev/null', "r").close() -+ #os.popen(self.rar + ' p -inul -- "' + path + '" "' + -+ #cover + '" > "' + thumb_dir + -+ #'/temp" 2>/dev/null', "r").close() -+ filen = thumb_dir + '/temp' -+ try: -+ os.remove(filen) -+ except: -+ pass -+ fp = open(filen, 'w') -+ fdp = fp.fileno() -+ p = subprocess.Popen( -+ [self.rar, 'p', '-inul', '--', path, -+ cover ], stdout = fdp).wait() -+ fp.close() - image = Image.open(thumb_dir + '/temp') - os.remove(thumb_dir + '/temp') - elif type == 'zip': -@@ -8010,7 +8031,7 @@ - return False - - # We don't want to open files from our selves. -- if selection.data.startswith('file:///tmp/comix/'): -+ if selection.data.startswith('file://' + self._tmp_dir): - return - - uri = selection.data.strip() -@@ -8733,8 +8754,10 @@ - # ======================================================= - elif archive_type == 'rar': - if self.rar: -- os.popen( -- self.rar + ' x "' + src_path + '" "' + dst_path + '"') -+ #os.popen( -+ #self.rar + ' x "' + src_path + '" "' + dst_path + '"') -+ subprocess.Popen( -+ [self.rar, 'x', src_path, dst_path],stdout=sys.stdout).wait() - else: - self.statusbar.push(0, - _('Could not find the unrar executable. Please install it if you wish to open RAR archives.')) -@@ -9168,9 +9191,37 @@ - self.are_you_sure_dialog.hide() - if response != -5: - return -- os.popen(self.jpegtran + ' -copy all -trim ' + operation + -- ' -outfile "' + self.file[self.file_number] + '" "' + -- self.file[self.file_number] + '"') -+ #os.popen(self.jpegtran + ' -copy all -trim ' + operation + -+ #' -outfile "' + self.file[self.file_number] + '" "' + -+ #self.file[self.file_number] + '"') -+ op = operation.split() -+ op_len = len(op) -+ -+ i=1 -+ filen = self.file[self.file_number] -+ while (1): -+ tmp_file = filen + '.tmp' + 'z' * i -+ if os.path.exists(tmp_file): -+ i += 1 -+ else: -+ break -+ -+ # Ugly hack :( -+ if op_len == 2: -+ p = subprocess.Popen( -+ [self.jpegtran, '-copy', 'all', '-trim', op[0], op[1], -+ '-outfile', tmp_file, filen], -+ stdin=sys.stdin, stdout=sys.stdout) -+ else: -+ p = subprocess.Popen( -+ [self.jpegtran, '-copy', 'all', '-trim', op[0], -+ '-outfile', tmp_file, filen], -+ stdin=sys.stdin, stdout=sys.stdout) -+ p.wait() -+ if p.returncode == 0: -+ shutil.copymode(filen, tmp_file) -+ shutil.copy(tmp_file, filen) -+ os.remove(tmp_file) - try: - uri = 'file://' + urllib.pathname2url(self.file[self.file_number]) - thumb_path = md5.new() -@@ -10496,15 +10547,20 @@ - # The dir is /tmp/comix/<num> where <num> is 1 or higher - # depending on the number of Comix sessions opened. - # ======================================================= -- if not os.path.exists('/tmp/comix/'): -- os.makedirs('/tmp/comix/') -- os.chmod('/tmp/comix/', 0700) -+ #if not os.path.exists('/tmp/comix/'): -+ # os.makedirs('/tmp/comix/') -+ # os.chmod('/tmp/comix/', 0700) -+ -+ self._tmp_dir = tempfile.mkdtemp(prefix='comix.', suffix=os.sep, -+ dir = '/tmp') -+ self._tmp_dir += "/" -+ - dir_number = 1 - while 1: -- if not os.path.exists('/tmp/comix/' + str(dir_number)): -- os.mkdir('/tmp/comix/' + str(dir_number)) -- os.chmod('/tmp/comix/' + str(dir_number), 0700) -- self.base_dir = '/tmp/comix/' + str(dir_number) + '/' -+ if not os.path.exists(self._tmp_dir + str(dir_number)): -+ os.mkdir(self._tmp_dir + str(dir_number)) -+ os.chmod(self._tmp_dir + str(dir_number), 0700) -+ self.base_dir = self._tmp_dir + str(dir_number) + '/' - break - dir_number += 1 - |