Re: [PATCH 2/2] use different approach to tweak gconf settings in the image (#642358).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2010-10-14 at 15:44 +0200, Ales Kozumplik wrote:
> Previously we used an .xml file. That bore two problems:
> a) the xml contained paths to schmas making the tweaking code longer and
> error-prone when the schema paths change.
> b) the syntax we used to call gconftool-2 is not really documented in
> gconftool's manpage.
> 
> The patch calls gconftool-2 directly, with specific paths, exactly in the
> same way livecd spin kickstarts do.

It may be a little late for this, but we should have been doing it this
way all along instead of trying to write XML. Ack for f14-branch and
master.

Dave

> ---
>  scripts/upd-instroot |   60 +++++++++++--------------------------------------
>  1 files changed, 14 insertions(+), 46 deletions(-)
> 
> diff --git a/scripts/upd-instroot b/scripts/upd-instroot
> index 68f5048..f37ba8c 100755
> --- a/scripts/upd-instroot
> +++ b/scripts/upd-instroot
> @@ -957,52 +957,20 @@ cat > $DEST/.gconf/desktop/gnome/interface/%gconf.xml <<EOF
>  EOF
>  
>  # anaconda needs to change a couple of the default gconf entries
> -GCONF_RULES_FILE=$DEST/etc/gconf/gconf.xml.defaults/anaconda.rules
> -cat > $GCONF_RULES_FILE <<EOF
> -<?xml version="1.0"?>
> -<gconfentryfile>
> -
> -  <entrylist base="/apps">
> -    <entry>
> -      <key>metacity/general/button_layout</key>
> -      <schema_key>/schemas/apps/metacity/general/button_layout</schema_key>
> -      <value>
> -        <string>:</string>
> -      </value>
> -    </entry>
> -    <entry>
> -      <key>metacity/general/action_right_click_titlebar</key>
> -      <schema_key>/schemas/apps/metacity/general/action_right_click_titlebar</schema_key>
> -      <value>
> -        <string>none</string>
> -      </value>
> -    </entry>
> -    <entry>
> -      <key>metacity/window_keybindings/close</key>
> -      <schema_key>/schemas/apps/metacity/window_keybindings/close</schema_key>
> -      <value>
> -        <string>disabled</string>
> -      </value>
> -    </entry>
> -    <entry>
> -      <key>metacity/global_keybindings/run_command_window_screenshot</key>
> -      <schema_key>/metacity/global_keybindings/run_command_window_screenshot</schema_key>
> -      <value>
> -        <string>disabled</string>
> -      </value>
> -    </entry>
> -    <entry>
> -      <key>metacity/global_keybindings/run_command_screenshot</key>
> -      <schema_key>/metacity/global_keybindings/run_command_screenshot</schema_key>
> -      <value>
> -        <string>disabled</string>
> -      </value>
> -    </entry>
> -  </entrylist>
> -
> -</gconfentryfile>
> -EOF
> -gconftool-2 --direct --config-source="xml:readwrite:$DEST/etc/gconf/gconf.xml.defaults" --load $GCONF_RULES_FILE
> +GCONF_CONFIG_SOURCE="xml:readwrite:$DEST/etc/gconf/gconf.xml.defaults"
> +echo "Updating gconf at $GCONF_CONFIG_SOURCE"
> +gconf_update() {
> +    path=$1
> +    entry_type=$2
> +    value=$3
> +    CMD="gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE -s -t $entry_type $path $value"
> +    ${CMD}
> +}
> +gconf_update /apps/metacity/general/button_layout string :
> +gconf_update /apps/metacity/general/action_right_click_titlebar string none
> +gconf_update /apps/metacity/window_keybindings/close string disabled
> +gconf_update /apps/metacity/global_keybindings/run_command_window_screenshot string disabled
> +gconf_update /apps/metacity/global_keybindings/run_command_screenshot string disabled
>  
>  rm -rf $YUMDIR
>  


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux