-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2021-12-27 at 11:31 +0100, Bjoern Voigt wrote:
Rpm can report any tag. What above something similar to $ rpm -q -a --queryformat '%{VENDOR} | %{NAME} | %{VERSION}\n'
To see all tags:
$ rpm --querytags
The problem I see is that hardware/driver specific packages may need to be filtered out. I also use such a command to export or backup my RPM package list. This is my
Michael Hamilton wrote: script:
#! /bin/sh
BACKUP_DIR=/var/adm/backup/$(hostname) HEADER="DISTRIBUTION\tVENDOR\tGROUP\tNAME\tVERSION" QUERYFORMAT="%{DISTRIBUTION}\t%{VENDOR}\t%{GROUP}\t%{NAME}\t%{VERSION}\n"
mkdir -pv "$BACKUP_DIR" echo -e "$HEADER" > "$BACKUP_DIR"/rpm-qa.txt rpm -qa --queryformat "$QUERYFORMAT" | sort -t" " -k1,1 -k2,2 -k3,3 -k4,4 -k5,5V >> "$BACKUP_DIR"/rpm-qa.txt
Ah. Tried it. DISTRIBUTION VENDOR GROUP NAME VERSION openSUSE Leap 15.2 openSUSE Unspecified wallpaper-branding-openSUSE 15.2.20200203 openSUSE Leap 15.2 openSUSE Unspecified wpa_supplicant 2.9 openSUSE Leap 15.2 openSUSE Unspecified yast2-qt-branding-openSUSE 15.2.20200203 openSUSE Leap 15.2 openSUSE Unspecified zlib-devel 1.2.11 openSUSE Leap 42.3 openSUSE Development/Libraries/Other libmysqlclient18 10.0.35 openSUSE:Leap:15.2:NonFree openSUSE Productivity/Archiving/Compression unrar 5.9.3 openSUSE:Leap:15.2:NonFree openSUSE Productivity/Graphics/Other AdobeICCProfiles 2.0 openSUSE:Leap:15.2:NonFree openSUSE Productivity/Graphics/Viewers xv 3.10a openSUSE:Leap:15.2:NonFree openSUSE Unspecified iozone 3.488 science / openSUSE_Leap_15.2 obs://build.opensuse.org/science Development/Tools/Other pocl 1.5 science / openSUSE_Leap_15.2 obs://build.opensuse.org/science Productivity/Clustering/Computing hpcc-openmpi 1.4.3 science / openSUSE_Leap_15.2 obs://build.opensuse.org/science System/Libraries libopencv3_4 3.4.16 science / openSUSE_Leap_15.2 obs://build.opensuse.org/science System/Libraries libpocl2 1.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Debug libassuan-debugsource2.5.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Debug libassuan0-debuginfo2.5.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Libraries/C and C++ libassuan0 2.5.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Libraries/C and C++ libassuan-devel 2.5.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Libraries/C and C++ pkcs11-helper1.25.1 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Libraries/Perl perl-pcsc 1.4.14 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Productivity/Security opensc 0.22.0 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Productivity/Security pcsc-lite 1.9.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard System/Libraries libopenct1 0.6.20 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard System/Libraries libpcsclite1 1.9.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard System/Libraries libpkcs11-helper1 1.25.1 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard System/Management pcsc-tools 1.5.8 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Development/Libraries/Perl perl-Authen-NTLM 1.09 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Development/Libraries/Perl perl-JSON-WebToken 0.10 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Development/Libraries/Perl perl-Object-Realize-Later 0.21 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Development/Libraries/Perl perl-User-Identity 1.00 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Productivity/Networking/Email/Clients alpine 2.25 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Productivity/Networking/Email/Utilities imapsync 1.977 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Productivity/Networking/Email/Utilities mairix 0.24 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities Documentation/SUSE pin 0.40 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities Productivity/File utilities duff 0.5 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities Productivity/Text/Utilities most pre5.2 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities System/Console dog 1.7 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities System/Packages opi 2.4.2 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities Unspecified ncdu 1.16 Sometimes, the vendor is directly the repository name, this did not happen before. I'm confused by your sort command, what does it do?
Markus Egg wrote:
So what would be the best way to keep the software on laptop and desktop machine in sync? The problem is, that it is difficult or impossible to restore a package list with an exact package status from a saved package list.
The idea for restoring is to install packages from each repository separately. If you for instance want to install "subversion" from repository "devel:tools:scm:svn" with
zypper install --from devel:tools:scm:svn subversion
then also the dependencies of subversion are installed from "devel:tools:scm:svn". But this may not result in exactly the same package state as in the saved list.
No, for that you add "--nodeps". Huh, no, that option is for rpm. Then, something similar :-? - -- Cheers, Carlos E. R. (from openSUSE 15.2 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCYcmc0xwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVeTwAni1e+IfFt2XTzoDHYnTU C4ryIhKZAJ9JRf6Q7/Apf0UfPtk/P3cogyMRzQ== =EBHK -----END PGP SIGNATURE-----