Bug 885823 - please implement a redirection-servlet as the solution for the localized-documentation fallback mechanism (instead of docs package symlinks)
Summary: please implement a redirection-servlet as the solution for the localized-docu...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.2.0
Assignee: Alexander Wels
QA Contact: Jiri Belka
URL:
Whiteboard: ux
Depends On:
Blocks: 948448 966721
TreeView+ depends on / blocked
 
Reported: 2012-12-10 17:42 UTC by Einav Cohen
Modified: 2015-09-22 13:09 UTC (History)
8 users (show)

Fixed In Version: sf17.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-11 08:17:25 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 10065 0 None None None Never
oVirt gerrit 14734 0 None None None Never

Description Einav Cohen 2012-12-10 17:42:45 UTC
Current solution for localized-documentation-fallback is implemented by symlinks.

i.e., when only English documentation is installed, the Japanese doc files, for example, are there, implemented as symlinks to the enlish doc files.

[Once the Japanese documentation package is also installed, the symlinks are/should be replaced with the actual newly-deployed Japanese doc files]

Due to the problematic nature of handling symlinks in the yum install/update process, we want to implement the fallback mechanism via a redirection servlet.

I.e. when requesting a localized documentation file that doesn't exist - a redirection servlet would fallback to the parallel default (English) documentation file.
[and the default (English) docs package (or any other docs package, for that matter) wouldn't have to contain symlinks anymore]

Comment 1 Stephen Gordon 2012-12-10 20:11:52 UTC
(In reply to comment #0)
> [Once the Japanese documentation package is also installed, the symlinks
> are/should be replaced with the actual newly-deployed Japanese doc files]

To clarify for bystanders this bit proved to be impossible to do "in place". When RPM evaluates the incoming filelist it does so against the filesystem that still has the symlink, as a result it determines the new rhevm-doc-ja-JP package conflicts with the rhevm-doc package.

It's possible to get around this using %pretrans (risky!) but the problem with this approach is that only works if you are installing the package directly with RPM. YUM doesn't run the %pretrans scriptlets when it runs the pre-transaction checks (because they can perform tasks that it can't roll back) and thus still detects the conflict if you are switching a symlink to a directory.

Ultimately this became a non-issue for us because in the final build I had to rename the top level folder from ja-JP to ja to match the UI mapping (thus "removing" all the symlinks and "adding" all the directories in a different location) but as a result of this adventure I would *not* use the symlink approach for any further language packs.

Comment 2 Alexander Wels 2012-12-14 13:26:27 UTC
Changes committed and available for review here:
http://gerrit.ovirt.org/#/c/10060/

Comment 3 Alexander Wels 2012-12-14 15:34:09 UTC
(In reply to comment #2)
I abandoned that patch set due to it being dependent on another one I didn't want it to be dependent on. The new patch set is:

http://gerrit.ovirt.org/#/c/10065/

Comment 9 Jiri Belka 2013-05-03 13:48:07 UTC
ok, sf15.

Comment 12 Jiri Belka 2013-05-14 12:42:22 UTC
It's not working in IE (8,9,10).

Comment 13 Alexander Wels 2013-05-15 14:13:16 UTC
The problem was a bug in the locale detection code using the URL path. Normally the code tries to use the referrer to determine the locale, but some browsers don't pass the referrer and it falls back on the path. There was a bug where it wasn't handling a '-' properly. So having fr-FR in the path would fail, where having fr_FR would work fine.

Comment 14 Jiri Belka 2013-05-23 07:59:17 UTC
ok, sf17.1.

Comment 15 Itamar Heim 2013-06-11 08:17:25 UTC
3.2 has been released


Note You need to log in before you can comment on or make changes to this bug.