tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: already installed?



On Fri, Mar 20, 2009 at 12:10:02PM -0400, D'Arcy J.M. Cain wrote:
> On Fri, 20 Mar 2009 08:04:26 -0500
> "Larson, Timothy E." <TELarson%west.com@localhost> wrote:
> > > > thank you for letting me know this.  I just wish you could tell
> > > > me before I've spent the time extracting, patching,
> > > > buildlinking, and compiling.  could you please let me know this
> > > > before you start the process?  it would save me quite a bit of
> > > > time.  thanks.
> > > 
> > > And this is a good part to do it like it is currently handled.
> > > That saves one to deinstall a working package and leaves you
> > > without it if the build fails.

the package has already been built and is installed.  by this logic I
would be performing a compile / deinstall / reinstall cycle and end up
where I started.  I could see this being useful behavior if the new
version != old version, or new options != old options, but that's not
the case I'm running into.

> > Couldn't it check early and act later (if needed)?
> 
> Check early and do what?  You may want pkg_delete followed by install
> or you may want FORCE_PKG_REGISTER.  Or, you may want to skip but
> maybe only if the versions are the same.
> 
> The answer may be easy but the question is complicated.  :-)

my most common use case (and where I constantly run into this):

- clean out obsolete packages in pkg_comp chroot with pkg_chk -r
- generate list of obsolete packages on machine-to-update with pkgdepgraph
- feed output of pkgdepgraph through some scripts to generate list of
  new packages to install and possibly build
- build out-of-date packages with pkg_comp

some the out-of-date packages have already been re-built inside the
chroot during previous iterations of this process.  I burn a ton of CPU
performing unecessary recompilation only for it to bomb at the end of
the process with "Installing for xxx-1.00 / xxx-1.00 is already
installed" errors.

I'm asking for assistance to avoid wasting my time.

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | 
agrier%poofygoof.com@localhost


Home | Main Index | Thread Index | Old Index