Re: how to tell if /usr/obj is up to date?

From: Conrad J. Sabatier (conrads_at_cox.net)
Date: 08/10/05


Date: Wed, 10 Aug 2005 02:41:54 GMT

In article <ddblba$2g4m$1@bunyip2.cc.uq.edu.au>,
Joel Hatton <uqjhatto@mailbox.uq.edu.au> wrote:
>
>
>Hi,
>
>Is there any way to use make in /usr/src to tell if my object tree is up
>to date?

Errr...well...*sort of*. :-)

>Situation:
>
>I cvsup my sources and do the make buildworld / buildkernel / installkernel
>/ installworld steps. Later, I cvsup again to update for a vul that doesn't
>require world to be rebuilt (such as FreeBSD-SA-05:16.zlib) and install.
>Now, for instance, a newer update for zlib is available and I'll naturally
>have to repeat the previous step. However, hypothetically if for no other
>reason, is it possible to tell, after getting my sources up to date again,
>if this new revision has already been built and hence is now in the object
>tree or do I have to do it all over again to be sure?

Well, if you log your cvsup updates (cvsup -g -L2 > /some/dir/cvsup.log) and
pay attention, you should be able to tell quite easily if anything under
/usr/src/foo has changed in your latest source update.

>In this case, if I run make -n in /usr/src/lib/libz/ should this report
>differently depending on whether /usr/obj is up to date or not?

Well, yes, of course. If everything really is up to date, then "make -n"
should show no actual compile commands.

>Normally, I would expect make to work as expected and return if
>object files are up to date, but the buildworld process in cleaning
>up would seem to break this.

"make -DNO_CLEAN buildworld" can be very handy for this sort of thing.

My usual method is to do a source update followed by a "make -DNO_CLEAN
buildworld", unless my cvsup logs show enough significant changes that this
may seem unwise or unsafe, in which case I just "rm -rf /usr/obj" and *then*
do a "make -DNO_CLEAN" (this may seem strange, but it's actually faster to
manually delete /usr/obj than to have it done by the cleaning phase of a
buildworld).

Hope this helps.

-- 
Conrad J. Sabatier <conrads@cox.net> -- "In Unix veritas"


Relevant Pages

  • GUIDE step-by-step - FreeBSD-RELENG-upgrade + BUILDWORLD process, using CVSUP
    ... I have seen a lot of "buildworld" questions, ... safe and easy as possible using the CVSUP way! ... Now to make it even more convenience to fetch it all, ... BOOT UP IN SINGLE MODE, ...
    (freebsd-questions)
  • Help saving my system
    ... Compiled make buildworld, then did a make build world, and re-compiled ... Mounted live cdrom filesystem and then mounted my root drive to /mnt ... Re-did a cvsup of the branch current. ... For more information on a proactive email security ...
    (freebsd-current)
  • Help saving my system
    ... Compiled make buildworld, then did a make build world, and re-compiled ... Mounted live cdrom filesystem and then mounted my root drive to /mnt ... Re-did a cvsup of the branch current. ... For more information on a proactive email security ...
    (freebsd-stable)
  • help with pkg_update
    ... Hello ..ive recently upgraded all our Freebsd systems to the lastest src ... using cvsup and the whole make buildworld procedure...all is good. ...
    (freebsd-questions)
  • Re: cvsup error
    ... then it's likely a buildworld issue, and not related to cvsup... ... entire build (perhaps for posting on a website, i wouldn't attach/paste ... you can usee teeas follows: ...
    (freebsd-stable)