Ask Your Question
0

How do I upgrade a package I've just rebuilt from source?

asked 2019-02-18 08:13:18 -0500

vmercuri gravatar image

Hi. I've just rebuilt the .rpm of Vim from source on F29. I followed the usual scheme:

rpmdev-setuptree
sudo dnf builddep vim
dnf download --source vim
rpm -ivh vim-8.1.897-1.fc29.src.rpm
rpmbuild -bb ~/rpmbuild/SPECS/vim.spec
sudo rpm -Uvh ~/rpmbuild/RPMS/x86_64/vim-8.1.897-1.fc29.rpm --force

However, when I run dnf upgrade it asks me to replace my newly compiled package with the one from the repo (which is the same version of course). How can I keep my package installed without dnf trying to replace it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-02-18 08:28:04 -0500

aeperezt gravatar image

You could add --exclude=vim to your dnf update command line, or you can add the exclude=vim sentence on your fedora-updates.conf repo file on /etc/yum.repos.d

Hope this help.

edit flag offensive delete link more

Comments

Thanks! I'll use your solution. However, why dnf wants to upgrade it if it's the same version? I could replace it myself with dnf reinstall if I wanted. If I just exclude vim from being upgraded at all I'd lose potentially useful upgrades when, say, vim-8.2 will come out. But for now I only want the package I've built myself to have priority over the official one, which is the same version. Maybe dnf uses other criteria to prioritize upgrades?

vmercuri gravatar imagevmercuri ( 2019-02-18 08:46:55 -0500 )edit
1

It will probable be because on DNF database vim is not upgrated.

aeperezt gravatar imageaeperezt ( 2019-02-19 10:10:36 -0500 )edit

Indeed. I need to find a way to tell DNF to do exactly that.

vmercuri gravatar imagevmercuri ( 2019-02-21 10:59:28 -0500 )edit

Not sure this will work for you, but you can allow update vim, then reinstall vim using rpm instead of dnf that way you are working outside dnf databases, and over the updated package.

aeperezt gravatar imageaeperezt ( 2019-02-21 13:23:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-02-18 08:13:18 -0500

Seen: 33 times

Last updated: Feb 18