Skip to content

Commit 730f9c3

Browse files
authored
Merge pull request #1328 from yast/sysimage-rpm-path
save_y2logs: rpm-qa was missing because we used an old RPM DB path (bsc#1254914)
2 parents 94119f8 + 6bccd91 commit 730f9c3

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

package/yast2.changes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
-------------------------------------------------------------------
2+
Tue Jan 6 13:29:03 UTC 2026 - Martin Vidner <mvidner@suse.com>
3+
4+
- save_y2logs: Do not use the legacy /var/lib/rpm database path
5+
(bsc#1254914)
6+
- 5.0.18
7+
18
-------------------------------------------------------------------
29
Thu Oct 16 07:44:28 UTC 2025 - Stefan Schubert <schubi@suse.de>
310

package/yast2.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
Name: yast2
20-
Version: 5.0.17
20+
Version: 5.0.18
2121

2222
Release: 0
2323
Summary: YaST2 Main Package

scripts/save_y2logs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ else
6464
fi
6565

6666
# check for compression program
67-
if [ "$COMPRESSION" -a -z "$(type -p $COMPRESSION)" ]; then
67+
if [ "$COMPRESSION" ] && [ -z "$(type -p $COMPRESSION)" ]; then
6868
echo "FATAL: $COMPRESSION not available" >&2
6969
exit 3
7070
fi
@@ -118,11 +118,16 @@ if [ -f /mnt/var/log/pbl.log ]; then
118118
fi
119119

120120
# installed packages
121-
if [ -f /var/lib/rpm/Packages -o -f /var/lib/rpm/Packages.db ] && [ "$(type -p rpm)" ]; then
122-
rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}\t\t\t(%{VENDOR})\t%{DISTRIBUTION}\n' 2>/dev/null | sort >/$TMPDIR/rpm-qa
123-
LIST_TMP="$LIST_TMP rpm-qa"
121+
if [ "$(type -p rpm)" ]; then
122+
RPM_DBPATH=$(rpm --eval "%{_dbpath}")
123+
if [ -f "$RPM_DBPATH"/Packages.db ] ||
124+
[ -f "$RPM_DBPATH"/Packages ]; then
125+
rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}\t\t\t(%{VENDOR})\t%{DISTRIBUTION}\n' | sort >$TMPDIR/rpm-qa
126+
LIST_TMP="$LIST_TMP rpm-qa"
127+
fi
124128
fi
125129

130+
126131
# rename, so people can see it
127132
if [ -f /.packages.root ]; then
128133
cp /.packages.root $TMPDIR/_packages.root

0 commit comments

Comments
 (0)