i586-fix.sh 1.49 KB
Newer Older
1 2 3 4
#!/bin/sh

[ "$1" != "--run" ] && echo "Fix missed 32 bit package modules on 64 bit system" && exit

5
[ "$(epm print info -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
6

7 8
get_list_alt()
{
9 10

for i in glibc-nss glibc-gconv-modules \
11
         libnm \
12
         sssd-client \
13
         primus \
14
         vulkan-amdgpu libvulkan1 \
15 16 17 18 19
         $(epmqp --short libnss | grep "^libnss-") \
         $(epmqp --short xorg-dri | grep "^xorg-dri-")
do
    epm --quiet installed $i && LIST="$LIST i586-$i"
done
20 21 22 23 24 25

for i in $(epmqp --short nvidia_glx | grep "^nvidia_glx") ; do
    epm status --installed $i || continue
    # install i586-* only for actual packages
    epm status --installable $i && LIST="$LIST i586-$i"
done
26
}
27

28 29 30
get_list_fedora()
{

31 32 33
# /usr/share/locale/de/LC_MESSAGES/NetworkManager.mo from NetworkManager-libnm conflicts
#         NetworkManager-libnm 

34 35 36 37 38 39 40 41 42 43 44
for i in \
         sssd-client \
         mesa-vulkan-drivers mesa-dri-drivers vulkan-loader
do
    epm --quiet installed $i && LIST="$LIST $i.i686"
done
}

vendor="$(epm print info -s)"

LIST=''
45
echo
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
echo "Checking for installed packages ... "

case "$vendor" in
    "alt")
        get_list_alt
        ;;
    "fedora"|"centos"|"redos")
        get_list_fedora
        ;;
    *)
        info "Unsupported $(epm print info -e) system. Just skipping the operation."
        exit
        ;;
esac

echo
echo "Installing all appropiate 32 bit packages ..."
63 64 65 66 67 68
epm install --no-remove $LIST
RES=$?

[ "$RES" = "0" ] || echo "Try do epm upgrade before."

exit $RES
69