« RPM/DNF/FAQ » : différence entre les versions
(Page créée avec « == General Questions == {{Admon/faq|What does DNF stand for ?|Dandified [http://yum.baseurl.org/ Yum]}} {{Admon/faq|Can I have DNF and Yum installed side by side ?|Yes, y... ») |
Aucun résumé des modifications |
||
| (7 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 1 : | Ligne 1 : | ||
== F.A.Q. Contents == | |||
'''General Questions''' | |||
* [[#What does DNF stand for ?|What does DNF stand for ?]] | |||
* [[#Can I have DNF and Yum installed side by side ?|Can I have DNF and Yum installed side by side ?]] | |||
* [[#What to do with packages that DNF refuses to remove because their ''%pre'' or ''%preun'' scripts are failing ?|What to do with packages that DNF refuses to remove because their ''%pre'' or ''%preun'' scripts are failing ?]] | |||
* [[#Why are ''dnf check-update'' packages not marked for upgrade in the following ''dnf upgrade'' ?|Why are ''dnf check-update'' packages not marked for upgrade in the following ''dnf upgrade'' ?]] | |||
* [[#Why do I get different results with ''dnf upgrade'' vs ''yum update'' ?|Why do I get different results with ''dnf upgrade'' vs ''yum update'' ?]] | |||
* [[#Is it possible to force DNF to get the latest metadata on ''dnf upgrade'' ?|Is it possible to force DNF to get the latest metadata on ''dnf upgrade'' ?]] | |||
* [[#How do I disable automatic metadata synchronization service ?|How do I disable automatic metadata synchronization service ?]] | |||
* [[#Shouldn't DNF exit soon from certain commands if it is not run under root ?|Shouldn't DNF exit soon from certain commands if it is not run under root ?]] | |||
'''Using DNF in Fedora''' | |||
* [[#For my stable Fedora release, can I install the rawhide packages for testing purposes ?|For my stable Fedora release, can I install the rawhide packages for testing purposes ?]] | |||
== General Questions == | == General Questions == | ||
| Ligne 57 : | Ligne 70 : | ||
== Using DNF in Fedora == | == Using DNF in Fedora == | ||
{{Admon/faq|For my stable Fedora release, can I install the rawhide packages for testing purposes ?|Yes, in two steps | {{Admon/faq|For my stable Fedora release, can I install the rawhide packages for testing purposes ?|Yes, in two steps | ||
<pre> | * first install the necessary '''.repo''' files :<pre>dnf install fedora-release-rawhide</pre> | ||
dnf install fedora-release-rawhide | * Then, when you want to include the packages from the rawhide repo, execute a DNF command with Rawhide enabled :<pre>dnf install --enablerepo=rawhide upgrade rpm</pre> | ||
</pre> | {{Admon/warning||Installing rawhide packages onto a stable Fedora release system is generally discouraged as it leads to less tested combinations of installed packages. Please consider this step carefully.}} | ||
Then, when you want to include the packages from the rawhide repo, execute a DNF command with Rawhide enabled: | |||
<pre> | |||
dnf install --enablerepo=rawhide upgrade rpm | |||
</pre> | |||
}} | }} | ||
Dernière version du 16 août 2014 à 10:49
F.A.Q. Contents
General Questions
- What does DNF stand for ?
- Can I have DNF and Yum installed side by side ?
- What to do with packages that DNF refuses to remove because their %pre or %preun scripts are failing ?
- Why are dnf check-update packages not marked for upgrade in the following dnf upgrade ?
- Why do I get different results with dnf upgrade vs yum update ?
- Is it possible to force DNF to get the latest metadata on dnf upgrade ?
- How do I disable automatic metadata synchronization service ?
- Shouldn't DNF exit soon from certain commands if it is not run under root ?
Using DNF in Fedora
General Questions
You can usually remove such package with rpm:
rpm -e <package-version> --noscripts
$ dnf check-update libocsync0.x86_64 0.91.4-2.1 devel_repo owncloud-client.x86_64 1.5.0-18.1 devel_repo
Yet the immediately following dnf upgrade does not offer them for upgrade:
$ dnf upgrade Resolving dependencies --> Starting dependency resolution --> Finished dependency resolution Dependencies resolved. Nothing to do.
It might seem odd but in fact this can happen quite easily: what the first command does is only check whether there are some available packages with the same name as an installed package but with a higher version. Those are considered upgrade candidates by check-update, but no actual dependency resolving takes place there. That only happens during dnf upgrade and if the resolving procedure then discovers that some of the packages do not have their dependencies ready yet, then they are not offered in the upgrade. To see the precise reason why it was not possible to do the upgrade in this case, use:
$ dnf upgrade --best
$ dnf clean metadata $ dnf upgrade
An alternative is to shorten the default expiry time of repos, for that edit <path>/etc/dnf/dnf.conf</path> and set:
metadata_expire=0
Of course, some repos might use a custom metadata_expire value, you'll currently have to change these manually too.
If you're the kind of the user who always wants the freshest metadata possible, you'll probably want to disable the automatic metadata updates.
metadata_timer_sync=0
Using DNF in Fedora
- first install the necessary .repo files :
dnf install fedora-release-rawhide
- Then, when you want to include the packages from the rawhide repo, execute a DNF command with Rawhide enabled :
dnf install --enablerepo=rawhide upgrade rpm