[softwaremgmt] rypper - extension for managing multiple repositories via zypper
Hi all,
Such is the value of the openSUSE Build Service from my perspective
that I now have over 40 repositories registered on my main SUSE
machine! I found that zypper was slightly awkward for managing this
number of repositories, so I found a few hours of spare time to knock
up the following; hope it's of use to somebody. Patches welcome!
http://adamspiers.org/computing/rypper
Here is an extract from the documentation for those reading this
offline on their Blackberries :-)
=head1 NAME
rypper - extension for managing multiple repositories via zypper
=head1 SYNOPSIS
# See complete usage documentation
rypper --help
# list all disabled repos
rypper -d
# list all enabled repos with autorefresh off
rypper -e -R
# list all repos which have anything to do with KDE
rypper -x kde
# list priority and URIs for all repos whose alias contains 'home:'
rypper -a home: l -pu
# enable autorefresh on all OpenSUSE Build Service repos
rypper -u download.opensuse.org -R mr -r
# remove all repos on external USB HDD mounted on /media/disk
rypper -u /media/disk rr
=head1 DESCRIPTION
rypper is a wrapper around zypper for performing repository
operations in batch. It allows selection of which
repositories to operate on via a number of different
repository selection specifiers.
The zypper commands which can be wrapped are:
removerepo, rr Remove specified repository.
modifyrepo, mr Modify specified repository.
refresh, ref Refresh all repositories.
clean Clean local caches.
Additionally, the zypper pseudo-command 'l' can be used to
list matching repos. There are a number of options
controlling the output format; run C
Adam Spiers napsal(a):
Hi all,
Such is the value of the openSUSE Build Service from my perspective that I now have over 40 repositories registered on my main SUSE machine! I found that zypper was slightly awkward for managing this number of repositories, so I found a few hours of spare time to knock up the following; hope it's of use to somebody. Patches welcome!
Nice :-). I don't have patches right now, just some suggestions: The help says that the default is the 'l' command, however if I run rypper with no arguments at all, it prints the help. Maybe it should be equivalent to 'rypper l'? rypper l prints the following warning: $ LC_ALL=C ./rypper l Argument "^[[?1034h#" isn't numeric in numeric comparison (<=>) at ./rypper line 193. id alias enabled uri ... Caused by $ LC_ALL=C zypper lr -d | cat -v | head -1 ^[[?1034h# | Alias | Name | Enabled | Refresh | Priority | Type | URI | Service Not sure why zypper prints the escape sequence (it's the 11.1 version), maybe a zypper bug. rypper fails to parse localized zypper messages, the easies workaround would be $ENV{LC_MESSAGES} = "C" before running zypper: $ LC_MESSAGES=cs_CZ.UTF-8 ./rypper -e id alias refresh ------------------- $ Michal -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
Michal Marek (mmarek@suse.cz) wrote:
Adam Spiers napsal(a):
Hi all,
Such is the value of the openSUSE Build Service from my perspective that I now have over 40 repositories registered on my main SUSE machine! I found that zypper was slightly awkward for managing this number of repositories, so I found a few hours of spare time to knock up the following; hope it's of use to somebody. Patches welcome!
Nice :-).
I don't have patches right now, just some suggestions:
The help says that the default is the 'l' command
That's not exactly what it says ;-) It says:
If no zypper command is provided, it defaults to the 'l'
command, [...]
Note 'zypper' not 'rypper'. So, this refers to zypper-cmd in the
usage:
Usage: rypper [
rypper l prints the following warning: $ LC_ALL=C ./rypper l Argument "^[[?1034h#" isn't numeric in numeric comparison (<=>) at ./rypper line 193. id alias enabled uri
... Caused by $ LC_ALL=C zypper lr -d | cat -v | head -1 ^[[?1034h# | Alias | Name | Enabled | Refresh | Priority | Type | URI | Service
Not sure why zypper prints the escape sequence (it's the 11.1 version), maybe a zypper bug.
rypper fails to parse localized zypper messages, the easies workaround would be $ENV{LC_MESSAGES} = "C" before running zypper: $ LC_MESSAGES=cs_CZ.UTF-8 ./rypper -e id alias refresh ------------------- $
Very strange! Version 0.21 now has this workaround: http://adamspiers.org/computing/rypper Please let me know if this fixes it. Thanks a lot for the feedback! Adam -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
participants (2)
-
Adam Spiers
-
Michal Marek