[opensuse-factory] Zypper: list packages installed from a repository?
So far I've got "zypper se -is .* | grep <repository>", e.g.:
zypper se -is .* | grep Hardware
i+ | android-tools | package | 5.1.1_r8-31.28
| x86_64 | Hardware-Tumbleweed
i+ | heimdall | package | 1.4.2-1.5
| x86_64 | Hardware-Tumbleweed
i+ | heimdall-frontend | package | 1.4.2-1.5
| x86_64 | Hardware-Tumbleweed
It works well if the repository name is unique to the whole list; helpful even
if it's not. But I'm wondering if I'm missing a way for zypper to do it
directly.
List all sources of a package: "zypper se -s <package> | grep ^[iv]"
Same caveat, but it often won't be a clean list.
Are there any other zypper tricks I should know?
--
Tom Hardy
zypper lr zypper se -i -r <number of repo> On 2017-12-05 12:39, Tom Hardy wrote:
So far I've got "zypper se -is .* | grep <repository>", e.g.:
zypper se -is .* | grep Hardware i+ | android-tools | package | 5.1.1_r8-31.28 | x86_64 | Hardware-Tumbleweed i+ | heimdall | package | 1.4.2-1.5 | x86_64 | Hardware-Tumbleweed i+ | heimdall-frontend | package | 1.4.2-1.5 | x86_64 | Hardware-Tumbleweed
It works well if the repository name is unique to the whole list; helpful even if it's not. But I'm wondering if I'm missing a way for zypper to do it directly.
List all sources of a package: "zypper se -s <package> | grep ^[iv]"
Same caveat, but it often won't be a clean list.
Are there any other zypper tricks I should know?
-- Tom Hardy
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Tom Hardy composed on 2017-12-04 20:39 (UTC-0600):
So far I've got "zypper se -is .* | grep <repository>", e.g.:
zypper se -is .* | grep Hardware i+ | android-tools | package | 5.1.1_r8-31.28 | x86_64 | Hardware-Tumbleweed i+ | heimdall | package | 1.4.2-1.5 | x86_64 | Hardware-Tumbleweed i+ | heimdall-frontend | package | 1.4.2-1.5 | x86_64 | Hardware-Tumbleweed
It works well if the repository name is unique to the whole list; helpful even if it's not. But I'm wondering if I'm missing a way for zypper to do it directly.
List all sources of a package: "zypper se -s <package> | grep ^[iv]"
Same caveat, but it often won't be a clean list.
# zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository ---+--------------------------+---------+---------------------+--------+----------- i+ | kde3-cpuinfo | package | 0.5.2-5.60 | x86_64 | KDE3 i+ | kde3-digikam | package | 0.9.6-51.2 | x86_64 | KDE3 i+ | kde3-digikam-lang | package | 0.9.6-51.2 | noarch | KDE3 i+ | kde3-gtk-qt-engine | package | 0.8svn20071009-52.1 | x86_64 | KDE3 i+ | kde3-gwenview | package | 1.4.2-149.50 | x86_64 | KDE3 i+ | kde3-gwenview-lang | package | 1.4.2-149.50 | noarch | KDE3 i+ | kde3-k3b | package | 1.0.5-67.51 | x86_64 | KDE3 i+ | kde3-k3b-lang | package | 1.0.5-67.51 | noarch | KDE3 i+ | kde3-kio_iso | package | 1.90.0-17.59 | x86_64 | KDE3 i+ | kde3-kipi-plugins | package | 0.1.6-40.2 | x86_64 | KDE3 i+ | kde3-kipi-plugins-lang | package | 0.1.6-40.2 | noarch | KDE3 i | kde3-koffice | package | 1.6.3-324.1 | x86_64 | KDE3 i | kde3-koffice-database | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-koffice-spreadsheet | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-oxygen-icon-theme | package | 4.0-1.1 | noarch | KDE3 # zypper --no-refresh se -s -r Libdvdcss Building repository 'Libdvdcss' cache ...........................................................................[done] Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository ---+-----------------------+------------+-----------+--------+----------- | libdvdcss | srcpackage | 1.4.0-1.1 | noarch | Libdvdcss | libdvdcss-debugsource | package | 1.4.0-1.1 | x86_64 | Libdvdcss | libdvdcss-devel | package | 1.4.0-1.1 | x86_64 | Libdvdcss i+ | libdvdcss2 | package | 1.4.0-1.1 | x86_64 | Libdvdcss | libdvdcss2-debuginfo | package | 1.4.0-1.1 | x86_64 | Libdvdcss
Are there any other zypper tricks I should know?
I put scripts for my most used combinations in /usr/local/bin, e.g. zypsei (installed) zypseo (System Packages) -- "Wisdom is supreme; therefore get wisdom. Whatever else you get, get wisdom." Proverbs 4:7 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
I put scripts for my most used combinations in /usr/local/bin, e.g.
zypsei (installed) zypseo (System Packages)
...or use alias: alias zapper="zypper -no-allow-vendor-change -l" -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Axel Braun composed on 2017-12-05 09:55 (UTC+0100):
I put scripts for my most used combinations in /usr/local/bin, e.g.
zypsei (installed) zypseo (System Packages)
...or use alias: alias zapper="zypper -no-allow-vendor-change -l"
That was my original idea years ago, but scripting I got to work as intended for all my common combinations, e.g.: #!/bin/sh # zypse zypper --no-refresh se -s $* | egrep -v 'debug|devel|srcp|openSUSE-20' | egrep 'x86|noarch'| sort -- "Wisdom is supreme; therefore get wisdom. Whatever else you get, get wisdom." Proverbs 4:7 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2017-12-04 at 22:31 -0500, Felix Miata wrote:
Tom Hardy composed on 2017-12-04 20:39 (UTC-0600):
So far I've got "zypper se -is .* | grep <repository>", e.g.:
zypper se -is .* | grep Hardware i+ | android-tools | package | 5.1.1_r8-31.28 | x86_64 | Hardware-Tumbleweed i+ | heimdall | package | 1.4.2-1.5 | x86_64 | Hardware-Tumbleweed i+ | heimdall-frontend | package | 1.4.2-1.5 | x86_64 | Hardware-Tumbleweed
It works well if the repository name is unique to the whole list; helpful even if it's not. But I'm wondering if I'm missing a way for zypper to do it directly.
List all sources of a package: "zypper se -s <package> | grep ^[iv]"
Same caveat, but it often won't be a clean list.
# zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages...
S | Name | Type | Version | Arch | Repository ---+--------------------------+---------+---------------------+--------+----------- i+ | kde3-cpuinfo | package | 0.5.2-5.60 | x86_64 | KDE3 i+ | kde3-digikam | package | 0.9.6-51.2 | x86_64 | KDE3 i+ | kde3-digikam-lang | package | 0.9.6-51.2 | noarch | KDE3 i+ | kde3-gtk-qt-engine | package | 0.8svn20071009-52.1 | x86_64 | KDE3 i+ | kde3-gwenview | package | 1.4.2-149.50 | x86_64 | KDE3 i+ | kde3-gwenview-lang | package | 1.4.2-149.50 | noarch | KDE3 i+ | kde3-k3b | package | 1.0.5-67.51 | x86_64 | KDE3 i+ | kde3-k3b-lang | package | 1.0.5-67.51 | noarch | KDE3 i+ | kde3-kio_iso | package | 1.90.0-17.59 | x86_64 | KDE3 i+ | kde3-kipi-plugins | package | 0.1.6-40.2 | x86_64 | KDE3 i+ | kde3-kipi-plugins-lang | package | 0.1.6-40.2 | noarch | KDE3 i | kde3-koffice | package | 1.6.3-324.1 | x86_64 | KDE3 i | kde3-koffice-database | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-koffice-spreadsheet | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-oxygen-icon-theme | package | 4.0-1.1 | noarch | KDE3
Interesting. I see possible to edit the list a bit and import in LibreOffice calc. Would it be possible to generate the package list (with version, repository, etc) but separated with commas, no spaces? - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlomg+AACgkQtTMYHG2NR9XVdACcC2YhIpMjkXe8Q6kzqWYSGkK5 2eYAn38iCDwIdjIkXS64/4SQO+nAek94 =DrH2 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tue, 05 Dec 2017, 12:32:41 +0100, Carlos E. R. wrote:
On Monday, 2017-12-04 at 22:31 -0500, Felix Miata wrote:
[...] # zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages...
S | Name | Type | Version | Arch | Repository ---+--------------------------+---------+---------------------+--------+----------- i+ | kde3-cpuinfo | package | 0.5.2-5.60 | x86_64 | KDE3 i+ | kde3-digikam | package | 0.9.6-51.2 | x86_64 | KDE3 i+ | kde3-digikam-lang | package | 0.9.6-51.2 | noarch | KDE3 i+ | kde3-gtk-qt-engine | package | 0.8svn20071009-52.1 | x86_64 | KDE3 i+ | kde3-gwenview | package | 1.4.2-149.50 | x86_64 | KDE3 i+ | kde3-gwenview-lang | package | 1.4.2-149.50 | noarch | KDE3 i+ | kde3-k3b | package | 1.0.5-67.51 | x86_64 | KDE3 i+ | kde3-k3b-lang | package | 1.0.5-67.51 | noarch | KDE3 i+ | kde3-kio_iso | package | 1.90.0-17.59 | x86_64 | KDE3 i+ | kde3-kipi-plugins | package | 0.1.6-40.2 | x86_64 | KDE3 i+ | kde3-kipi-plugins-lang | package | 0.1.6-40.2 | noarch | KDE3 i | kde3-koffice | package | 1.6.3-324.1 | x86_64 | KDE3 i | kde3-koffice-database | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-koffice-spreadsheet | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-oxygen-icon-theme | package | 4.0-1.1 | noarch | KDE3
Interesting. I see possible to edit the list a bit and import in LibreOffice calc.
Would it be possible to generate the package list (with version, repository, etc) but separated with commas, no spaces?
ever heard about "sed" or "awk"? You define the wanted layout and use said tools to assemble this output to your wanted layout.
Cheers, Carlos E. R.
Cheers. l8er manfred
Carlos E. R. [05.12.2017 12:32]:
# zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages...
S | Name | Type | Version | Arch | Repository ---+--------------------------+---------+---------------------+--------+----------- i+ | kde3-cpuinfo | package | 0.5.2-5.60 | x86_64 | KDE3 i+ | kde3-digikam | package | 0.9.6-51.2 | x86_64 | KDE3 i+ | kde3-digikam-lang | package | 0.9.6-51.2 | noarch | KDE3 i+ | kde3-gtk-qt-engine | package | 0.8svn20071009-52.1 | x86_64 | KDE3 i+ | kde3-gwenview | package | 1.4.2-149.50 | x86_64 | KDE3 i+ | kde3-gwenview-lang | package | 1.4.2-149.50 | noarch | KDE3 i+ | kde3-k3b | package | 1.0.5-67.51 | x86_64 | KDE3 i+ | kde3-k3b-lang | package | 1.0.5-67.51 | noarch | KDE3 i+ | kde3-kio_iso | package | 1.90.0-17.59 | x86_64 | KDE3 i+ | kde3-kipi-plugins | package | 0.1.6-40.2 | x86_64 | KDE3 i+ | kde3-kipi-plugins-lang | package | 0.1.6-40.2 | noarch | KDE3 i | kde3-koffice | package | 1.6.3-324.1 | x86_64 | KDE3 i | kde3-koffice-database | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-koffice-spreadsheet | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-oxygen-icon-theme | package | 4.0-1.1 | noarch | KDE3
Interesting. I see possible to edit the list a bit and import in LibreOffice calc.
Would it be possible to generate the package list (with version, repository, etc) but separated with commas, no spaces?
Maybe some of the global options -x (--xmlout) or -t (--terse) can help you? The "terse" option is described as "Terse output for machine consumption.". Well, for my eyes there is no difference using --terse and not using it. Werner --
Op dinsdag 5 december 2017 12:32:41 CET schreef Carlos E. R.:
On Monday, 2017-12-04 at 22:31 -0500, Felix Miata wrote:
Tom Hardy composed on 2017-12-04 20:39 (UTC-0600):
So far I've got "zypper se -is .* | grep <repository>", e.g.:
zypper se -is .* | grep Hardware i+ | android-tools | package | 5.1.1_r8-31.28>> | x86_64 | Hardware-Tumbleweed
i+ | heimdall | package | 1.4.2-1.5
| x86_64 | Hardware-Tumbleweed
i+ | heimdall-frontend | package | 1.4.2-1.5
| x86_64 | Hardware-Tumbleweed
It works well if the repository name is unique to the whole list; helpful even if it's not. But I'm wondering if I'm missing a way for zypper to do it directly.
List all sources of a package: "zypper se -s <package> | grep ^[iv]"
Same caveat, but it often won't be a clean list.
# zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages...
S | Name | Type | Version | Arch | Repository ---+--------------------------+---------+---------------------+--------+- ---------- i+ | kde3-cpuinfo | package | 0.5.2-5.60 | x86_64 | KDE3 i+ | kde3-digikam | package | 0.9.6-51.2 | x86_64 | KDE3 i+ | kde3-digikam-lang | package | 0.9.6-51.2 | noarch | KDE3 i+ | kde3-gtk-qt-engine | package | 0.8svn20071009-52.1 | x86_64 | KDE3 i+ | kde3-gwenview | package | 1.4.2-149.50 | x86_64 | KDE3 i+ | kde3-gwenview-lang | package | 1.4.2-149.50 | noarch | KDE3 i+ | kde3-k3b | package | 1.0.5-67.51 | x86_64 | KDE3 i+ | kde3-k3b-lang | package | 1.0.5-67.51 | noarch | KDE3 i+ | kde3-kio_iso | package | 1.90.0-17.59 | x86_64 | KDE3 i+ | kde3-kipi-plugins | package | 0.1.6-40.2 | x86_64 | KDE3 i+ | kde3-kipi-plugins-lang | package | 0.1.6-40.2 | noarch | KDE3 i | kde3-koffice | package | 1.6.3-324.1 | x86_64 | KDE3 i | kde3-koffice-database | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-koffice-spreadsheet | package | 1.6.3-324.1 | x86_64 | KDE3 i+ | kde3-oxygen-icon-theme | package | 4.0-1.1 | noarch | KDE3 Interesting. I see possible to edit the list a bit and import in LibreOffice calc.
Would it be possible to generate the package list (with version, repository, etc) but separated with commas, no spaces?
-- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) Next to the other options mentioned, why not use the pipe char as the field separator in Calc?
-- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2017-12-05 at 14:15 +0100, Knurpht - Gertjan Lettink wrote:
Op dinsdag 5 december 2017 12:32:41 CET schreef Carlos E. R.:
On Monday, 2017-12-04 at 22:31 -0500, Felix Miata wrote:
# zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages...
...
Interesting. I see possible to edit the list a bit and import in LibreOffice calc.
Would it be possible to generate the package list (with version, repository, etc) but separated with commas, no spaces?
Next to the other options mentioned, why not use the pipe char as the field separator in Calc?
Yes, that's what I do, certainly. But there are spaces. The --terse global option, as Werner Flamme says, doesn't help: cer@Telcontar:~> zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository - ---+-------------------+---------+-------------+--------+-------------- i+ | kde3-i18n-es | package | 3.5.10-66.3 | noarch | OBS: KDE:KDE3 i+ | kde3-i18n-es-base | package | 3.5.10-66.3 | noarch | OBS: KDE:KDE3 cer@Telcontar:~> cer@Telcontar:~> zypper --terse --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository - ---+-------------------+---------+-------------+--------+-------------- i+ | kde3-i18n-es | package | 3.5.10-66.3 | noarch | OBS: KDE:KDE3 i+ | kde3-i18n-es-base | package | 3.5.10-66.3 | noarch | OBS: KDE:KDE3 cer@Telcontar:~> The "--xmlout" does change the output, but it is not for me, I think: cer@Telcontar:~> zypper --xmlout --no-refresh se -s -i KDE3 <?xml version='1.0'?> <stream> <message type="info">Loading repository data...</message> <message type="info">Reading installed packages...</message> <search-result version="0.0"> <solvable-list> <solvable status="installed" name="kde3-i18n-es" kind="package" edition="3.5.10-66.3" arch="noarch" repository="OBS: KDE:KDE3"/> <solvable status="installed" name="kde3-i18n-es-base" kind="package" edition="3.5.10-66.3" arch="noarch" repository="OBS: KDE:KDE3"/> </solvable-list> </search-result> </stream> cer@Telcontar:~> - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlomp34ACgkQtTMYHG2NR9W/FwCfREAOLL9KkN2LlztODi/6CF/i +1gAni8EBFg4jKOgZHdE4VTIg6Xmc9mP =9Tp9 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 05/12/17 15:04, Carlos E. R. wrote:
On Tuesday, 2017-12-05 at 14:15 +0100, Knurpht - Gertjan Lettink wrote:
Op dinsdag 5 december 2017 12:32:41 CET schreef Carlos E. R.:
On Monday, 2017-12-04 at 22:31 -0500, Felix Miata wrote:
# zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages...
...
Interesting. I see possible to edit the list a bit and import in LibreOffice calc.
Would it be possible to generate the package list (with version, repository, etc) but separated with commas, no spaces?
The needed sed pattern is quite simple: zypper --no-refresh se -s -i KDE3 | sed 's/ *| */,/g' Juergen -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2017-12-05 at 15:20 +0100, Juergen Gross wrote:
On 05/12/17 15:04, Carlos E. R. wrote:
# zypper --no-refresh se -s -i KDE3 Loading repository data... Reading installed packages...
...
Interesting. I see possible to edit the list a bit and import in LibreOffice calc.
Would it be possible to generate the package list (with version, repository, etc) but separated with commas, no spaces?
The needed sed pattern is quite simple:
zypper --no-refresh se -s -i KDE3 | sed 's/ *| */,/g'
Wow, thanks! I'm not fluent with sed. - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlomt4oACgkQtTMYHG2NR9WMuQCeKNg263PPofdVrv9Qc5jGqbRP WOwAnjuAL23IaruE5phffa3MrcZIV4Rl =8oji -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Thanks to all. I had somehow overthought the "sources of a package" option, convinced myself the -r option would never work for anything. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (9)
-
Axel Braun
-
Carlos E. R.
-
Felix Miata
-
Juergen Gross
-
Knurpht - Gertjan Lettink
-
Konstantin Voinov
-
Manfred Hollstein
-
Tom Hardy
-
Werner Flamme