From owner-freebsd-doc@FreeBSD.ORG Wed Jul 28 20:20:04 2010 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 167C31065673 for ; Wed, 28 Jul 2010 20:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 03CE88FC1D for ; Wed, 28 Jul 2010 20:20:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o6SKK3P7020804 for ; Wed, 28 Jul 2010 20:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6SKK3HV020799; Wed, 28 Jul 2010 20:20:03 GMT (envelope-from gnats) Date: Wed, 28 Jul 2010 20:20:03 GMT Message-Id: <201007282020.o6SKK3HV020799@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Anton Shterenlikht Cc: Subject: Re: docs/137762: [handbook] proposed: mention "make delete-old" in sec 24.7 Rebuilding World X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Anton Shterenlikht List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 20:20:04 -0000 The following reply was made to PR docs/137762; it has been noted by GNATS. From: Anton Shterenlikht To: Benedict Reuschling 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 @@ A full machine reboot is needed now to load the new kernel and new world with new configuration files. + + + make check-old + + 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. + + + + + make delete-old + + Deleting obsolete files is recommended. + In some cases deleting obsolete files is required + to avoid various compilation problems. More on that below. + + + Warning + + 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. + + + + Note that if you're upgrading from one release of the same &os; @@ -2729,13 +2758,94 @@ Rebooting - You are now done. After you have verified that everything appears + 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: &prompt.root; shutdown -r now + + Deleting obsolete files, directories, libraries + + 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. + + + Do + &prompt.root; cd /usr/src + + and start with + &prompt.root; make check-old + + This will check for old files, directories and shared + libraries. If any obsolete files are found, you can + then do + &prompt.root; make delete-old + + + Have a look at /usr/src/Makefile + for more targets of interest, e.g. + +# 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. + + More detailed comments are provided for each target in + the makefile itself. + + + 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. + + + You might want to use + libchk + 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. + + + If you don't delete obsolete shared libraries, you might + end up getting messages like this: + + +/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 + + + 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. + + Fortunately the solution is very simple. First + find which port installed the file in question: + + +&prompt.root; pkg_info -W /usr/local/lib/libtiff.so +/usr/local/lib/libtiff.so was installed by package tiff-3.9.4 +&prompt.root; pkg_info -W /usr/local/lib/libXext.so +/usr/local/lib/libXext.so was installed by package libXext-1.1.1,1 + + + Then just rebuild the ports in question. + + + Finished --gBBFr7Ir9EOA20Yy--