dnf5 icon indicating copy to clipboard operation
dnf5 copied to clipboard

Unify epoch usage in DNF5

Open j-mracek opened this issue 1 year ago • 5 comments

Epoch is not handled consistently in DNF, DNF5, RPM

RPM does not show 0 epoch for rpm -q B

RPM shows 0 epoch rpm -q B --qf "%{name}-%{evr}\n" when Epoch: 0` in in spec.

rpmbuild does not add epoch to rpm file name.

DNF/DNF5 and command repoquery always shows 0 epoch.

DNF/DNF5 transaction table does not show 0 epoch.

DNF transaction summary does not show 0 epoch.

DNF history info does not show 0 epoch for transaction packages.

DNF5 history info shows 0 epoch for transaction packages.

DNF5 and Package.to_string() returns optional epoch as well as Python binding str(Package)

DNF5 uses full NEVRA in scriptlets: Running trigger-install scriptlet: man-db-0:2.11.2-2.fc38.x86_64

Createrepo_c always adds 0 epoch to metadata

Originally posted by @j-mracek in https://github.com/rpm-software-management/dnf5/pull/1092#discussion_r1447308700

j-mracek avatar Jan 15 '24 09:01 j-mracek

We should just always show Epoch: 0 when %EPOCH is null or zero.

Conan-Kudo avatar Jan 15 '24 12:01 Conan-Kudo

I also vote for always showing the epoch.

kontura avatar Jan 15 '24 12:01 kontura

Note that createrepo also coerces this to zero, so we would be consistent with that.

Conan-Kudo avatar Jan 15 '24 19:01 Conan-Kudo

Note that createrepo also coerces this to zero, so we would be consistent with that.

I forget to mention that in the issue description. Thank you.

j-mracek avatar Jan 16 '24 11:01 j-mracek

This really should be prioritized, it screws with API consumers too, see: https://github.com/rpm-software-management/dnf5/issues/1359 from @anaselli

Conan-Kudo avatar Mar 30 '24 17:03 Conan-Kudo