i586-fix.sh 1.82 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 10
epm play i586-support

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 $(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
41
}
42

43 44 45
get_list_fedora()
{

46 47 48
# /usr/share/locale/de/LC_MESSAGES/NetworkManager.mo from NetworkManager-libnm conflicts
#         NetworkManager-libnm 

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

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

LIST=''
60
echo
61 62 63 64 65 66
echo "Checking for installed packages ... "

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

echo
echo "Installing all appropiate 32 bit packages ..."
78 79 80
noremove=''
[ -n "$auto" ] && noremove='--no-remove'
epm install $noremove $LIST
81 82 83 84 85
RES=$?

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

exit $RES
86