Bug 18951 - problematic %post
Summary: problematic %post
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: ltsp-server (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Michael Shigorin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-23 19:29 MSK by Michael Shigorin
Modified: 2009-06-18 22:28 MSD (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Shigorin 2009-02-23 19:29:08 MSK
Поймано при сборке профиля на 5.0/branch:
error: execution of %post scriptlet from ltsp-server-5.1.21-alt0.1 failed, exit status 1

Скрипт сейчас такой:
[ -f /usr/share/alsa/alsa.conf ] && 
for n in null pulse xaudio; do 
    [ -f /etc/ltsp/asound-$n.conf ] && 
    sed -e 's|"/etc/asound.conf"|"/etc/ltsp/asound-'$n'.conf"|g' \
        -e '/asoundrc/d' /usr/share/alsa/alsa.conf > /usr/share/ltsp/alsa-$n.conf ||: 
done

Боюсь, в нём не хватает финального "||:" (или [ ! -f ... ] || ...).

PS до кучи:
warning: file /usr/share/ltsp/ltsp-common-functions is packaged into both ltsp-server and ltsp-client
warning: file /usr/share/ltsp/ltsp-vendor-functions is packaged into both ltsp-server and ltsp-client
Comment 1 led 2009-02-23 19:40:50 MSK
(В ответ на комментарий №0)
> Скрипт сейчас такой:
> [ -f /usr/share/alsa/alsa.conf ] && 
> for n in null pulse xaudio; do 
>     [ -f /etc/ltsp/asound-$n.conf ] && 
>     sed -e 's|"/etc/asound.conf"|"/etc/ltsp/asound-'$n'.conf"|g' \
>         -e '/asoundrc/d' /usr/share/alsa/alsa.conf >
> /usr/share/ltsp/alsa-$n.conf ||: 
> done
> 
> Боюсь, в нём не хватает финального "||:" (или [ ! -f ... ] || ...).

Лучше:
if [ -f /usr/share/alsa/alsa.conf ]; then
....
fi
Comment 2 led 2009-02-23 19:43:07 MSK
(В ответ на комментарий №0)
> PS до кучи:
> warning: file /usr/share/ltsp/ltsp-common-functions is packaged into both
> ltsp-server and ltsp-client
> warning: file /usr/share/ltsp/ltsp-vendor-functions is packaged into both
> ltsp-server and ltsp-client

Не надо "до кучи" - эти файлы нужны в обоих субпакетах (в спеке это прокоментированно).
Ну, или возвращаемся к теме о том, как изготовить полноценный common-субпакет, ничего не сломав.
Comment 3 Michael Shigorin 2009-02-23 22:24:08 MSK
А, ну как тебе видней.  Мне бы чтоб ltsp-server{,-basic} и ltsp-client{,-full} точно устанавливались в сизифе/M50 :-)  Вчера-сегодня вот ищу грабли с этим...
Comment 4 Michael Shigorin 2009-06-18 22:28:38 MSD
По факту исправлено (глядя в 5.1.21-alt0.4).