Best way to revert full repository vendor change?

Hello,

Sometimes if I want to try a new version of a piece of software, I add the OBS repo and use a “full repository vendor change” as described here:
https://en.opensuse.org/SDB:Vendor_change_update#Using_YaST_2
However, what’s the best way to revert to the official openSUSE version if I ever want to do so? Sometimes there are a lot of tiny helper libs included in the OBS repo, which are also present in the official openSUSE repos. So if I later remove the OBS repo, what will happen to all the packages that were switched the the vendor that is no longer present? If I again run a “Switch system packages to the versions in this repository” on the main openSUSE OSS repo, that will also switch the vendor on other packages I have installed from other sources (such as Packman), which I don’t want to change.

Any tips? Thanks!

Hi,

Well you can probably disable or remove the OBS repo, You can cherry pick the packages using

yast2 sw_single

once you have disabled the OBS repo where those packages came from and do a force re-install those packages without the OBS repo.

Scripting zypper might do it also.

First find out the OBS repo.

zypper lr
#  | Alias                     | Name                               | Enabled | Refresh
---+---------------------------+------------------------------------+---------+--------
 1 | Packman                   | Packman                            | Yes     | No     
 2 | libdvdcss                 | libdvdcss                          | Yes     | No     
 3 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No     
 4 | repo-debug                | openSUSE-13.2-Debug                | No      | No     
 5 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | No     
 6 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | No     
 7 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | No     
 8 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | No     
 9 | repo-source               | openSUSE-13.2-Source               | No      | No     
10 | repo-update               | openSUSE-13.2-Update               | Yes     | No     
11 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | No   
**12** | shells                    | shells                             | Yes     | No                                      

The leading number in the repos would suffice in our example.

In this example we will do a vendor change from OBS shell repo to standard openSUSE repo.

List the packages from the shell repo (leading number 12)

zypper --no-refresh se -ir 12 | awk '$1 ~ /^i/{print $3}'

bash
bash-completion
bash-doc
bash-lang
command-not-found
ksh
libreadline6
readline-doc
scout
zsh

Now capture/save that packages in an (bash) array named packages in our example.

mapfile -t packages < <(zypper --no-refresh se -ir 12 | awk '$1 ~ /^i/{print $3}')

Disable that shell repo (leading number 12).

zypper mr -d 12

Do a force reinstall of the packages that came from the OBS shell repo (leading number 12) to the standard openSUSE repo.

zypper in -f "${packages@]}"

This is just a simple case but you might have some more complicated cases that cherry picking packages one-by-one is needed and doing it manually.
Also some folks might have some better ideas. :wink:

Thanks very much jetchisel for the detailed reply! (Sorry for my delay in responding.)

Hi,

You are welcome.

So just to follow up on this thread. You can list package pattern and **patch **using the -t flag.

To list packages

zypper --no-refresh se -t package -ir #

To list patterns

zypper --no-refresh se -t pattern -ir #

To list patches

zypper --no-refresh se -t package -ir #

where # is the number 12 in the previous example. Adjust/add that modification to the awk code on the previous example and you should be fine.

So far only package and pattern can be force-reinstall ( at least on this side ). :slight_smile: