I made a local CentOS 7 repository (here) with custom packages built and it is working fine, the problem is in yum update
. When I update the source of an RPM package, I either increase the epoch or the version number so yum detects its an update, I copy the new RPM package to the repo directory and on a client PC I do yum install
or yum update
to install/update the package and yum returns with error "No more mirrors to try" or something like that. The only way to make it work again is to recreate the local repo from scratch. So the question is, how do I properly update an RPM package in a CentOS 7 repo?
P.S: If I add a new package and do a createrepo -v
it will tell me No package available.
Best Answer
The good way to maintain local repo is to establish kind of replication process (
rsync
,wget
) from the original site and then update the information in repo. The command to update is:To avoid
cd
to the repo directory you can use command on this way:EDIT: Also you can check if the yum cache file is corrupted (/var/cache/yum). Usually clean it/delete can help. You can check here for reference.