View | Details | Raw Unified | Return to bug 137762
Collapse All | Expand All

(-)chapter.sgml (-1 / +111 lines)
Lines 1977-1982 Link Here
1977
	  <para>A full machine reboot is needed now to load the new kernel
1977
	  <para>A full machine reboot is needed now to load the new kernel
1978
	    and new world with new configuration files.</para>
1978
	    and new world with new configuration files.</para>
1979
	</listitem>
1979
	</listitem>
1980
1981
	<listitem>
1982
	  <para><command>make check-old</command></para>
1983
1984
	  <para>When new files, directories or libraries (or new versions
1985
	of existing files) are installed, the old versions might become
1986
	obsolete. This command will show all obsolete files.
1987
	    </para>
1988
	</listitem>
1989
1990
	<listitem>
1991
	  <para><command>make delete-old</command></para>
1992
1993
	  <para>Deleting obsolete files is recommended.
1994
	In some cases deleting obsolete files is required
1995
	to avoid various compilation problems. More on that below.
1996
	    </para>
1997
    <warning>
1998
      <title>Warning</title>
1999
2000
      <para>Before deleting old versions of shared libraries, you need
2001
	to make sure that no ports depend on those. Any port that
2002
	does depend on old versions of shared libraries will have to be
2003
	rebuilt prior to your deleting old versions. Otherwise,
2004
	you might find that some ports don't work anymore.
2005
	</para>
2006
    </warning>
2007
	</listitem>
2008
1980
      </orderedlist>
2009
      </orderedlist>
1981
2010
1982
      <para>Note that if you're upgrading from one release of the same &os;
2011
      <para>Note that if you're upgrading from one release of the same &os;
Lines 2729-2741 Link Here
2729
    <sect2 id="updating-upgrading-rebooting">
2758
    <sect2 id="updating-upgrading-rebooting">
2730
      <title>Rebooting</title>
2759
      <title>Rebooting</title>
2731
2760
2732
      <para>You are now done.  After you have verified that everything appears
2761
      <para>You are now nearly done.  After you have verified that everything appears
2733
	to be in the right place you can reboot the system.  A simple
2762
	to be in the right place you can reboot the system.  A simple
2734
	&man.shutdown.8; should do it:</para>
2763
	&man.shutdown.8; should do it:</para>
2735
2764
2736
      <screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
2765
      <screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
2737
    </sect2>
2766
    </sect2>
2738
2767
2768
    <sect2 id="delete-old">
2769
      <title>Deleting obsolete files, directories, libraries</title>
2770
2771
      <para>Now you need to make sure there are no obsolete
2772
	files which might cause various compilation problems with
2773
	the base operating system, the kernel and ports.
2774
	</para>
2775
2776
	<para>Do</para>
2777
      <screen>&prompt.root; <userinput>cd /usr/src</userinput></screen>
2778
2779
	<para>and start with</para>
2780
      <screen>&prompt.root; <userinput>make check-old</userinput></screen>
2781
	
2782
	<para>This will check for old files, directories and shared
2783
	libraries. If any obsolete files are found, you can
2784
	then do</para>
2785
      <screen>&prompt.root; <userinput>make delete-old</userinput></screen>
2786
2787
	<tip>
2788
                <para>Have a look at <filename>/usr/src/Makefile</filename>
2789
		for more targets of interest, e.g.</para>
2790
			<screen>
2791
# check-old           - List obsolete directories/files/libraries.
2792
# check-old-dirs      - List obsolete directories.
2793
# check-old-files     - List obsolete files.
2794
# check-old-libs      - List obsolete libraries.
2795
# delete-old          - Delete obsolete directories/files/libraries.
2796
# delete-old-dirs     - Delete obsolete directories.
2797
# delete-old-files    - Delete obsolete files.
2798
# delete-old-libs     - Delete obsolete libraries.
2799
			</screen>
2800
		<para>More detailed comments are provided for each target in
2801
			the makefile itself.</para>
2802
	</tip>
2803
2804
	<para>You will be prompted before deleting each file or
2805
	directory. Be particularly careful when offered to
2806
	delete a shared library. If there are ports which
2807
	depend on it, these ports will not run if you choose
2808
	to delete it.
2809
	</para>
2810
2811
	<para> You might want to use
2812
  <ulink url="http://www.freshports.org/sysutils/libchk/">libchk</ulink> 
2813
	port to find out which ports, if any, depend on an old
2814
	version of shared library. You are advised to rebuild
2815
	all such ports, to use the new version of shared
2816
	libraries. Then, if you are satisfied that there are
2817
	no more ports which depend on the old version  
2818
	of shared library, you can delete it.
2819
	</para>
2820
2821
	<para>If you don't delete obsolete shared libraries, you might
2822
	end up getting messages like this:
2823
	</para>
2824
	<screen>
2825
/usr/bin/ld: warning: libz.so.4, needed by /usr/local/lib/libtiff.so, may conflict with libz.so.5
2826
/usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libXext.so, may conflict with librpcsvc.so.5
2827
	</screen>
2828
2829
	<para>In both examples linker is complaining about ports
2830
	compiled with old versions of shared libraries, while the
2831
	new versions are available. Conflicts are possible if
2832
	these ports depend on other ports which are built with
2833
	the new version of the same shared library.</para>
2834
2835
	<para>Fortunately the solution is very simple. First
2836
	find which port installed the file in question:</para>
2837
2838
	<screen>
2839
&prompt.root; <userinput>pkg_info -W  /usr/local/lib/libtiff.so</userinput>
2840
/usr/local/lib/libtiff.so was installed by package tiff-3.9.4
2841
&prompt.root; <userinput>pkg_info -W /usr/local/lib/libXext.so</userinput>
2842
/usr/local/lib/libXext.so was installed by package libXext-1.1.1,1
2843
	</screen>
2844
2845
	<para>Then just rebuild the ports in question.</para>
2846
2847
    </sect2>
2848
2739
    <sect2>
2849
    <sect2>
2740
      <title>Finished</title>
2850
      <title>Finished</title>
2741
2851

Return to bug 137762