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

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

5 6
. $(dirname $0)/common.sh

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

9
epm prescription i586-support
10

11 12
get_list_alt()
{
13
repo="$(epm print info -r)"
14 15

for i in glibc-nss glibc-gconv-modules \
16
         libnm \
17
         sssd-client \
18
         primus \
19
         libvulkan1 \
20
         libd3d \
Mikhail Tergoev's avatar
Mikhail Tergoev committed
21 22 23
         libgamemodeauto0 \
         vkBasalt \
         mangohud \
24 25 26 27 28
         $(epmqp --short libnss | grep "^libnss-") \
         $(epmqp --short xorg-dri | grep "^xorg-dri-")
do
    epm --quiet installed $i && LIST="$LIST i586-$i"
done
29

30 31 32 33 34 35
[ "$repo" = "p10" ] && for i in \
         vulkan-amdgpu
do
    epm --quiet installed $i && LIST="$LIST i586-$i"
done

36 37 38 39 40
for i in \
          libxnvctrl0 \
          libnvidia-ml \
          $(epmqp --short nvidia_glx | grep "^nvidia_glx")
do
41 42 43 44
    epm status --installed $i || continue
    # install i586-* only for actual packages
    epm status --installable $i && LIST="$LIST i586-$i"
done
45
}
46

47 48 49
get_list_fedora()
{

50 51 52
# /usr/share/locale/de/LC_MESSAGES/NetworkManager.mo from NetworkManager-libnm conflicts
#         NetworkManager-libnm 

53 54
for i in \
         sssd-client \
55
         mesa-vulkan-drivers mesa-dri-drivers vulkan-loader mesa-libd3d
56 57 58 59 60 61 62 63
do
    epm --quiet installed $i && LIST="$LIST $i.i686"
done
}

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

LIST=''
64
echo
65 66 67 68 69 70
echo "Checking for installed packages ... "

case "$vendor" in
    "alt")
        get_list_alt
        ;;
71
    "fedora"|"centos"|"redos"|"rhel")
72 73 74 75 76 77 78 79 80 81
        get_list_fedora
        ;;
    *)
        info "Unsupported $(epm print info -e) system. Just skipping the operation."
        exit
        ;;
esac

echo
echo "Installing all appropiate 32 bit packages ..."
82 83 84
noremove=''
[ -n "$auto" ] && noremove='--no-remove'
epm install $noremove $LIST
85 86 87 88 89
RES=$?

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

exit $RES
90