|
Lines 4887-4892
Link Here
|
| 4887 |
|
4887 |
|
| 4888 |
</answer> |
4888 |
</answer> |
| 4889 |
</qandaentry> |
4889 |
</qandaentry> |
|
|
4890 |
|
| 4891 |
<qandaentry> |
| 4892 |
<question id="ports-update"> |
| 4893 |
<para>I updated the sources, now how do I update my installed ports?</para> |
| 4894 |
</question> |
| 4895 |
|
| 4896 |
<answer> |
| 4897 |
<para>Unfortunately, there is no easy way to udpate |
| 4898 |
installed ports. The <command>pkg_version(1)</command> |
| 4899 |
command can be used to generate a script that will update |
| 4900 |
the installed ports with a newer version in the ports |
| 4901 |
tree:</para> |
| 4902 |
|
| 4903 |
<screen>&prompt.root; <userinput>pkg_version <option>-c</option> > <replaceable>/tmp/myscript</replaceable></userinput></screen> |
| 4904 |
|
| 4905 |
<para>The output script <emphasis>must</emphasis> be edited |
| 4906 |
by hand before you use it. Current versions of |
| 4907 |
<command>pkg_version</command> force this by inserting an |
| 4908 |
<command>exit</command> at the beginning of the script.</para> |
| 4909 |
|
| 4910 |
<para>You should save the output of the script, as it will |
| 4911 |
note packages that depend on the one that has been |
| 4912 |
udpated. These may or may not need to be updated as |
| 4913 |
well. The usual case where they need to be updated is |
| 4914 |
that a shared library has changed version numbers, so the |
| 4915 |
ports that used that library need to be rebuilt to use |
| 4916 |
the new version.</para> |
| 4917 |
|
| 4918 |
<para>If your system is up full time, the &man.periodic.8 |
| 4919 |
system can be used to generate a weekly list of ports that |
| 4920 |
might need updating by setting |
| 4921 |
<literal>weekly_status_pkg_enable="YES"</literal> in |
| 4922 |
<filename>/etc/periodic.conf</filename>.</para> |
| 4923 |
|
| 4924 |
</answer> |
| 4925 |
</qandaentry> |
| 4926 |
|
| 4890 |
</qandaset> |
4927 |
</qandaset> |
| 4891 |
</chapter> |
4928 |
</chapter> |