[Bug 1053368] Re: grub-pc.config failed to retrieve and apply debconf database config

molostoff 1053368 at bugs.launchpad.net
Mon Oct 8 16:58:01 UTC 2012


The subject is typically located in grub2 sources
(http://bazaar.launchpad.net/~ubuntu-core-
dev/ubuntu/quantal/grub2/quantal) (in debian/config.in), and in
/var/lib/dpkg/info/grub-pc.config while installed.

The purpose of this file I think is to provide scripted actions to reconfigure installed package, being invoked (for example) within dpkg-reconfigure operation:
 
dpkg-reconfigure -f noninteractive grub-pc
 
The script does unconditional update of debconf-selections database, used as source for reconfiguration items to update. E.g. if I setup debconf-selections against grub2/linux_cmdline with adding new stuff, the installed and existing /etc/default/grub will stay unchanged as a result after dpkg-reconfigure, even more my administratively customized debconf-selections will be overwritten by this script to be the same as in /etc/default/grub.
 
I use debconf-selections database as a source of parameters to imperatively initiate of updating/upgrading existing /etc/default/grub, but it is impossible, moreover it makes debconf-selections database dirty and thus - useless, since these db_set updates always come intact with /etc/default/grub hand changes after reconfiguring. So I am unable to understand the purpose of this unconditional update.
 
>From other hand, all things become clear and working if I comment the code piece:
 
# if test -e /etc/default/grub ; then
# . /etc/default/grub
 
# db_set grub2/linux_cmdline "$GRUB_CMDLINE_LINUX"
# db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"
 
# case grub-pc in
# grub-pc)
# if [ "${GRUB_TIMEOUT}" != "" ]; then
# db_set grub-pc/timeout "$GRUB_TIMEOUT"
# fi
# if [ "${GRUB_HIDDEN_TIMEOUT}" != "" ]; then
# db_set grub-pc/hidden_timeout true
# elif egrep -q '^#?[[:space:]]*GRUB_HIDDEN_TIMEOUT=' /etc/default/grub; then
# db_set grub-pc/hidden_timeout false
# fi
# ;;
# esac
# fi
 
Please, tell me some words about what is the correct way with this script to use dpkg-reconfigure effectively! Any suggestions would be very helpful, thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1053368

Title:
  grub-pc.config failed to retrieve and apply debconf database config

Status in “grub2” package in Ubuntu:
  New

Bug description:
  debconf stored parameters in  configdb are ignored by
  /var/lib/dpkg/info/grub-pc.config at 'dpkg-reconfigure -f
  noninteractive grub-pc'

  Instead of apply configdb parameters (that are stored there before)
  the script in /var/lib/dpkg/info/grub-pc.config unconditionally
  updates them with parameters extracted from /etc/default/grub

  The intended behaviour in this case I suppose to extract parameters
  from configdb or any other source and set them to their defaults or
  any desired value, to be used in  /etc/default/grub , but the script
  does exactly the opposite: overwrites source data. Then, debconf uses
  configdb to apply these "new" old parameters again, and as a result I
  have configdb wiped with values from /etc/default/grub, and
  /etc/default/grub itself stays unchanged.

  So the consequence this behaviour has two penalties: original
  configuration data (a source) wiped out, actual grub config (target)
  stays unchanged.

  I have placed 'exit 0' at the beginning of this script and all things
  became right -  /etc/default/grub updated, debconf database holds
  intended data.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1053368/+subscriptions




More information about the foundations-bugs mailing list