Subject: Re: pkg_install BIG problem
To: Eric Haszlakiewicz <erh@nimenees.com>
From: Douglas Wade Needham <cinnion@ka8zrt.com>
List: tech-pkg
Date: 12/10/2004 08:20:12
	version=3.0.0
Sender: tech-pkg-owner@NetBSD.org

Quoting Eric Haszlakiewicz (erh@nimenees.com):
> On Fri, Dec 10, 2004 at 01:11:22AM -0500, John Klos wrote:
> > Yes, I agree that it should happen in that order for all packages (is 
> > there anyone who doesn't hate it when an already removed package doesn't 
> > compile, then we're stuck scrambling to get something in place for the 
> > users?)
> 
> 	yeah, this is one reason why I've taken to building new packages in
> a completely separate chroot environment.  (Well, actually multiple chroot
> environments with a handfull of null and union mounts to get things to
> show up in the right places.)  Combined with noticing that "bulk" build seem
> to work better when building dependencies, that approach has actually
> made things _so_ much easier to deal with.

Isn't it!  I can fire off a build, get everything built from scratch,
double check the results, and then rdist it into place after I verify
the build results.  Now, my only worries are whether someone checked
in a change which broke the builds as a whole, or for a critical
package (like the tck/tk upgrade did, or the ALL_TARGET did), or
whether the machine went down due to a power outage or panic in the
middle of a build and left things scrambled.

BTW Eric, a couple of questions for you.

1) What are your null and union mounts?  I only have union mounts, and
   here is the output for df on my system, as it currently does the
   pkgsrc phase of a build.

    # df 
    Filesystem                      1K-blocks     Used     Avail Capacity  Mounted on
    /dev/wd0a                          127463    34221     86868    28%    /
    /dev/wd0f                         4066110   362577   3500227     9%    /var
    /dev/wd0g                         4066110  2058695   1804109    53%    /usr
    /dev/wd0e                          126991        1    120640     0%    /stand
    mfs:348                            127495    33928     87192    28%    /tmp
    /dev/wd0h                        27468558        1  26095129     0%    /u0
    /dev/wd1h                       151530746 50477600  93476608    35%    /u1
    kernfs                                  1        1         0   100%    /kern
    procfs                                  4        4         0   100%    /proc
    pell:/var/mail                    2032447   352080   1578744    18%    /var/mail
    pell:/u1                         36868346 16104478  18920450    45%    /amd/pell/u1
    <below>:/u1/source/usr/src.200  202008346 100955200  93476608    51%    /u1/dist_200.pkgs/usr/src
    <below>:/u1/source/usr/xsrc.200 202008346 100955200  93476608    51%    /u1/dist_200.pkgs/usr/xsrc
    <below>:/u1/source/usr/pkgsrc   202008346 100955200  93476608    51%    /u1/dist_200.pkgs/usr/pkgsrc
    <below>:/u1/source/usr/lsrc     202008346 100955200  93476608    51%    /u1/dist_200.pkgs/usr/lsrc
    <below>:/u1/distfiles           202008346 100955200  93476608    51%    /u1/dist_200.pkgs/source/distfiles
    kernfs                                  1        1         0   100%    /u1/dist_200.pkgs/kern
    procfs                                  4        4         0   100%    /u1/dist_200.pkgs/proc
    kernfs                                  1        1         0   100%    /u1/dist_200.pkgs/kern
    procfs                                  4        4         0   100%    /u1/dist_200.pkgs/proc

   Wonder why I have the multiple kernfs/procfs mount...Mmmm.

2) Have you seen any oddities with files on the bottom side of union
   mounts behaving oddly?  I see the jdk/jre distfiles appear
   corrupted about 50% of the time, and so have taken to copying them
   into the top directory before I do the union mount.  Unfortunately,
   I have not had enough time to diagnose it further so that I could
   express it in a PR.

> 	and of course you need pkg_install to install pkg_tarup... nice
> chicken and egg problem. :(

Indeed.

- Doug

-- 
Douglas Wade Needham - KA8ZRT        UN*X Consultant & UW/BSD kernel programmer
Email:  cinnion @ ka8zrt . com       http://cinnion.ka8zrt.com
Disclaimer: My opinions are my own.  Since I don't want them, why
            should my employer, or anybody else for that matter!