« RPM/DNF/FAQ » : différence entre les versions

De TartareFR
Aller à la navigation Aller à la recherche
(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
Ligne 1 : Ligne 1 :
== General Questions ==
== General Questions ==


{{Admon/faq|What does DNF stand for ?|Dandified [http://yum.baseurl.org/ Yum]}}
{{Admon/faq|1|What does DNF stand for ?|Dandified [http://yum.baseurl.org/ Yum]}}
{{Admon/faq|Can I have DNF and Yum installed side by side ?|Yes, you can. And this setup is tested by many.
{{Admon/faq|2|Can I have DNF and Yum installed side by side ?|Yes, you can. And this setup is tested by many.


There is one restriction: DNF and Yum keep additional data about each installed package and every performed transaction. This data is currently not shared between the two managers so if the admin installs half of the packages with DNF and the other half with Yum then each program can not benefit from the information held by the other one. The practical bottom line is that commands like '''autoremove''' can not take a completely informed decision and thus have to "play it safe" and remove only a subset of dependencies they would be able to otherwise. Similar situation exists with groups.}}
There is one restriction: DNF and Yum keep additional data about each installed package and every performed transaction. This data is currently not shared between the two managers so if the admin installs half of the packages with DNF and the other half with Yum then each program can not benefit from the information held by the other one. The practical bottom line is that commands like '''autoremove''' can not take a completely informed decision and thus have to "play it safe" and remove only a subset of dependencies they would be able to otherwise. Similar situation exists with groups.}}
{{Admon/faq|What to do with packages that DNF refuses to remove because their ''%pre'' or ''%preun'' scripts are failing ?|If this happens, it is a packaging error and consider reporting the failure to the package's maintainer.
{{Admon/faq|3|What to do with packages that DNF refuses to remove because their ''%pre'' or ''%preun'' scripts are failing ?|If this happens, it is a packaging error and consider reporting the failure to the package's maintainer.


You can usually remove such package with '''rpm''':
You can usually remove such package with '''rpm''':
<pre>rpm -e <package-version> --noscripts</pre>}}
<pre>rpm -e <package-version> --noscripts</pre>}}
{{Admon/faq|Why are ''dnf check-update'' packages not marked for upgrade in the following ''dnf upgrade'' ?|Sometimes one can see that a newer version of a package is available in the repos:
{{Admon/faq|4|Why are ''dnf check-update'' packages not marked for upgrade in the following ''dnf upgrade'' ?|Sometimes one can see that a newer version of a package is available in the repos:
<pre>
<pre>
$ dnf check-update
$ dnf check-update
Ligne 29 : Ligne 29 :
</pre>
</pre>
}}
}}
{{Admon/faq|Why do I get different results with ''dnf upgrade'' vs ''yum update'' ?|We get this reported as a bug quite often, but it usually is not. One reason to see this is that DNF does not list update candidates as it explores them. More frequently however the reporter means actual difference in the proposed transaction. This is most often because the metadata the two packagers are working with were taken at a different time (DNF has a notoriously looser schedule on metadata updates to save time and bandwidth), and sometimes also because the depsolvers inside are designed to take a different course of action when encountering some specific update scenario.
{{Admon/faq|5|Why do I get different results with ''dnf upgrade'' vs ''yum update'' ?|We get this reported as a bug quite often, but it usually is not. One reason to see this is that DNF does not list update candidates as it explores them. More frequently however the reporter means actual difference in the proposed transaction. This is most often because the metadata the two packagers are working with were taken at a different time (DNF has a notoriously looser schedule on metadata updates to save time and bandwidth), and sometimes also because the depsolvers inside are designed to take a different course of action when encountering some specific update scenario.


The bottom line is: unless a real update problem occurs (i.e. DNF refuses to update a package that Yum updates) with the same set of metadata, this is not an issue.
The bottom line is: unless a real update problem occurs (i.e. DNF refuses to update a package that Yum updates) with the same set of metadata, this is not an issue.
}}
}}
{{Admon/faq|Is it possible to force DNF to get the latest metadata on ''dnf upgrade'' ?|Yes, clear the cache first:
{{Admon/faq|6|Is it possible to force DNF to get the latest metadata on ''dnf upgrade'' ?|Yes, clear the cache first:
<pre>
<pre>
$ dnf clean metadata
$ dnf clean metadata
Ligne 45 : Ligne 45 :


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.}}
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.}}
{{Admon/faq|How do I disable automatic metadata synchronization service ?|Several ways to do that. The DNF way is to add the following to <path>/etc/dnf/dnf.conf</path>:
{{Admon/faq|7|How do I disable automatic metadata synchronization service ?|Several ways to do that. The DNF way is to add the following to <path>/etc/dnf/dnf.conf</path>:
<pre>
<pre>
metadata_timer_sync=0
metadata_timer_sync=0
</pre>
</pre>
}}
}}
{{Admon/faq|Shouldn't DNF exit soon from certain commands if it is not run under root ?|No, there can be systems and scenarios that allow other users than root to successfully perform '''dnf install''' and similar and it would be impractical to stop these from functioning by the UID check. Alternatively, the practice of checking filesystem permissions instead of the effective UID could lead to false positives since there is plenty of time between DNF startup and the possible transaction start when permissions can be changed by a different process.
{{Admon/faq|8|Shouldn't DNF exit soon from certain commands if it is not run under root ?|No, there can be systems and scenarios that allow other users than root to successfully perform '''dnf install''' and similar and it would be impractical to stop these from functioning by the UID check. Alternatively, the practice of checking filesystem permissions instead of the effective UID could lead to false positives since there is plenty of time between DNF startup and the possible transaction start when permissions can be changed by a different process.


If the time loss incurred by repeated runs of DNF is unacceptable for you, consider using the [https://github.com/akozumpl/dnf-plugins-core/blob/master/plugins/noroot.py noroot plugin].
If the time loss incurred by repeated runs of DNF is unacceptable for you, consider using the [https://github.com/akozumpl/dnf-plugins-core/blob/master/plugins/noroot.py noroot plugin].
Ligne 57 : Ligne 57 :
== 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: first install the necessary '''.repo''' files:
{{Admon/faq|9|For my stable Fedora release, can I install the rawhide packages for testing purposes ?|Yes, in two steps: first install the necessary '''.repo''' files:
<pre>
<pre>
dnf install fedora-release-rawhide
dnf install fedora-release-rawhide

Version du 16 août 2014 à 10:30

General Questions

FaqQuestion.png
1
What does DNF stand for ?

FaqQuestion.png
2
Can I have DNF and Yum installed side by side ?

FaqQuestion.png
3
What to do with packages that DNF refuses to remove because their %pre or %preun scripts are failing ?

FaqQuestion.png
4
Why are dnf check-update packages not marked for upgrade in the following dnf upgrade ?

FaqQuestion.png
5
Why do I get different results with dnf upgrade vs yum update ?

FaqQuestion.png
6
Is it possible to force DNF to get the latest metadata on dnf upgrade ?

FaqQuestion.png
7
How do I disable automatic metadata synchronization service ?

FaqQuestion.png
8
Shouldn't DNF exit soon from certain commands if it is not run under root ?

Using DNF in Fedora

FaqQuestion.png
9
For my stable Fedora release, can I install the rawhide packages for testing purposes ?
Warning.png
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.