Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 606627 - Output of 'plymouth-set-default-theme' is incorrect when no theme is set
Output of 'plymouth-set-default-theme' is incorrect when no theme is set
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: plymouth (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-22 02:21 EDT by Bruce Jerrick
Modified: 2011-06-27 14:43 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-27 14:43:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bruce Jerrick 2010-06-22 02:21:23 EDT
Description of problem:
When no plymouth theme is set, 'plymouth-set-default-theme' returns ".plymouth",
and that causes errors in 'plymouth-populate-initrd', because the latter expects
blank output from 'plymouth-set-default-theme' in this case.

(And when 'plymouth-populate-initrd' soldiers on instead of exiting, the error
message it ultimately produces is somewhat nonsensical.)

README FIRST:
Despite the verbosity of this report, the fix is trivial -- see FIX in
"Additional info" below.

--------------------------------------------------------------------------------
Version-Release number of selected component (if applicable):
plymouth-scripts-0.8.2-3.fc13.i686

--------------------------------------------------------------------------------
How reproducible:
100%

Steps to Reproduce:
Some conditions have to be met:
    1. The contents of /etc/plymouth/plymouthd.conf have to be original, i.e.:

	# Administrator customizations go in this file
	#[Daemon]
	#Theme=fade-in

    2. Package plymouth-theme-charge has to be *not* installed (reason is given
       at end of "Additional info" below).

    3. /usr/share/plymouth/themes/default.plymouth must not exist (typically
       a symlink to something like text/text.plymouth, set automagically by
       something I haven't figured out yet; it didn't happen at my F13 OS
       installs).

Then, run (with no args):
plymouth-set-default-theme

--------------------------------------------------------------------------------
Actual results:
.plymouth

As a result, when 'plymouth-populate-initrd' is run during a kernel upgrade,
it produces:

    grep: /usr/share/plymouth/themes/.plymouth/.plymouth.plymouth: \
	No such file or directory
    The default plymouth plugin () doesn't exist

--------------------------------------------------------------------------------
Expected results:
No output -- that is what 'plymouth-populate-initrd' expects when no default
theme is set (see "Additional info" below).

--------------------------------------------------------------------------------
Additional info:
(I haven't given full pathnames of the scripts involved, for brevity; they're
easily found with 'locate' or 'rpmls'.)

FIX:
Just add double quotes around the first arg (the readlink return) in
the basename call in the get_default_theme function in
'plymouth-set-default-theme'.
There's a patch attached that does this.  (Just as a matter of coding practice
it also does the same thing to an earlier instance of 'basename', but that's
not strictly necessary.)
Note that in the F12 version there are further instances of 'basename' that
should also be fixed.

For those interested in the pathology:

The problem lies in the following code from 'plymouth-set-default-theme' (in
  function get_default_theme):

  THEME_NAME=$(basename \
    $(readlink ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth) .plymouth)

which returns ".plymouth" if .../default.plymouth does not exist (basename sees 
".plymouth" as its only argument).

The problem caused by using ".plymouth" in 'plymouth-populate-initrd' is shown
in the following code from that script.  It does not work as intended; it
expects a blank return from 'plymouth-set-default-theme' when no theme is set:

  ... PLYMOUTH_THEME_NAME=$(plymouth-set-default-theme)
  ...
  if [ -z "$PLYMOUTH_THEME_NAME" ]; then
      echo "No default plymouth plugin is set" > /dev/stderr
      ...

(BTW, "No default plymouth theme is set" would be more to the point.)
                           ^^^^^
Why the plymouth-theme-charge package has to be not installed:
  If /usr/share/plymouth/themes/charge/charge.plymouth exists,
  that will be reported as the default theme (being set as such
  in /usr/share/plymouth/plymouthd.defaults).

--------------------------------------------------------------------------------
Comment 1 Bug Zapper 2011-06-01 11:57:27 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Bug Zapper 2011-06-27 14:43:15 EDT
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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