Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Портеж Gentoo - краткий обзор для не знакомых с ним
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
Balancer
Guru
Guru


Joined: 04 Jun 2004
Posts: 465

PostPosted: Mon Aug 21, 2006 11:12 am    Post subject: Портеж Gentoo - краткий обзор для не Reply with quote

Периодически задают вопросы: "Что такое портеж, как он работает, зачем он вообще нужен?". Дабы не отвечать постоянно одно и то же, написал http://balancer.ru/forum/punbb/viewtopic.php?id=50716

Может, кому-то и тут будет интересно :)
Back to top
View user's profile Send private message
lefsha
Veteran
Veteran


Joined: 30 Aug 2004
Posts: 1234
Location: Burgas, Bulgaria

PostPosted: Wed Aug 23, 2006 10:52 pm    Post subject: Reply with quote

Нет, я не понял. Где наборы скриптов? :lol:

Больше всего интересует такой скрипт, который решает проблему
битого пакета при сборке world.
_________________
Lefsha
Back to top
View user's profile Send private message
fank
l33t
l33t


Joined: 16 Oct 2004
Posts: 794
Location: Minsk, Belarus

PostPosted: Thu Aug 24, 2006 7:03 am    Post subject: Reply with quote

пожалуйста :-)
вот скрипт (не мой, найден совсем недавно на этом форуме, https://forums.gentoo.org/viewtopic-t-473424.html )
Code:
#!/bin/sh

time=`date`
emerge $*
retry=$?

while [[ $retry -ne 0 ]]
do
    log=`genlop --nocolor --list --date "$time" | grep \>\>\> | awk -F ' >>> ' '{ print $2 }'`

    if [[ -n "$log" ]]; then
        # Command failed, but something was installed successfully, just try the command again
        echo "Trying again" 1>&2
        time=`date`
        emerge --resume
        retry=$?
    else
        # Command failed and nothing was installed since the last time emerge was run
        echo "Capturing failure" 1>&2
        time=`date`
        echo >>/var/log/portage_failures.output
        echo --------------- $time --------------- >>/var/log/portage_failures.output

        emerge --resume >>/var/log/portage_failures.output 2>&1

        if [[ $? -eq 0 ]]; then
            # Despite expectations, this succeeded
            exit 0
        else
            # See whether the resume actually managed to install something before failing again
            log=`genlop --nocolor --list --date "$time" | grep \>\>\> | awk -F ' >>> ' '{ print $2 }'`
            if [[ -z "$log" ]]; then
                echo "Resuming with next package" 1>&2
                emerge --resume --skipfirst
                retry=$?
            else
                # The resume installed the package that originally failed, then failed again on a subsequent
                # package - just go through an retry that package again
                retry=1
            fi
        fi
    fi
done
Back to top
View user's profile Send private message
lefsha
Veteran
Veteran


Joined: 30 Aug 2004
Posts: 1234
Location: Burgas, Bulgaria

PostPosted: Thu Aug 24, 2006 5:24 pm    Post subject: Reply with quote

У меня есть скромные сомнения, что это так просто...

На самом деле скрипт лишь повторяет сборку неудачных пакетов.
В этом нет смысла по большому счету. Представить себе 2 или 3 повторных
сборки OpenOffice я не могу и не хочу.

Для того что бы реализовать данную идею необходимо работать с деревом
пакетов чем занимается emerge. Проблема заключается в том, что
все делается последовательно, хотя сама структура пакетов квази параллельная.

Иначе говоря неудачная сборка одного из них отражается только на
одну ветку, остальные пакеты никак не зависят от битого и могли бы
быть собраны.

Особенно данный факт чувствителен при сборке world.
Можно поставить сборку на сутки трое и уехать. А сборки прекратится
через 20 минут...

Так что думаю Balancer не зря молчит. Он знает о чем он молчит... ;-)
_________________
Lefsha
Back to top
View user's profile Send private message
fank
l33t
l33t


Joined: 16 Oct 2004
Posts: 794
Location: Minsk, Belarus

PostPosted: Fri Aug 25, 2006 6:08 am    Post subject: Reply with quote

опять не то!
ты хоть попробовал его, если уж в код не смотрел???
строки
Code:
# The resume installed the package that originally failed, then failed again on a subsequent
                # package - just go through an retry that package again
                retry=1

тебе ни о чём не говорят?

вот зануда....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum