+  Kiba Dock
|-+  Kiba-Dock
| |-+  Kiba Dock
| | |-+  How to easily install/update from SVN - easyKiba [UPDATED on 18/08/2007]
« previous next »
Pages: 1 [2] 3 4 ... 6 Print
Author Topic: How to easily install/update from SVN - easyKiba [UPDATED on 18/08/2007]  (Read 51991 times)
bochecha
Writer
Insistent
***
Offline Offline

Posts: 144



View Profile
« Reply #15 on: May 04, 2007, 05:20:33 AM »

Oh !

Ok...

In fact I have some things on my TODO list for this script :
- install only what is not already installed (currently you have to install everything each time).
- install only some parts, asking the user (that would be what you are suggesting)
- update only what is newer in SVN than the installed version (currently everything is rebuilt even if there is no newer version)

The 2 first will be done as soon as I have time to do it, but the last one, I have absolutely no idea how I can do that. I guess I'll have to play with the svn command to check if updates are available, in that case update.
Logged

Dave M G
New Guy
*
Offline Offline

Posts: 8


View Profile Email
« Reply #16 on: May 04, 2007, 06:05:46 AM »

Nice script. It worked for me.

However, it would be nice if somewhere you had a complete list of all the packages it depends on. I had to run it about seven times, and each time I had to take the error output and figure out which packages to install.

Sometimes the script said exactly what was needed. Other times I had to search on Google for the error message.

To make this script work, one needs the dev packages for dbus, gnome-desktop, gtk, libtools, sdl, and a whole bunch of others.

Unfortunately, it only occured to me afterwards that it would have been good to record the exact package names.

Perhaps as the developer of this script, you might have that information on hand?
Logged
bochecha
Writer
Insistent
***
Offline Offline

Posts: 144



View Profile
« Reply #17 on: May 04, 2007, 06:10:22 AM »

In fact, the error messages you got are not from my script but from the commands it executes.

That means you would have gotten exactly the same messages by building it manually... So there is nothing I can do here.

What might be good though, is to make a list of needed stuffs for building Kiba-Dock. There is already a "Dependencies" list, but I think they are only for running Kiba, not for building it.

I think I'll try to set some list of this kind in the wiki, starting by adding the packages you mentioned.

For the record, what distro do you use ?
Logged

Moncader
Writer
New Guy
***
Offline Offline

Posts: 32


View Profile Email
« Reply #18 on: May 04, 2007, 04:41:29 PM »

An idea for checking what the output from SVN is.

You can nifty things like this Smiley
OUTPUT=`svn co http://balhbahl.com/blah`

Note that the ` is NOT an apostrophe (ie, not ') its the nonshift-~ thing.
What that will do is execute the svn command and redirect all stdout output in to the variable OUTPUT. From that you can do a check (note that there is probably a better way at doing this... but I can't find out how to get grep to take stdin:
OUTPUT=`svn co thesitetocheckout`
UPTODATE="At revision"
echo "$OUTPUT" | grep "$UPTODATE"
RESULT=$?
if [ $RESULT -eq 0 ]
then
     echo "Its already up to date."
     KIBAPLUGINS_STATUS=1
elif [ $RESULT -eq 1 ]
then
     echo "It's not up to date and probably update. You could just directly search for Updated to revision X as well."
     KIBAPLUGINS_STATUS=0
fi

Then later, you can check to see if it updated or not:
if [ KIBAPLUGINS_STATUS -eq 1 ]
then
     #code to compile that section, which, in this case, is kibaplugins.
fi

You should be able to get somewhere with that information. And as a note of other useful things

OUTPUT=`svn co thesitetocheckout` could be expanded to:
OUTPUT=`svn co thesitetocheckout 2>./errorfile.log`
That redirects all stderr output to a file called errorfile.log You could then go through that file later, and display the actual errors to the script user in a very nice and organized manner, possibly even saying where to download the packages. You can redirect stdout is that manner as well using 1>./error or just >./error

It's a bit of work, but it does work Smiley I've made a few scripts like that (I'm no script expert btw Tongue I only recently started really using them as well, but once you know the basics... well, I now use SEVERAL scripts, semi complex ones, to do my everyday things Wink )

Good luck, ask questions if you need them. Perhaps we should take this to jabber or private messages or email.....
Logged
bochecha
Writer
Insistent
***
Offline Offline

Posts: 144



View Profile
« Reply #19 on: May 04, 2007, 11:05:47 PM »

I already thought about looking at stdout for the uptodate thing.

One problem though : my system is in french. Yours is in english. Danielb's is in german... How can I expect a script working with that ?

I don't know how to use internationalisation for scripts (if it is ever possible)...

I was hoping 'svn up' would return some different code when svn is uptodate. Can't find something about that... Undecided
Logged

Moncader
Writer
New Guy
***
Offline Offline

Posts: 32


View Profile Email
« Reply #20 on: May 05, 2007, 07:03:00 AM »

We'll probably have to make our own locale section in the script, I tested to see if svn returned different codes for things, and it doesn't. However, there is a wonderful program that I have not used and is common in Linux Smiley
gettext

basically, I think it works like this:

gettext "hello"
And it will display hello in your language Smiley

Go look around for it, not sure exactly how it works.
Logged
danielb
Lead Developer
Veteran
*****
Offline Offline

Posts: 910



View Profile Email
« Reply #21 on: May 05, 2007, 07:17:02 AM »

basically, I think it works like this:

gettext "hello"
And it will display hello in your language Smiley
but u need to set up a database before Wink
and you must bind the text domain, with c it works like this:
Code:
/* bind text domain, so that gettext can find the translations */
bindtextdomain (PACKAGE, DATADIR"/locale");
textdomain (PACKAGE);
« Last Edit: May 05, 2007, 07:18:45 AM by danielb » Logged
bochecha
Writer
Insistent
***
Offline Offline

Posts: 144



View Profile
« Reply #22 on: May 06, 2007, 12:48:24 PM »

I've been looking aroung this gettext thing... But I couldn't figure how to use it with bash Undecided

If someone had an idea, it would be great...
Logged

zeclubbeur
New Guy
*
Offline Offline

Posts: 3


View Profile Email
« Reply #23 on: May 07, 2007, 02:52:39 PM »

Hello !

I have a problem when I try to install kiba-dock with this script.
akamaru installation fails with the message :

Code:
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal  --output=aclocal.m4t
autoreconf: `aclocal.m4' is unchanged
autoreconf: configure.in: tracing
autoreconf: running: libtoolize --copy
Putting files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: `config.guess' exists: use `--force' to overwrite
libtoolize: `config.sub' exists: use `--force' to overwrite
libtoolize: `ltmain.sh' exists: use `--force' to overwrite
autoreconf: running: /usr/bin/autoconf
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy
configure.in: 7: required file `./[config.h].in' not found
src/Makefile.am:7: variable `noinst_LTLIBRARIES' not defined
autoreconf: automake failed with exit status: 1

I'm running this script under Ubuntu 7.04 Feisty Fawn with gnome

Could someone help me ?
Thanks !
Logged
bochecha
Writer
Insistent
***
Offline Offline

Posts: 144



View Profile
« Reply #24 on: May 08, 2007, 05:37:49 AM »

Doesn't seem to be an error form the script. Try to install manually and see if you get the same error. If so, please ask for help in another topic, this one is about improving the script, not helping everyone to install Kiba Dock Wink
Logged

zeclubbeur
New Guy
*
Offline Offline

Posts: 3


View Profile Email
« Reply #25 on: May 08, 2007, 10:15:50 AM »

Well, it's akamaru who doesn't want to compile... So, I'll go to another topic to find help.

Thx Smiley
Logged
danielb
Lead Developer
Veteran
*****
Offline Offline

Posts: 910



View Profile Email
« Reply #26 on: May 09, 2007, 02:53:56 PM »

i found a small bug:
Code:
  if [ -f /usr/lib/kiba-dock/libdbus.so ] || [ -f /usr/local/lib/kiba-dock/libdbus.so ];then
    echo -en "* kibadbusplugins \033[500C\033[40D$normal$ok\n"
  else
    echo -en "* kibadbusplugins \033[500C\033[40D$normal$ko\n"
    state=1
  fi
this checks if the kiba dbus plugin was build, but not if the kibadbusplugins repo was installed succesfully.

also you should add
Code:
"$@"
after the autogen.sh call, since the user may want to disable/enable some features.
Logged
bochecha
Writer
Insistent
***
Offline Offline

Posts: 144



View Profile
« Reply #27 on: May 19, 2007, 07:48:27 AM »

Updated today Smiley

See the first post for changes.

@danielb : next thing I'll do is look at this dbusplugins thing we spoke about last day.
But what do you mean with this "$@" ?
Logged

danielb
Lead Developer
Veteran
*****
Offline Offline

Posts: 910



View Profile Email
« Reply #28 on: May 19, 2007, 07:50:29 AM »

these are the parameter passed to your script like for example "--enable-glitz"
Logged
bochecha
Writer
Insistent
***
Offline Offline

Posts: 144



View Profile
« Reply #29 on: May 19, 2007, 08:52:26 AM »

Oh !

So you want me to pass them to the autogen.sh call, right ?
Logged

Pages: 1 [2] 3 4 ... 6 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!