Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 358674 Details for
Bug 484956
java-config: [PATCH] Fixup directory and file installation code in jc_install
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Revision 1
0001-Fixup-directory-and-file-installation-code-in-jc_ins.patch (text/plain), 1.49 KB, created by
Mike Gilbert
on 2013-09-15 01:50:56 UTC
(
hide
)
Description:
Revision 1
Filename:
MIME Type:
Creator:
Mike Gilbert
Created:
2013-09-15 01:50:56 UTC
Size:
1.49 KB
patch
obsolete
>From b416278e28f7d9c37a3ec12d326c2bab6f4d940d Mon Sep 17 00:00:00 2001 >From: Mike Gilbert <floppym@gentoo.org> >Date: Sat, 14 Sep 2013 20:54:06 -0400 >Subject: [PATCH] Fixup directory and file installation code in jc_install > >Use mkpath to prevent failure if the path already exists. >Write data to a temp file and call copy_file to install to avoid a race >condition if with concurrent build processes. >--- > setup.py | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/setup.py b/setup.py >index ec54b37..7aff539 100644 >--- a/setup.py >+++ b/setup.py >@@ -8,7 +8,7 @@ from distutils.cmd import Command > from distutils.command.build import build > from distutils.command.install import install > from distutils.command.sdist import sdist >-import fileinput, os, subprocess, sys, unittest >+import fileinput, os, subprocess, sys, tempfile, unittest > > > class jc_build(build): >@@ -87,10 +87,13 @@ class jc_install(install): > elif arch in ['hpux']: > defaults = '*= hp-jdk-bin' > >- os.mkdirs(self.root + '/usr/share/java-config-2/config/') >- with open(self.root + '/usr/share/java-config-2/config/jdk-defaults.conf', 'w') as f: >+ with tempfile.NamedTemporaryFile(mode='w', delete=False) as f: > f.write("# This files contain the default support jdk's\n") > f.write(defaults + "\n") >+ confdir = self.root + '/usr/share/java-config-2/config/' >+ self.mkpath(confdir) >+ self.copy_file(f.name, confdir + 'jdk-defaults.conf', preserve_mode=0) >+ os.remove(f.name) > > > class jc_sdist(sdist): >-- >1.8.3.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 484956
:
358672
| 358674