Date: Wed, 28 Jul 2010 20:20:03 GMT From: Anton Shterenlikht <mexas@bristol.ac.uk> To: freebsd-doc@FreeBSD.org Subject: Re: docs/137762: [handbook] proposed: mention "make delete-old" in sec 24.7 Rebuilding World Message-ID: <201007282020.o6SKK3HV020799@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/137762; it has been noted by GNATS. From: Anton Shterenlikht <mexas@bristol.ac.uk> To: Benedict Reuschling <bcr@FreeBSD.org> Cc: bug-followup@FreeBSD.org, mexas@bristol.ac.uk Subject: Re: docs/137762: [handbook] proposed: mention "make delete-old" in sec 24.7 Rebuilding World Date: Wed, 28 Jul 2010 21:11:24 +0100 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline See patch attached. I added points 9 and 10 in section 24.7.1 and the new section 24.7.13. Here's the new look: http://eis.bris.ac.uk/~mexas/makeworld.html Perhaps it's too long? -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="chapter.sgml.diff" --- /doc/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml 2010-07-07 16:23:31.000000000 +0100 +++ chapter.sgml 2010-07-28 21:05:43.000000000 +0100 @@ -1977,6 +1977,35 @@ <para>A full machine reboot is needed now to load the new kernel and new world with new configuration files.</para> </listitem> + + <listitem> + <para><command>make check-old</command></para> + + <para>When new files, directories or libraries (or new versions + of existing files) are installed, the old versions might become + obsolete. This command will show all obsolete files. + </para> + </listitem> + + <listitem> + <para><command>make delete-old</command></para> + + <para>Deleting obsolete files is recommended. + In some cases deleting obsolete files is required + to avoid various compilation problems. More on that below. + </para> + <warning> + <title>Warning</title> + + <para>Before deleting old versions of shared libraries, you need + to make sure that no ports depend on those. Any port that + does depend on old versions of shared libraries will have to be + rebuilt prior to your deleting old versions. Otherwise, + you might find that some ports don't work anymore. + </para> + </warning> + </listitem> + </orderedlist> <para>Note that if you're upgrading from one release of the same &os; @@ -2729,13 +2758,94 @@ <sect2 id="updating-upgrading-rebooting"> <title>Rebooting</title> - <para>You are now done. After you have verified that everything appears + <para>You are now nearly done. After you have verified that everything appears to be in the right place you can reboot the system. A simple &man.shutdown.8; should do it:</para> <screen>&prompt.root; <userinput>shutdown -r now</userinput></screen> </sect2> + <sect2 id="delete-old"> + <title>Deleting obsolete files, directories, libraries</title> + + <para>Now you need to make sure there are no obsolete + files which might cause various compilation problems with + the base operating system, the kernel and ports. + </para> + + <para>Do</para> + <screen>&prompt.root; <userinput>cd /usr/src</userinput></screen> + + <para>and start with</para> + <screen>&prompt.root; <userinput>make check-old</userinput></screen> + + <para>This will check for old files, directories and shared + libraries. If any obsolete files are found, you can + then do</para> + <screen>&prompt.root; <userinput>make delete-old</userinput></screen> + + <tip> + <para>Have a look at <filename>/usr/src/Makefile</filename> + for more targets of interest, e.g.</para> + <screen> +# check-old - List obsolete directories/files/libraries. +# check-old-dirs - List obsolete directories. +# check-old-files - List obsolete files. +# check-old-libs - List obsolete libraries. +# delete-old - Delete obsolete directories/files/libraries. +# delete-old-dirs - Delete obsolete directories. +# delete-old-files - Delete obsolete files. +# delete-old-libs - Delete obsolete libraries. + </screen> + <para>More detailed comments are provided for each target in + the makefile itself.</para> + </tip> + + <para>You will be prompted before deleting each file or + directory. Be particularly careful when offered to + delete a shared library. If there are ports which + depend on it, these ports will not run if you choose + to delete it. + </para> + + <para> You might want to use + <ulink url="http://www.freshports.org/sysutils/libchk/">libchk</ulink> + port to find out which ports, if any, depend on an old + version of shared library. You are advised to rebuild + all such ports, to use the new version of shared + libraries. Then, if you are satisfied that there are + no more ports which depend on the old version + of shared library, you can delete it. + </para> + + <para>If you don't delete obsolete shared libraries, you might + end up getting messages like this: + </para> + <screen> +/usr/bin/ld: warning: libz.so.4, needed by /usr/local/lib/libtiff.so, may conflict with libz.so.5 +/usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libXext.so, may conflict with librpcsvc.so.5 + </screen> + + <para>In both examples linker is complaining about ports + compiled with old versions of shared libraries, while the + new versions are available. Conflicts are possible if + these ports depend on other ports which are built with + the new version of the same shared library.</para> + + <para>Fortunately the solution is very simple. First + find which port installed the file in question:</para> + + <screen> +&prompt.root; <userinput>pkg_info -W /usr/local/lib/libtiff.so</userinput> +/usr/local/lib/libtiff.so was installed by package tiff-3.9.4 +&prompt.root; <userinput>pkg_info -W /usr/local/lib/libXext.so</userinput> +/usr/local/lib/libXext.so was installed by package libXext-1.1.1,1 + </screen> + + <para>Then just rebuild the ports in question.</para> + + </sect2> + <sect2> <title>Finished</title> --gBBFr7Ir9EOA20Yy--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007282020.o6SKK3HV020799>