Hello all,

I think I may have solved my own problem and possibly identified a
subtle bug.

sort_packages() in pkginstall.sh builds a graph of what packages are
dependant on what.
There is code to catch the case where there is no other packages
dependant on the "current" one which is triggered by the absense of the
+REQUIRED_BY file in the package DB for this "current" package.

However, there is no code to catch the case where the current packages
*has* dependants in the hosting system (i.e. REQUIRED_BY exists) but
none of those dependants are requested for the image being built and
therefore no "arc" is added to the presortfile (to be used as input to
tsort).

As a result, that packages is missed completely and (I'm presumming now)
the package copy code gets upset soon after. 

By detecting this case and adding "echo $i NULL >> $presortfile" to
cover it, my problem went away.  The precise diff is:

mgr2# diff pkginstall.sh.orig pkginstall.sh
126a127,128
>               else
>                   echo $i NULL >> $presortfile

At least, that's how it looks to me....

Cheers,
martin

On Sun, 06 Aug 2006 17:14:30 -0700, "Martin Ryan" <[EMAIL PROTECTED]>
said:
> Take 2:  This time with content.
>
> Hello people,
> 
> Firstly, thank you for an excellent prlject - It's been most helpfull
> for what I need.
> 
> Now my problem -
> I've created images with extra accounts, and some customised files (via
> extra/customroot) all with no problems.
> When I tried to add perl though, I had the problem below.
> The files below shows a run with NO_BUILDWORLD uncommented - I have done
> it with that commented out and it results in the same error.  Both runs
> have had NO_BUILDKERNEL in effect as I assume that there's nothing extra
> needed in the kernel just to run perl!
> 
> Any assistance you can give would be greately appreciated.
> 
> Many thanks,
> martin
> 
> --- error produced when running "make iso" ---
> 
> #### Building world for i386 architecture ####
> NO_BUILDWORLD set, skipping build
> #### Building kernel for i386 architecture ####
> NO_BUILDKERNEL set, skipping build
> #### Installing world for i386 architecture ####
> >>> Making hierarchy
> >>> Installing everything
> #### Installing kernel for i386 architecture ####
> >>> Installing kernel
> Installing packages listed in /usr/local/share/freesbie/conf/packages
> Finding origins... 1 found
> Finding dependencies... none found
> Sorting 1 packages by dependencies... *** Error code 1
> 
> Stop in /usr/local/share/freesbie.
> 
> --- /usr/local/share/freesbie/conf/packages ---
> 
> perl-5.8.8
> 
> --- Contents of freesbie.conf -----
> 
> #!/bin/sh
> #
> # Freesbie configuration file.
> #
> # Pay attention not to use the syntax
> # BASEDIR=${BASEDIR:-"/foo/bla"}
> # otherwise you'll end up using the default value of BASEDIR instead of
> # "foo/bla" !
> # Simply write:
> # BASEDIR="/foo/bla"
> 
> # Variables
> 
> # Path where files are installed.
> BASEDIR=${BASEDIR:-"/usr/local/freesbie-fs"}
> 
> # Temporary directory used when building images
> CLONEDIR=${CLONEDIR:-"/usr/local/freesbie-clone"}
> 
> # Directory with system sources
> SRCDIR=${SRCDIR:-"/usr/src"}
> 
> # Path of the built iso, use absolute path
> ISOPATH=${ISOPATH:-"/usr/obj/FreeSBIE.iso"}
> 
> # Path of the built image, use absolute path
> IMGPATH=${IMGPATH:-"/usr/obj/FreeSBIE.img"}
> 
> # Default parameters for the image, use diskinfo(1) to obtain yours
> SECTS=${SECTS:-501760}  # Total number of sectors
> SECTT=${SECTT:-32}      # Sectors/track
> HEADS=${HEADS:-16}      # Heads
> 
> #
> # Optional variables
> 
> # Arguments passed to make(1) when building world and kernel.
> # Cannot be an environment variable.
> MAKEJ=${MAKEJ:-"-j3"}
> 
> # Arguments passed to make(1) when building world and kernel.
> # Can also be an environment variable.
> #
> #MAKEOPT="-DNO_CLEAN"
> 
> # Kernel configuration file, with complete path
> #
> #KERNELCONF=/complete/path/to/MYCUSTOMKERNEL
> 
> # If you want to use a custom make.conf, define it here. Otherwise,
> # make.conf or make.conf.minimal under conf/ are used.
> #
> #MAKE_CONF=/etc/make.conf
> 
> # You can specify which files to add to your system one by one. Just
> # put the list in a text file and set the absolute path in FILE_LIST
> # variable
> #
> #FILE_LIST=/my/own/file_list.txt
> 
> # You can specify which files to remove from your built system. Just
> # put the list in a text file and set the absolute path in PRUNE_LIST
> # variable. Wildcards are also accepted
> #
> #PRUNE_LIST=/my/own/prune_em_all.txt
> 
> # Set PKGFILE variable to a text file containing a list of packages to
> # install in the built system. This file can be either a pkg_info(1)
> # like output either a list of packages without version number. Please
> # note that this file will be rewritten if you run `make pkgselect'
> #
> #PKGFILE=/my/own/pkg_info_output.txt
> 
> # Set EXTRA variable to the additional plugins you want to run in your
> # system. Please note that plugins are executed in the same order as
> # listed in this variable
> #
> EXTRA="comconsole customroot customscripts rootmfs etcmfs"
> 
> # Knobs
> 
> # Define MINIMAL to build a minimal world (i.e.: use
> # make.conf.minimal, full of NO_* knobs.
> #
> # MINIMAL=YES
> 
> # Define NO_BUILDWORLD to avoid rebuilding world. Be sure you know
> # what you're doing, you should have an already compiled world
> #
> NO_BUILDWORLD=YES
> 
> # Define NO_BUILDKERNEL to avoid rebuilding kernel. Be sure you know
> # what you're doing, you should have an already compiled kernel
> #
> NO_BUILDKERNEL=YES
> 
> # Define MAKEOBJDIRPREFIX to use an object directory different than
> /usr/obj.
> # Be sure you know what you're doing, it is easy to introduce suble
> bugs.
> #
> #MAKEOBJDIRPREFIX=/path/to/obj
> 
> # Define NO_COMPRESSEDFS if you don't want to have compressed fs
> # inside the resulting image.
> #
> # NO_COMPRESSEDFS=YES
> 
> # Define NO_UNIONFS if you want to avoid using unionfs in the built
> # system
> #
> NO_UNIONFS=YES # Unionfs is broken in > 6.0, so disable it by default
> 
> NO_ACPI=YES
> NO_ATM=YES
> NO_AUTHPF=YES
> NO_BIND=YES
> NO_BIND_DNSSEC=YES
> NO_BIND_ETC=YES
> NO_BIND_LIBS_LWRES=YES
> NO_BIND_MTREE=YES
> NO_BIND_NAMED=YES
> NO_BIND_UTILS=YES
> NO_BLUETOOTH=YES
> NO_CVS=YES
> NO_CXX=YES
> NO_DICT=YES
> NO_FORTRAN=YES
> NO_GAMES=YES
> NO_GCOV=YES
> NO_GDB=YES
> NO_GPIB=YES
> NO_HESIOD_LIBC=YES
> NO_HTML=YES
> NO_I4B=YES
> NO_INET6=YES
> NO_INFO=YES
> NO_IPFILTER=YES
> NO_KERBEROS=YES
> NO_KLDLOAD=YES
> NO_LIBC_R=YES
> NO_LIBPTHREAD=YES
> NO_LIBTHR=YES
> NO_LPR=YES
> NO_MAILWRAPPER=YES
> NO_MAN=YES
> NO_MODULES=YES
> NO_NETCAT=YES
> NO_NETGRAPH=YES
> NO_NIS=YES
> NO_OBJC=YES
> NO_P1003_1B=YES
> NO_PAM=YES
> NO_PF=YES
> NO_PROFILE=YES
> # NO_RESCUE=YES
> NO_TOOLCHAIN=YES
> NO_USB=YES
> NO_VINUM=YES
> NO_SENDMAIL=YES
> NO_SHAREDOCS=YES
> PPP_NO_RADIUS=YES
> -- 
>   Martin Ryan
>   [EMAIL PROTECTED]
> 
> -- 
> http://www.fastmail.fm - A no graphics, no pop-ups email service
> 
> -- 
> FreeSBIE mailing list (http://www.freesbie.org)
-- 
  Martin Ryan
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

-- 
FreeSBIE mailing list (http://www.freesbie.org)

Reply via email to