Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 149290 Details for
Bug 199029
Review Request: jokosher
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Rework omf file installation
jokosher-scrollkeeper.patch (text/plain), 2.71 KB, created by
Toshio Kuratomi
on 2007-03-05 20:33:08 UTC
(
hide
)
Description:
Rework omf file installation
Filename:
MIME Type:
Creator:
Toshio Kuratomi
Created:
2007-03-05 20:33:08 UTC
Size:
2.71 KB
patch
obsolete
>Index: jokosher-0.9/setup.py >=================================================================== >--- jokosher-0.9.orig/setup.py >+++ jokosher-0.9/setup.py >@@ -34,10 +34,8 @@ except OSError: > pass > else: > #Obtain the OMF repository directory to install and register the help files >- #This step only makes sense if run as root >- if os.geteuid() == 0: >- omfdir = os.path.join(process.stdout.read().strip(), "jokosher") >- OMFFILES.append((omfdir, glob.glob("help/jokosher/*.omf"))) >+ omfdir = os.path.join(process.stdout.read().strip(), "jokosher") >+ OMFFILES.append((omfdir, glob.glob("help/jokosher/*.omf"))) > > dist = setup(name='jokosher', > version='0.9', >@@ -67,11 +65,15 @@ dist = setup(name='jokosher', > ]+I18NFILES+HELPDOCS+HELPIMAGES+OMFFILES > ) > >+#Non-documented way of getting the final directory prefix >+installCmd = dist.get_command_obj(command="install_data") >+installdir = installCmd.install_dir >+if installdir: >+ installdir = os.path.join(os.path.sep, >+ installdir.replace(installCmd.root,'')) >+ > #Update the real URL attribute inside the OMF files and then >-#register the docs with scrollkeeper. Also update the mime types. >-if omfdir != None and os.geteuid() == 0 and dist != None: >- #Non-documented way of getting the final directory prefix >- installdir = dist.get_command_obj(command="install_data").install_dir >+if omfdir != None and installdir != None and dist != None: > > #Create an array with the docbook file locations > HELPURI = [] >@@ -79,20 +81,20 @@ if omfdir != None and os.geteuid() == 0 > targeturi = os.path.join(installdir, "share/gnome/", filepath) > HELPURI.append(targeturi) > >- #Replace the URL placeholder inside the OMF files using sed >- #We assume that the locale order between omf/docbook will stay the same >- i = 0 >- for filepath in glob.glob(omfdir+"/*.omf"): >- expression = "s|PATH_PLACEHOLDER|%s|" % HELPURI[i] >- call(["sed", "-e", expression, filepath, "-i"]) >- i += 1 >+ #Replace the URL placeholder inside the OMF files >+ installedOmfFiles = glob.glob(installCmd.root + omfdir + "/*.omf") >+ for fileNum in range(0, len(installedOmfFiles)): >+ call(["scrollkeeper-preinstall", HELPURI[fileNum], >+ installedOmfFiles[fileNum], installedOmfFiles[fileNum]]) > >- #Update the scrollkeeper catalog and mime types >- print "Updating the scrollkeeper index and mime types..." >- call(["scrollkeeper-update", "-o", omfdir]) >- >+ #Update the scrollkeeper catalog >+ if os.geteuid() == 0: >+ print "Updating the scrollkeeper index..." >+ call(["scrollkeeper-update", "-o", installCmd.root + omfdir]) > >+# Update the mime types > if os.geteuid() == 0 and dist != None: >+ print "Updating the mime-types...." > #update the mimetypes database > call(["update-mime-database", "/usr/share/mime/"]) > #update the .desktop file database
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 199029
: 149290