while(my ($package) = keys(%found_packages)) { delete($found_packages{$package}); # Ignore already handled packages next if (defined($checked_packages{$package})); $checked_packages{$package} = 1; # Find the zypper information of the OS package my $cmd = "$ZYPPER info $package"; my ($stdout, $stderr, $exit_status) = capture { system($cmd); }; if ($exit_status == 0 && $stdout =~ /^Repository\s*:\s*(\S+)\s*$/m) { my $repository_name = $1; if ($repository_name eq '@System') { if (defined($packages_href->{$repository_name})) { $packages_href->{$repository_name}{'packages'}{$package}++; } else { $packages_href->{$repository_name} = { 'packages' => { $package => 1 } }; } } else { if (defined($packages_href->{$repository_name})) { $packages_href->{$repository_name}{'packages'}{$package}++; } else { $cmd = "$ZYPPER repos -u $repository_name 2> $DEV_NULL"; ($stdout, $stderr, $exit_status) = capture { system($cmd); }; if ($exit_status) { print("Failed to find the information of the zypper repository: $repository_name"); } else { my $repository_alias = $1 if ($stdout =~ /^Alias\s*:\s*(\S+)\s*$/m); my $repository_uri = $1 if ($stdout =~ /^URI\s*:\s*(\S+)\s*$/m); if (is_empty_str($repository_alias) || is_empty_str($repository_uri)) { print("Failed to find the uri or alias of the zypper repository: $repository_name"); next; } $packages_href->{$repository_name} = { 'alias' => $repository_alias, 'uri' => $repository_uri, 'packages' => { $package => 1 } }; } } } } } #### $ /usr/bin/zypper info python-rpm-macros Mesa-libEGL1 libedit0 fontconfig-devel Loading repository data... Reading installed packages... Information for package python-rpm-macros: ------------------------------------------ Repository : prod-sdk12-sp5-pool-x86_64-hpc Name : python-rpm-macros Version : 20200207.5feb6c1-3.19.1 Arch : noarch Vendor : SUSE LLC Support Level : unknown Installed Size : 51.6 KiB Installed : Yes (automatically) Status : up-to-date Source package : python-rpm-macros-20200207.5feb6c1-3.19.1.src Summary : RPM macros for building of Python modules Description : This package contains SUSE RPM macros for Python build automation. You should BuildRequire this package unless you are sure that you are only building for distros newer than Leap 42.2 Information for package Mesa-libEGL1: ------------------------------------- Repository : prod-sp5-pool-x86_64-hpc Name : Mesa-libEGL1 Version : 18.3.2-14.3.2 Arch : x86_64 Vendor : SUSE LLC Support Level : unknown Installed Size : 196.9 KiB Installed : Yes (automatically) Status : up-to-date Source package : Mesa-18.3.2-14.3.2.src Summary : EGL API implementation Description : This package contains the EGL native platform graphics interface library. EGL provides a platform-agnostic mechanism for creating rendering surfaces for use with other graphics libraries, such as OpenGL|ES and OpenVG. This package contains modules to interface with the existing system GLX or DRI2 drivers to provide OpenGL via EGL. The Mesa main package provides drivers to provide hardware-accelerated OpenGL|ES and OpenVG support. Information for package libedit0: --------------------------------- Repository : prod-sp5-pool-x86_64-hpc Name : libedit0 Version : 3.1.snap20140620-1.13 Arch : x86_64 Vendor : SUSE LLC Support Level : unknown Installed Size : 248.8 KiB Installed : Yes (automatically) Status : up-to-date Source package : libedit-3.1.snap20140620-1.13.src Summary : Command Line Editing and History Library Description : libedit is a command line editing and history library. It is designed to be used by interactive programs that allow the user to type commands at a terminal prompt. Information for package fontconfig-devel: ----------------------------------------- Repository : prod-sdk12-sp5-pool-x86_64-hpc Name : fontconfig-devel Version : 2.11.1-7.1 Arch : x86_64 Vendor : SUSE LLC Support Level : unknown Installed Size : 896.1 KiB Installed : Yes (automatically) Status : up-to-date Source package : fontconfig-2.11.1-7.1.src Summary : Include Files and Libraries mandatory for Development Description : This package countains all include files, libraries, configuration files needed for compiling applications which use the fontconfig library. In addition, it contains extensive documentation and manual pages for developers using the library. Fontconfig is a library for configuring and customizing font access. It contains two essential modules, the configuration module which builds an internal configuration from XML files and the matching module which accepts font patterns and returns the nearest matching font.