buildFHSUserEnv{Chroot,Bubblewrap}: fix handling of glib schema
An error would occur if share/glib-2.0/schema was a symlink.
This commit is contained in:
parent
0b88ca814f
commit
d5bf6bac5c
2 changed files with 22 additions and 16 deletions
|
@ -97,18 +97,21 @@ let
|
|||
if [[ -d $out/share/gsettings-schemas/ ]]; then
|
||||
# Recreate the standard schemas directory if its a symlink to make it writable
|
||||
if [[ -L $out/share/glib-2.0 ]]; then
|
||||
ln -s $(readlink $out/share/glib-2.0) $out/share/glib-2.0.old
|
||||
rm -rf $out/share/glib-2.0
|
||||
target=$(readlink $out/share/glib-2.0)
|
||||
rm $out/share/glib-2.0
|
||||
mkdir $out/share/glib-2.0
|
||||
ln -fs $target/* $out/share/glib-2.0
|
||||
fi
|
||||
|
||||
if [[ -L $out/share/glib-2.0/schemas ]]; then
|
||||
target=$(readlink $out/share/glib-2.0/schemas)
|
||||
rm $out/share/glib-2.0/schemas
|
||||
mkdir $out/share/glib-2.0/schemas
|
||||
ln -fs $target/* $out/share/glib-2.0/schemas
|
||||
fi
|
||||
|
||||
mkdir -p $out/share/glib-2.0/schemas
|
||||
|
||||
# symlink any schema files or overrides to the standard schema directory
|
||||
if [[ -e $out/share/glib-2.0.old/schemas ]]; then
|
||||
ln -fs $out/share/glib-2.0.old/schemas/*.xml $out/share/glib-2.0/schemas
|
||||
ln -fs $out/share/glib-2.0.old/schemas/*.gsettings-schemas.override $out/share/glib-2.0/schemas
|
||||
fi
|
||||
|
||||
for d in $out/share/gsettings-schemas/*; do
|
||||
# Force symlink, in case there are duplicates
|
||||
ln -fs $d/glib-2.0/schemas/*.xml $out/share/glib-2.0/schemas
|
||||
|
|
|
@ -138,18 +138,21 @@ let
|
|||
if [[ -d $out/share/gsettings-schemas/ ]]; then
|
||||
# Recreate the standard schemas directory if its a symlink to make it writable
|
||||
if [[ -L $out/share/glib-2.0 ]]; then
|
||||
ln -s $(readlink $out/share/glib-2.0) $out/share/glib-2.0.old
|
||||
rm -rf $out/share/glib-2.0
|
||||
target=$(readlink $out/share/glib-2.0)
|
||||
rm $out/share/glib-2.0
|
||||
mkdir $out/share/glib-2.0
|
||||
ln -fs $target/* $out/share/glib-2.0
|
||||
fi
|
||||
|
||||
if [[ -L $out/share/glib-2.0/schemas ]]; then
|
||||
target=$(readlink $out/share/glib-2.0/schemas)
|
||||
rm $out/share/glib-2.0/schemas
|
||||
mkdir $out/share/glib-2.0/schemas
|
||||
ln -fs $target/* $out/share/glib-2.0/schemas
|
||||
fi
|
||||
|
||||
mkdir -p $out/share/glib-2.0/schemas
|
||||
|
||||
# symlink any schema files or overrides to the standard schema directory
|
||||
if [[ -e $out/share/glib-2.0.old/schemas ]]; then
|
||||
ln -fs $out/share/glib-2.0.old/schemas/*.xml $out/share/glib-2.0/schemas
|
||||
ln -fs $out/share/glib-2.0.old/schemas/*.gsettings-schemas.override $out/share/glib-2.0/schemas
|
||||
fi
|
||||
|
||||
for d in $out/share/gsettings-schemas/*; do
|
||||
# Force symlink, in case there are duplicates
|
||||
ln -fs $d/glib-2.0/schemas/*.xml $out/share/glib-2.0/schemas
|
||||
|
|
Loading…
Reference in a new issue