Porting repositiry lists across machines - Comments Please

Background: Computer A is running 11.4x64 and KDE4.7.1, if it matters

**Situation: **I have Existing computer A and new computer B. Computer A is set up to my liking with several added repositories to pick up specific application (e.g. mypaint, grsync, pdfedit, google-earth). I am performing a new install on computer B, using the DVD method to start, then updating using Yast-Software Management.

Procedure: In the past, I have added new repositories to Computer B using Yast-Software Repositories. Sort of slow, but of course it works. Then I proceed to customize/personalize my new machine.

**Experiment: **In looking about the forum I found that each installed repository on Computer A is found in text files found in /etc/zypp/repos.d/*.
I copied a repository file from computer A into the same directory on computer B, as root.
When I opened Yast-Software Repositories on Computer B, I see the added repository, with (default) priority 99, in the list of repositories, which is what I wanted.

Questions:

  1. Is there a better way, or should I say “More Proper Way”, to “clone” the repository environment between the machines?
  2. Is there a way to preserve the repository priorities when doing this? The priority displayed in Yast-Software Repositories is clearly saved somewhere other than /etc/zypp/repos.d/*.

Comments appreciated

Sorry, just realized Repository spelled wrong in Thread title, can’t figure out how to edit/fix it!

No. Alternatively you can add the repositories from a script with zypper ar (see man zypper).

No. Priority is written in the .repo files if it differs from the default.

You can set the priority with **zypper mr -p **
Example:

zypper mr -p 90 nvidia

This command (above) will modify the .repo file /etc/zypp/repos.d/nvidia.repo :

# cat /etc/zypp/repos.d/nvidia.repo :
[nvidia]
name=nvidia
enabled=1
autorefresh=0
baseurl=ftp://download.nvidia.com/opensuse/11.4/
type=rpm-md
priority=90
keeppackages=1

You can display the priorities with the command:

zypper lr -p

Thanks for this info - several very useful nuggets of knowledge here!