I use six added openSUSE repos in 15.3, These are science, education, electronics, games, graphics, and application/geo. I have installed many packages from them (probably about 100). I want to avoid reloading all of these packages after the upgrade but I am not confident that the online upgrade process will be handled properly for these “extra” repos. Amongst other things, the formatting scheme of the URL names for the repos is different between 15.3 and 15.4 repos making releasever scheme not workable.
I need someone more proficient with zypper than me to layout a cli command to list packages installed from a selected repo. I can make six lists. I can keep those lists and use them for reinstall if needed.
In the Status column the search command distinguishes between user installed packages (i+) and automatically installed packages (i).
…
The v status is only shown if the version or the repository matters (see --details or --repo), and the installed instance differs from the one listed in version or repository.
Apparently zypper search -ir will only list packages installed by the user or the system (e.g., a needed dependency or part of a installation pattern), while [FONT=monospace]zypper pa -ir will list all installed packages listed in the repo, even if they came from another repo (v flag). Here I have, for the KDE:Extra repo (#2 in my repo list):
[/FONT]
[FONT=monospace][FONT=monospace]**#** LANG=C zypper pa -ir 2
Loading repository data...
Reading installed packages...
S | Repository | Name | Version | Arch
---+------------+--------------------------------------+--------------------------------------------+-------
v | KDE:Extra | calligra-extras-filemanagertemplates | 3.2.1-lp153.202.1 | x86_64
v | KDE:Extra | kcm_tablet | 3.2.0-lp153.28.3 | x86_64
v | KDE:Extra | kcm_tablet-lang | 3.2.0-lp153.28.3 | noarch
i+ | KDE:Extra | knemo | 0.7.7git.20191016T164055~e5a3984-lp153.4.5 | x86_64
i+ | KDE:Extra | knemo-lang | 0.7.7git.20191016T164055~e5a3984-lp153.4.5 | noarch
v | KDE:Extra | kpeoplevcard | 0.1-lp153.6.4 | x86_64
v | KDE:Extra | krename | 5.0.1-lp153.42.4 | x86_64
v | KDE:Extra | kuserfeedback-imports | 1.2.0-lp153.6.1 | x86_64
v | KDE:Extra | kuserfeedback-lang | 1.2.0-lp153.6.1 | noarch
v | KDE:Extra | libepub0 | 0.2.2-lp153.15.5 | x86_64
v | KDE:Extra | libkasten-lang | 0.26.9-lp153.11.1 | noarch
v | KDE:Extra | libKasten4 | 0.26.9-lp153.11.1 | x86_64
v | KDE:Extra | libKF5MediaWiki5 | 5.37.0-lp153.11.3 | x86_64
v | KDE:Extra | libKF5PulseAudioQt2 | 1.2-lp153.11.2 | x86_64
v | KDE:Extra | libKUserFeedbackCore1 | 1.2.0-lp153.6.1 | x86_64
v | KDE:Extra | libKUserFeedbackWidgets1 | 1.2.0-lp153.6.1 | x86_64
v | KDE:Extra | libokteta-lang | 0.26.9-lp153.11.1 | noarch
v | KDE:Extra | libOkteta3 | 0.26.9-lp153.11.1 | x86_64
v | KDE:Extra | okteta | 0.26.9-lp153.11.1 | x86_64
v | KDE:Extra | okteta-data | 0.26.9-lp153.11.1 | noarch
v | KDE:Extra | okteta-lang | 0.26.9-lp153.11.1 | noarch
i+ | KDE:Extra | tellico | 3.4.4-lp153.85.2 | x86_64
i+ | KDE:Extra | tellico-lang | 3.4.4-lp153.85.2 | noarch
**#** LANG=C zypper search -ir 2
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+--------------+----------------------------------+--------
i+ | knemo | The KDE Network Monitor | package
i+ | knemo-lang | Translations for package knemo | package
i+ | tellico | A Collection Manager | package
i+ | tellico-lang | Translations for package tellico | package
**#**
[/FONT][/FONT]
[FONT=monospace]
[/FONT][FONT=monospace]So, for instance, okteta was installed form the main update repo, hence the v flag. knemo and tellico were explicitly installed by me, hence the i+ flag.
When I try that with | wc -l appended, I get 2098 (only 6 of which are patterns). rpm -qa | wc -l only produces 1988. Minus the 5 “overhead” lines in zypper output, that’s 105 packages more found by zypper. Can anyone suggest why such a big difference? :\
Well, counting the lines in the results of the two commands is the first (not very meaningful) step to compare the two results.
If there is any difference the next step definitely must be to compare the two outputs line by line what by the way is actually the only really meaningful compare.
However without looking at the two actual outputs it is impossible to analyze that any further.
While by convention packages that define patters are named with patterns- prefix, this is not mandatory. Patterns (including pattern names themselves) are defined by specific package properties, not by package names. So it is entirely possible to have patterns not following these conventions. Also I am not sure that pattern dependencies map one-to-one into RPM dependencies, so it is still better to install patterns as patterns, not their “container” packages.
And in the past patterns were defined in separate repository metadata, not using packages. Such patterns will not be listed by rpm. It is still possible to have repository with this “old style” information.
Ahhh,… again something i did not know. Thank you for this information.
So it is (more or less) “pure luck” that on my system
# zypper se -i -t pattern
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+---------------+---------------------------------------+--------
i+ | base | Base System | pattern
i+ | enhanced_base | Enhanced Base System | pattern
i+ | kde | KDE Applications and Plasma 5 Desktop | pattern
i | kde_plasma | KDE Plasma 5 Desktop Base | pattern
i | minimal_base | Minimal Appliance Base | pattern
i+ | x11 | X Window System | pattern
i+ | x11_yast | YaST User Interfaces | pattern
i+ | yast2_basis | YaST Base Utilities | pattern
#