tovid forums Forum Indextovid forums
Discussing tovid, the video disc authoring suite
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in          Games  Calendar

We are experimenting on new ads format. Report any problem here.
New Support Forum is now up and running!
Please help completing a survey!

tovid-0.30 on Gentoo

 
Post new topic   Reply to topic    tovid forums Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
spielc
Enthusiast


Joined: 17 Jun 2006
Posts: 16
:


Items

PostPosted: Thu Feb 15, 2007 11:53 am    Post subject: tovid-0.30 on Gentoo Reply with quote

As i'm the maintainer of the gentoo-ebuild of tovid i'm trying hard to keep the newest version of tovid in portage. I never had any problems with tovid before but with tovid-0.30 a big bug makes running tovid on gentoo alot harder.

the problem is related to this part of tovid-init:

Code:

INSTALLED_TOVIDS=$(type -a tovid 2>>/dev/null | awk '{print $NF}' | tr '\n' ' ')
NUM_INSTALLED=0

# Only count non-links
for tovid in $INSTALLED_TOVIDS; do
    if ! test -L $tovid; then
        let "NUM_INSTALLED=NUM_INSTALLED+1"
    fi
done

# Exit when there is more than one tovid installed
if test $NUM_INSTALLED -ne 1; then
    echo "Found $NUM_INSTALLED installations of tovid on your system!"
    echo "I won't run until there is only one of me :)"
    echo "Installed versions:"
    for version in $INSTALLED_TOVIDS; do
        echo "   $version"
    done
    echo "Exiting..."
    exit 1
fi


You see on Gentoo /usr/X11R6 is a symlink to /usr and thus it finds the tovid-skript twice (one time in /usr/bin and the second time in /usr/X11R6/bin)

here's the exact output when i try to execute tovid:

Code:
tovid
Found 2 installations of tovid on your system!
I won't run until there is only one of me :)
Installed versions:
   /usr/bin/tovid
   /usr/X11R6/bin/tovid
Exiting...


I get your intentions of the above code (prevent troubles with different installed versions of tovid) but it's not working in the case of Gentoo. As possible solution I would suggest that you not only check for the existence of files with the name tovid but you also check for the version-number of the files.

As a workaround i hacked up the ebuild to install the executables in /usr/local/bin and patch the configure-file to install the python-scripts into /usr. I know it's not a beautiful solution but as i'm not that good with bash-scripting that was the only real solution i could think of that wasn't too time-consuming.
Back to top
View user's profile Send private message
wapcaplet
Mastermind


Joined: 29 Mar 2005
Posts: 430
:
Location: Colorado Springs, CO, USA

Items

PostPosted: Thu Feb 15, 2007 2:34 pm    Post subject: Reply with quote

Thanks for posting about this--I never encountered this problem on my Gentoo box, because (as I just discovered) /usr/X11R6/bin is not on my $PATH. Checking version number is a good idea; I'll fix it so it only complains if conflicting versions are installed.

Meanwhile, a workaround for other Gentoo users who have this problem is to take /usr/X11R6/bin out of your $PATH.
_________________
Eric

-------------------
Want to make DVDs or (S)VCDs on Linux? Try tovid, and join the tovid community. Do you prefer IRC? Visit the #tovid channel on irc.freenode.net.
Back to top
View user's profile Send private message
Mac North
Synchronizer


Joined: 18 Apr 2005
Posts: 697
:
Location: groups.google.com/group/tovid-users

Items

PostPosted: Thu Feb 15, 2007 4:14 pm    Post subject: Reply with quote

There's a fix in svn now. Can't wait till distros take the Mobius strip out of their PATHs :-)

Code:
INSTALLED_TOVIDS=$(type -a tovid 2>>/dev/null | awk '{print $NF}' | tr '\n' ' ')
NUM_INSTALLED=0
INSTALLED_VERS=""
INSTALLED_PREFS=""

# Only count tovids that are different versions
for tovid in $INSTALLED_TOVIDS; do
    tovid_PREFIX=$(dirname $tovid)
    tovid_VERSION=$(grep TOVID_VERSION $tovid_PREFIX/tovid-init | \
        awk -F '"' '{print $2}')
    INSTALLED_VERS="$INSTALLED_VERS $tovid_VERSION"
done
UNIQ_TOVIDS="$(echo $INSTALLED_VERS | tr ' ' '\n' | uniq)"
NUM_INSTALLED="$(echo $INSTALLED_VERS | tr ' ' '\n' | uniq | wc -l)"

# Exit when there is more than one tovid installed
if test $NUM_INSTALLED -ne 1; then
    echo "Found $NUM_INSTALLED versions of tovid on your system!"
    echo "I won't run until there is only one of me :)"
    echo "Installed versions:"
    i=1
    while test $i -le $(echo "$INSTALLED_TOVIDS" | awk '{print NF}'); do
        tovid_ver=$(echo $INSTALLED_VERS | awk '{print $'$i'}')
        tovid_path=$(echo $INSTALLED_TOVIDS | awk '{print $'$i'}')
        printf "   %s (%s)\n" $tovid_ver $tovid_path
        let "i=i+1"
    done
    echo "Exiting..."
    exit 1
fi

_________________
NOTE: I have moved my support away from these forums and to the tovid-users Google group. The search is better, the reading is easier, and you can post via both web and email (without needing to worry if you have enough posts to post URLs!).

Who's your user, program?
pengi films: movies made with open source software.
tovid examples: watch examples of tovid menus.
bbgun: move phpBB forums to WordPress blogs.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    tovid forums Forum Index -> Bugs 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
tovid forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

FREE FORUM HOSTING by AtFreeForum. Terms of Service - Privacy Policy
FASHION ACCESSORIES - BLING BLING - LADIES WATCHES - KOREAN CHILDREN CLOTHING - ONLINE BARGAIN STORE - FASHION JEWELLERIES