From owner-freebsd-questions@FreeBSD.ORG Sat Jan 23 03:57:38 2010 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B14E106566B for ; Sat, 23 Jan 2010 03:57:38 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f223.google.com (mail-ew0-f223.google.com [209.85.219.223]) by mx1.freebsd.org (Postfix) with ESMTP id E818E8FC12 for ; Sat, 23 Jan 2010 03:57:37 +0000 (UTC) Received: by ewy23 with SMTP id 23so2170267ewy.4 for ; Fri, 22 Jan 2010 19:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=PBkfHWr45QblBRduYFFJrfE/IOqja7DWtqeONovQRgg=; b=v3b4An3st3/+BcZyXUsbENI3GSnBdqhI5QmiXqt6KTpWnoaiqQXUelvk/26mir8rhW ECMRfsLEX7jSUaA4810DVJicCFLSBiFXwayCNJHVMRj4UnOnaAuNhRWlsA7rYVAZPOg6 qwz5JkYw/+SJRMWavNBfEaPsMdqdKb5F4xP8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=flS/cnr9wUF2GW9iAUyZTR///uALSDZJELPHmD5lEfbTSnR77VhxDEMvqc/alEp5b1 b78IlYZNvCVP4tLp/+qlKwKRxM2oHRDoI7fPEavPRQvT7ZRLsAp3FyJB/Y77wovTr8Va FPt8U7VWpIQsZ02ohbevJK98ql7DVM3jrZqSI= MIME-Version: 1.0 Received: by 10.216.89.206 with SMTP id c56mr1463508wef.123.1264219056771; Fri, 22 Jan 2010 19:57:36 -0800 (PST) Date: Fri, 22 Jan 2010 22:57:36 -0500 Message-ID: From: "b. f." To: freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: make delete-old && make delete-old-libs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 03:57:38 -0000 Matthew Seaman wrote: >mikel king wrote: >> I had a system that was royally borked after upgrading and completing >> these steps a few years ago. Ever since I have always skipped these >> steps. Has anyone else experienced any issues with these two steps? > What do you mean by "borked"? If you mean that you had to temporarily take it out of service while you rebuilt ports and other software, and adjusted configuration files, well, that is probably to be expected during a major upgrade. >make delete-old-libs can cause you much wailing and gnashing of teeth >if you do it too soon, but usually only when you're doing a major version >upgrade. In those circumstances, unless you're careful, all or large >parts of your software installed from ports will cease to work. Delete >the old libraries only once you've finished reinstalling all of your ported software. Major >version upgrades are one of the few times when there will >be old shlibs to consider deleting, so this is a rare event. On the whole, I think it is better to remove all of the old files, libraries, and ports first, and only then rebuild in a clean sandbox, rather than run the risk of including an old header or linking to an old base system library that will soon be discarded. In any event, if you must keep old ports around, at least temporarily, in most cases you can still use them if you have the appropriate COMPAT_FREEBSD? options in your kernel, and the corresponding misc/compat?x ports installed. And for other cases you can use libmap.conf(5). So you may as well run make delete-old-libs before rebuilding ports. > >make delete-old can theoretically cause you grief if you overwrite bits >of the base system from ports and set corresponding WITHOUT_FOO flags in >/etc/src.conf. On the whole, having ports overwrite base is something to >be avoided unless you have very good reason to do it. > Indeed. >Whether this will sting you or not is an interesting question: it depends >on developers adding files and directories to the list of old items >conditionally on defining WITHOUT_FOO type flags in /etc/src.conf. While >this has the intuitively attractive behaviour that doing a buildworld cycle removes the >unwanted programs or libraries, unfortunately it doesn't stop >there. It will remove your carefully installed ported software the following >time you do a buildworld cycle. For this reason, settings in src.conf >do not generally affect the list of old files and directories nowadays. This is wrong: they often do. To see if the files you have may be affected by options in src.conf, look at /usr/src/tools/build/mk/OptionalObsoleteFiles.inc, or run 'make check-old'. And if you are using -CURRENT, be aware that this file is now being updated. In any event, make-delete-old-[libs] is interactive, if you have not defined BATCH_DELETE_OLD_FILES, and you can choose to prevent some files from being removed on the command-line. And of course, you are not obliged to run these targets, but you are probably better off doing so, or cleaning your base system by other means, to avoid pollution. If you've files or links in directories normally reserved for the base system that you want to preserve, you could just write a script to use find(1) to look for files, directories, or links that are older than your freshly-installed files in these directories, ignore those you want to keep, and delete the rest. Some parts of the base system, particularly some header files, are installed with old timestamps, but you can just run make installworld again after running your script, and your base system will be then be clean and up-to-date. b.