Re: [Rpm-maint] [rpm-software-management/rpm] Unexpected behavior when using -q --queryformat in %pre scriplet (#1331)

2020-08-13 Thread Ivan Dzikovsky
Thank you, and sorry for wrong bug report. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1331#issuecomment-673523429___

[Rpm-maint] [rpm-software-management/rpm] Unexpected behavior when using -q --queryformat in %pre scriplet (#1331)

2020-08-13 Thread Ivan Dzikovsky
I need to backup some conf files of my package during upgrade into directory called e.g `/mypackage-`. So I'm trying to get old package version in `%pre` scriplet and doing it in the following way: ``` %pre VERS=$(rpm --queryformat='%{VERSION}' -q mypackage) VERS_ALTERNATIVE=$(rpm -qi mypackage