On 4/8/2008 at 15:17, Felix Miata <mrmazda@ij.net> wrote: What I do quiet often is: su - zypper lu -t package | awk -F\| '/yast2/ { print $3}' | xargs zypper in
What mere mortal user would ever understand all that, much less remember it?
I do :) And somehow I assume I'm still mortal. Remembering it is rather easy, once you understand it. zypper lu -t package -> lists all available packages available for update awk -F\| '/yast2/ {print $3}' -> Get's all the lines that contain yast2 (so it's not perfect, in case you have a repo called yast2); -F\| tell's awk to 'split' the fields at the pipe symbol (it's used on screen to give the nice table with zypper lu -t package... the package name is the 3rd field in this table); /yast2/ is a simple regex used as a filter... print $3 prints the 3rd field of the table xargs zypper in -> takes the output from the previous command and constructs a command line out of it... the construct is passed on to the command 'zypper in'... thus starting zypper in yast2* ;)
This updates all the yast2 packages to the latest versions and normally works pretty well. Advise: run zypper refresh before that.
zypper up is not used to update single packages like this...
So zypper up is not used to update single packages "like this". So is it used like something else? If so, what? I couldn't make out any in the man page, which is reason #2 why I use smart instead of zypper.
zypper up is meant to install all available patches; zypper up -t package is meant to install all available packages. if you want to update single packages, then you 'install' the new version. This is a huge difference compared to rpm, where -i != -U A feature I'm also missing is sort of: zypper up -t package yast2* but who knows... this might come later ;) Dominique --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org