openSUSE / openSUSE/supportutils

`zypper se' output to see packages from no effective repo ???

Open
#246 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
35
Forks
70
Avg merge
5d 16h
Merged PRs (30d)
1

Description

I was solving a problem where a customer got installed a newer libgnutls30 (from newer SP); the name of the package is same but libgnutls.so.* requiring different library. It is it hard to see if a package is installed from current effective repo:

# querying a supportconfig
$ ag -G rpm --nofilename --nonumber --nocolor libgnutls
libgnutls30                         SUSE Linux Enterprise 15            3.8.3-150600.4.3.1
libgnutls30-32bit                   SUSE Linux Enterprise 15            3.6.7-150200.14.31.1
libgnutls30-3.8.3-150600.4.3.1.x86_64         Sun Feb 16 10:04:36 2025
libgnutls30-32bit-3.6.7-150200.14.31.1.x86_64 Sun Mar 17 09:46:45 2024
RSA/SHA256, Mon Oct 28 10:51:58 2024, Key ID 70af9e8139db7c82  SUSE LLC <https://www.suse.com/>     libgnutls30-3.8.3-150600.4.3.1
RSA/SHA256, Mon Feb 19 15:33:12 2024, Key ID 70af9e8139db7c82  SUSE LLC <https://www.suse.com/>     libgnutls30-32bit-3.6.7-150200.14.31.1

As you can see, there's no repo name; plus, we don't put really an SP identifier into RPM release tag; see here the list of packages on 15 SP3:

jb153qb02:~ # rpm -qa --queryformat "%-35{NAME} %-35{DISTRIBUTION} %{VERSION}-%{RELEASE}\n" | sort -k 1,2 -t " " -i | grep -- -150 | grep -i 'sl.*release'
SLES_SAP-release                    SUSE Linux Enterprise 15            15.3-150300.7.4.2
jb153qb02:~ # rpm -qa --queryformat "%-35{NAME} %-35{DISTRIBUTION} %{VERSION}-%{RELEASE}\n" | sort -k 1,2 -t " " -i | grep -- -150 | grep -v -- -1503 | head
augeas                              SUSE Linux Enterprise 15            1.10.1-150000.3.12.1
augeas-lenses                       SUSE Linux Enterprise 15            1.10.1-150000.3.12.1
autofs                              SUSE Linux Enterprise 15            5.1.3-150000.7.20.1
bash-completion                     SUSE Linux Enterprise 15            2.7-150000.4.9.1
binutils                            SUSE Linux Enterprise 15            2.43-150100.7.49.1
bubblewrap                          SUSE Linux Enterprise 15            0.4.1-150200.3.3.1
busybox-static                      SUSE Linux Enterprise 15            1.35.0-150000.4.20.1
ca-certificates-mozilla             SUSE Linux Enterprise 15            2.68-150200.33.1
cifs-utils                          SUSE Linux Enterprise 15            6.9-150100.5.18.1
clamav                              SUSE Linux Enterprise 15            0.103.12-150000.3.53.1

Thus, it might be good to have something like this in our supportconfig:

jb153qb02:~ # zypper --no-refresh se -s -i '*' | grep 'System Packages'
i+ | graphviz-gnome                                        | package | 2.40.1-6.12.1                                            | x86_64 | (System Packages)
i  | libgnutls30                                           | package | 3.8.3-150600.4.3.1                                       | x86_64 | (System Packages)
i  | release-notes-sles                                    | package | 15.3.20230301-150300.3.32.1                              | noarch | (System Packages)

An example:

# hack to install newer libgnutls30
jb153qb02:~ # rpm --nodeps -e libgnutls30
jb153qb02:~ # rpm --nodeps -ihvp /tmp/libgnutls30-3.8.3-150600.4.3.1.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:libgnutls30-3.8.3-150600.4.3.1   ################################# [100%]

# oops
jb153qb02:~ # readelf -d /usr/lib64/libgnutls.so.30.37.1 | grep nettle
 0x0000000000000001 (NEEDED)             Shared library: [libnettle.so.8]

jb153qb02:~ # ldd `which winbindd` | grep nettle
        libnettle.so.8 => not found


jb153qb02:~ # zypper --no-refresh se -s -i '*' | grep 'System Packages'
i+ | graphviz-gnome                                        | package | 2.40.1-6.12.1                                            | x86_64 | (System Packages)
i  | libgnutls30                                           | package | 3.8.3-150600.4.3.1                                       | x86_64 | (System Packages)
i  | release-notes-sles                                    | package | 15.3.20230301-150300.3.32.1                              | noarch | (System Packages)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the supportconfig code that gathers installed-package information and review how its zypper queries are assembled. Use the proposed zypper --no-refresh se -s -i '*' output as the reference; done means the report identifies installed packages from no effective repository, including the (System Packages) marker.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.