In 10.3, zypper modifyrepo (mr) only allowed you to enable/disable one repository and enable/disable autorefresh for it. In 11.0 the options have grown in number a bit. Did i mention the nice help texts?
$ zypper help mr
modifyrepo (mr) <options> <alias|#|uri>
modifyrepo (mr) <options> <--all|--remote|--local|--medium-type>
Modify properties of repositories specified by alias, number or URI
or by the '--all, --remote, --local, --medium-type' aggregate options.
Command options:
-d, --disable Disable the repository (but don't remove it).
-e, --enable Enable a disabled repository.
-r, --refresh Enable auto-refresh of the repository.
-R, --no-refresh Disable auto-refresh of the repository.
-n, --name Set a descriptive name for the repository.
-p, --priority <1-99> Set priority of the repository.
-k, --keep-packages Enable RPM files caching.
-K, --no-keep-packages Disable RPM files caching.
-a, --all Apply changes to all repositories.
-l, --local Apply changes to all local repositories.
-t, --remote Apply changes to all remote repositories.
-m, --medium-type <type> Apply changes to repositories of specified type.
This is what you will see in zypper 0.11.3. The aggregate options (and the -k options) were added just recently by our new colleague Josef Reidinger. Those familiar with 10.3 zypper, note that the --enable-autorefresh/-a and --disable-autorefresh options are now deprecated (-a shorthand even had to be removed because of conflict with --all) in favor of --refresh and --no-refresh options. This change was introduced for the sake of consistency with other commands' options. All the options will be described in more detail in the man page soon.
Few examples
To disable autorefresh for all repositories, do:
$ zypper mr -Ra
Nothing to change for repository 'openSUSE-DVD 11.0'.
Autorefresh has been disabled for repository 'fate'.
Nothing to change for repository 'factory'.
Nothing to change for repository 'packman'.
Autorefresh has been disabled for repository 'factory-nonoss'.
Autorefresh has been disabled for repository 'factory-debug'.
Nothing to change for repository 'vbox'.
Autorefresh has been disabled for repository 'zypp:svn'.
To disable all cd/dvd repositories, do:
$ zypper mr -d -m cd -m dvd
Repository 'openSUSE-DVD 11.0' has been sucessfully disabled.
To enable RPM caching of RPM files for all remote (http/https/ftp) repositories, do:
$ zypper mr -kt
Nothing to change for repository 'factory'.
RPM files caching has been enabled for repository 'factory-debug'.
RPM files caching has been enabled for repository 'factory-nonoss'.
RPM files caching has been enabled for repository 'fate'.
Nothing to change for repository 'packman'.
RPM files caching has been enabled for repository 'vbox'.
RPM files caching has been enabled for repository 'zypp:svn'.
Of course don't forget to use zypper clean when you run out of free disk space then :O)
2 comments:
wow, this is really great new functionality... thanks a lot for the great zypp in 11.0 :)
Hmmm...
-p, --priority <1-99> Set priority of the repository.
And what about unifying it with YaST which can set priority <1-200>? Or at least it used to be so...
What I actually see on my 11.0 in YaST Repositories' help is: Priority of a repository is an integer value between 0 (the highest priority) and 99 (the lowest priority). But I can set it to 200.
Post a Comment