Date: Tue, 15 Oct 2002 03:17:32 +0000 From: "Clark C. Evans" <cce@clarkevans.com> To: Tim Aslat <tim@spyderweb.com.au> Cc: ports@freebsd.org Subject: Re: configuration database confusion Message-ID: <20021015031732.GA37604@doublegemini.com> In-Reply-To: <20021015105221.351863de.tim@spyderweb.com.au> References: <20021014211418.GC36236@doublegemini.com> <20021015105221.351863de.tim@spyderweb.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 15, 2002 at 10:52:21AM +0930, Tim Aslat wrote: | In the immortal words of "Clark C. Evans" <cce@clarkevans.com>... | > My problem is that if I install a given port on one | > system, it somehow marks that port as installed so | > that "make install" no longer attempts an installation. | > This problem can be emulated by: | | Try looking in the work directory, there is an empty file installed | there for each part of the build process. these files start with | .<portname>-install or something similar to that. | Just delete the -install file and it works fine. Thank you, I used the above nugget to produce the following python script which will "resync" what pkg_info thinks with what the port mechanism knows about. import os def syncports(root='',prn=0): pkg = {} if root: lst = os.popen("chroot %s pkg_info" % root, "r") else: lst = os.popen("pkg_info","r") while lst: ln = lst.readline() if not ln: break ln = ln.split(" ")[0] pkg[ln] = None idx = open("%s/usr/ports/INDEX" % root ) for port in idx.readlines(): port = port.split("|") name = port[0] path = port[1] file = "%s%s/work/.install_done.%s" % (root,path,name) try: if pkg.has_key(name): fh = open(file,"w") fh.write("") fh.close() if prn: print "==> ", name else: os.remove(file) except: pass if '__main__' == __name__: syncports(prn=1) | Your other concern regarding bandwidth, is false. the distfiles are | stored in /usr/ports/distfiles so don't need to be downloaded again, | except via the local network. Nods. I'm new to this... and the ports just didn't behave quite as I expected. In particular, the "make install" for a port should be checking with pkg_info rather than using the .install_done files. Any chance of having this fixed? Is there any reason for the install_done file? | The other option is to make package instead of install, this creates a | binary package which should work on the target machines, rather than | having to do an install. But this solution isn't recursive is it? I mean, will it build me all of the dependent ports as well? The above hack works... but I'd wish that "make install" is a bit smarter (or actually, perhaps more stupid...) Best, Clark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021015031732.GA37604>