View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0017801||CentOS-8||dnf||public||2020-10-14 15:13||2020-10-14 15:13|
|Target Version||Fixed in Version|
|Summary||0017801: dnf reinstall does not replace existing files|
|Description||Wanting to restore the factory settings for the standard CentOS-Stream repositories, I performed a|
dnf reinstall centos-stream-repos
Dnf found the wanted package and claimed to (re)install it successfully, but none of my modified versions of the packaged files were replaced, nor were any corresponding .rpmnew files dropped on the system. For example, both before and after the reinstallation, "rpm --verify" recognized that there were differences between the size and md5 of file /etc/yum.repos.d/CentOS-Stream-Extras.repo on the filesystem and those recorded in its RPM metadata, and a content difference was readily recognizable from inspection of the file. On the other hand, when I deleted that file and then performed the same "dnf reinstall" command, the factory version was correctly installed.
For most other packages I might try to work around the problem by performing a package removal followed by a fresh install, but that would be problematic in this case because removing the package in question would break my ability to subsequently install it again.
|Steps To Reproduce||(For example:)|
1. Modify /etc/yum.repos.d/CentOS-Stream-Extras.repo by changing "enabled=1" to "enabled=0".
2. Confirm that a difference is recognized by rpm via "rpm --verify centos-stream-repos" (that program will output a line describing differences in that file's metadata). This also establishes that the file used in this example belongs to the designated package.
3. Perform a "dnf reinstall -y centos-stream-repos", and observe that it succeeds.
4. Examine /etc/yum.repos.d/CentOS-Stream-Extras.repo to see that the change is still present.
5. Confirm via "rpm --verify centos-stream-repos" that the file in question still belongs to the designated package, and that its metadata still differ.
6. Confirm via "ls /etc/yum.repos.d" that no /etc/yum.repos.d/CentOS-Stream-Extras.repo.rpmnew file has been created.