Andy
Andy

Reputation: 338

yum update dependencies only

I install my new rpm package using yum install (my package name) command; yum command installs main rpm package along with dependencies; there is no issue. If my main package is updated to new and higher version then yum update (my package name) work fine, without any issues.
Please note, I execute createrepo command whenever new rpm is copied into rpm collection folder.

Problem is: If only adependent rpm is upgraded i.e. to new version in rpm collection folder at repo server, How to update only dependent rpms on client machine (RH machine)?

What I tried: 1. sudo yum update (my package name) command always returns (my package name) is already updated but It did not even check dependencies for a new version

  1. I added one more dependent pkg (deppkg) section in repo file like below:

    [mainpkg]
    name=simplest
    baseurl="file:///home/anand/testcode/rpmtest/"
    gpgcheck=0

    [deppkg]
    name=simplest
    baseurl="file:///home/anand/testcode/rpmtest/"
    gpgcheck=0

Having added one deppkg section, yum update deppkg started working which is obvious. Still, yum update mainpkg command still does not find new dependencies.

I do not want to go by 2nd option as there can be many pkgs and will have to add or delete time to time so it will be difficult in the long run.

Could you please let me know if there are any alternative ways which would be useful to update only dependencies from a remote machine?

Regards,
Anand Choubey

Upvotes: 0

Views: 4425

Answers (2)

mati kepa
mati kepa

Reputation: 3201

you can run sudo yum makecache to update repos

and sudo yum update --downloadonly to pull rpm's without installing it

Upvotes: 0

Aaron D. Marasco
Aaron D. Marasco

Reputation: 6748

Just "sudo yum upgrade" should pull in the updates. Don't give it any package names.

Edit: If you only want the ones from your repo, you can do "sudo yum upgrade --disablerepo=* --enablerepo=yourreponame"

Upvotes: 2

Related Questions