Bug 606627 - Output of 'plymouth-set-default-theme' is incorrect when no theme is set
Summary: Output of 'plymouth-set-default-theme' is incorrect when no theme is set
Alias: None
Product: Fedora
Classification: Fedora
Component: plymouth (Show other bugs)
(Show other bugs)
Version: 13
Hardware: All Linux
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-22 06:21 UTC by Bruce Jerrick
Modified: 2011-06-27 18:43 UTC (History)
2 users (show)

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

Attachments (Terms of Use)

Description Bruce Jerrick 2010-06-22 06:21:23 UTC
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.)

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

Version-Release number of selected component (if applicable):

How reproducible:

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

    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

Then, run (with no args):

Actual results:

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'.)

Just add double quotes around the first arg (the readlink return) in
the basename call in the get_default_theme function in
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 15:57:27 UTC
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: 

Comment 2 Bug Zapper 2011-06-27 18:43:15 UTC
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.