On Thu, 2005-01-20 at 00:51 +0100, Alexander Mieland wrote: 
> > If your application requires it, then I don't see how it would be
> > breaking any policies.
> 
> well, until now basc also requires to copy the emerge.log, but this 
> breaks the policies.

Actually, it breaks no policies other than common Unix practices.  Your
application should be self-fulfilling.  It should be able to install and
use data that it collected itself, because you cannot guarantee that
there will be a /var/log/emerge.log or that you will have permission to
it.

> > Personally, I would have the compile done in a pkg_config function and
> > have the ebuild simply display whether the function needed to be run
> > or not based on the existence of the file.
> 
> can you tell me, how this should look like in the ebuild, before I again 
> get flamed because I've released an ebuild which is against all policies 
> or whatever...?

pkg_postinst() {
  if [ -f ${ROOT}/etc/basc/bash-time ]
  then
    einfo "Benchmark data present.  To re-run the benchmark execute:"
    einfo "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
  else
    ewarn "Benchmark data not present.  You will need to execute:"
    ewarn "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
    ewarn "before using basc."
  fi
}

pkg_config() {
  mkdir -p ${ROOT}/tmp/${PF}
  cd ${ROOT}/tmp/${PF}
  unpack ${DISTFILES}/bash-3.0.tar.bz2
  cd bash-3.0
  time ./configure > time.configure
  time make > time.make
  # Bunch of math I'm not going to do in my head right now
  cp time.total ${ROOT}/etc/basc/bash-time
}

-- 
Chris Gianelloni
Release Engineering - Operations/QA Manager
Games - Developer
Gentoo Linux

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to