Date: Thu, 11 Apr 2013 14:15:20 +0300 From: Vitaly Magerya <vmagerya@gmail.com> To: Matthias Apitz <guru@unixarea.de> Cc: freebsd-ports@freebsd.org Subject: Re: problems with half installed ports Message-ID: <51669B48.4050905@gmail.com> In-Reply-To: <20130411101916.GA3339@tinyCurrent> References: <20130411101916.GA3339@tinyCurrent>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Apitz wrote: > Say, we are installing ports/A which depends on ports/B; the Makefile > detects the dependency and goes to install ports/B; if now during the > final installation process, some files are already delivered to > /usr/local, some files not, the system goes down (by intention because > it's time to go out), before the installation of ports/B is fully done > and registered to /var/db/pkg, next time when you restart installing > ports/A it often sees, because the file referenced in the Makefile > was allready installed (while others not), it thinks that ports/B was > installed fine and proceeds with ports/A which later (or even in some > other area) gives an error due to missing files of ports/B; > > I think, the only solution is that the dependency is not only based on > some (random) file of B, but on the fact if B was *fully* installed and > registered in /var/db/pkg; There is a case where this will break: if multiple ports install the same file, and you don't care which of them installed it, then you need to depend on the file, not on a specific port. For example, both www/node and www/node-devel install the same binary, and dependent ports will work with either of them. Now, it's true that using files as a proxy for interchangeable ports isn't ideal, and we could do better... Anyway, the problem you're describing allows for another fix. If ports/A depends of file-B, port system could check not only that file-B exists, but if there is also a package that installed it (via 'pkg which'), and if not, install ports/B. This will of course slow down ports operations somewhat.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51669B48.4050905>