Date: Tue, 5 Jan 2016 14:17:30 +1030 From: Shane Ambler <FreeBSD@ShaneWare.Biz> To: Polytropon <freebsd@edvax.de>, Markus Edemalm <markus@edemalm.se> Cc: freebsd-questions@freebsd.org Subject: Re: Safe to delete old files in /usr/lib? Message-ID: <568B3CD2.8030708@ShaneWare.Biz> In-Reply-To: <20160104203418.aee8df91.freebsd@edvax.de> References: <D6FAF4F3-EE48-4411-909D-9D13D8B9B620@edemalm.se> <20160104181211.76907a30.freebsd@edvax.de> <F4E4B196-36B4-40FE-A54B-FEA95DA96772@edemalm.se> <20160104185245.5ca2e4f1.freebsd@edvax.de> <BA58A9C5-5BD4-44AD-AFDC-D3BE54036A78@edemalm.se> <20160104203418.aee8df91.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05/01/2016 06:04, Polytropon wrote: > On Mon, 4 Jan 2016 19:18:02 +0100, Markus Edemalm wrote: >>> 4 jan. 2016 kl. 18:52 skrev Polytropon <freebsd@edvax.de>: >>> >>> On Mon, 4 Jan 2016 18:28:14 +0100, Markus Edemalm wrote: >>>>> 4 jan. 2016 kl. 18:12 skrev Polytropon <freebsd@edvax.de>: >>>>> >>>>> On Mon, 4 Jan 2016 18:06:00 +0100, Markus Edemalm wrote: >>>>>> Hello, >>>>>> >>>>>> My system was first installed as 10.0-RELEASE. I have >>>>>> sinceupgraded to 10.1, 10.1-STABLE, 10.2-RELEASE and is now >>>>>> at 10.2-RELEASE-p8. >>>>>> I’ve rebuild from source and followed the steps in the >>>>>> handbook. Everything is fine… but: >>>>>> >>>>>> I see many files in /usr/lib with old dates, apparently >>>>>> they are no longer installed during upgrades. Did you clear out /usr/obj With the right modifications dates, a binary doesn't need to be rebuilt While I think make buildworld should clean it out, some files may get missed. >>>>>> My /etc/make.conf looks like this: >>>>>> >>>>>> NO_PROFILE=true >>>>>> WITHOUT_X11=yes >>>>>> >>>>>> Today, January the 4th, I upgraded to -p8. The newly >>>>>> installedfiles has todays date, i.e â€Jan 4â€. >>>>>> If I do: >>>>>> >>>>>> ls -lF /usr/lib | grep -v 'Jan 4' | awk {'print $9'} >>>>>> >>>>>> …I get the following list of (obsolete?) files and folders with older dates. >>>> And, they are all .a files, except for libc++.so and libc.so. >>>> >>>> I added NO_PROFILE=true to /etc/make.conf a while back. Is that relevant? >>> >>> Hmmm... I always thought that would be the default (no profiling libs >>> being built and installed). But according to "man src.conf", the >>> setting's name is WITHOUT_PROFILE, not NO_PROFILE. >> >> Hmm. I forgot about src.conf, I got: >> >> cat /etc/src.conf >> WITHOUT_BLUETOOTH=yes >> WITHOUT_FLOPPY=yes >> WITHOUT_IPFW=yes >> WITHOUT_IPFILTER=yes >> >> That may explain why _some_ libs are not being built and installed. >> But still, more than 100 .a files with old dates. Doesn’t make sense to me at all. > > In this case, a good idea would be to move the old libraries out > of /usr/lib (for example into a newly created /usr/lib.old directory) > and checking if any application in use produces an error. In that > case, the required library could be restored. If no further error > appears - forget about those libraries. :-) .a files should be copied into the final binary, so removing .a files won't break anything that is already built, but the next make could fail with a missing library at link time. I am running 10-stable and run make delete-old after upgrades - ls /usr/lib/*.a | wc -l 292 ls /usr/lib/*.so | wc -l 162 find /usr/lib -type l -name "*.a" | wc -l 22 I do seem to have a few old libs find /usr/lib -not -newermt "2 weeks ago" | wc -l 19 Downloading base.txz for 10.2-RELEASE - ls usr/lib/*.a | wc -l 287 ls usr/lib/*.so | wc -l 162 -- FreeBSD - the place to B...Software Developing Shane Ambler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?568B3CD2.8030708>