Message ID | 20221217045738.643519-1-marex@denx.de |
---|---|
State | Accepted, archived |
Commit | bf2096a43d56c2d633a4b6e3db9e4390da4be6e2 |
Headers | show |
Series | package_rpm: Fix Linux 6.1.0 perf 1.0 version mistranslation | expand |
diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass index 81a2060b68..39efcc328e 100644 --- a/meta/classes-global/package_rpm.bbclass +++ b/meta/classes-global/package_rpm.bbclass @@ -159,7 +159,9 @@ python write_specfile () { pv = subd['PV'] pkgv = subd['PKGV'] reppv = pkgv.replace('-', '+') - ver = ver.replace(pv, reppv).replace(pkgv, reppv) + if ver.startswith(pv): + ver = ver.replace(pv, reppv) + ver = ver.replace(pkgv, reppv) if 'PKGR' in subd: # Make sure PKGR rather than PR in ver pr = '-' + subd['PR']