From owner-freebsd-ports@FreeBSD.ORG Sun Feb 19 08:11:12 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A55116A481 for ; Sun, 19 Feb 2006 08:11:12 +0000 (GMT) (envelope-from msid@daemons.gr) Received: from jefferson.hostingzoom.com (jefferson.hostingzoom.com [216.118.117.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38ECA43D46 for ; Sun, 19 Feb 2006 08:11:11 +0000 (GMT) (envelope-from msid@daemons.gr) Received: from dslcustomer-210-207.vivodi.gr ([83.171.210.207]:18488 helo=localhost) by jefferson.hostingzoom.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.52) id 1FAjen-0005de-KM for ports@freebsd.org; Sun, 19 Feb 2006 02:11:03 -0600 Date: Sun, 19 Feb 2006 10:05:46 +0200 From: Sideris Michael To: ports@freebsd.org Message-ID: <20060219080546.GA39055@daemons.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: mutt-ng/devel-r581 (FreeBSD) X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - jefferson.hostingzoom.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - daemons.gr X-Source: X-Source-Args: X-Source-Dir: Cc: Subject: python script to enhance ports. X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2006 08:11:12 -0000 This is something I did in one day so if there are any bugs bare with me, I= am looking for feedback here. So, this is a python script I made to enhanc= e the ports system. In what way... Well, it allows you to see the knobs of = the port you want to install as well as the knobs of the ports' dependencie= s. In a matter of fact it can be used also as a searching tool for ports as= well as a tool for installing and uninstalling ports. These are more or le= ss the current functionalities of this python script. I would like to take the opportunity and elaborate on the philosophy behind= that script. A freebsd user is constantly installing and uninstalling port= s for whatever reasons. Each port provides a number of knobs that allows yo= u to configure it. There are quite a few ways to do so. The most efficient = way though is the way that this script is based on. When you install a port= , you care about saving any customizations this port might have. Now this p= ort, ideally, can be configured through the OPTIONS framework, if it suppor= ts it. Even if it does though it doesn't guarantee that its dependencies do= support it as well. So, the user has to deal with knobs directly in this c= ase. He has two ways of doing so. The global knobs, that he puts in /etc/ma= ke.conf and can be read from portinstall and portupgrade, and the port spec= ific knobs. metaport, the name I gave to the tool, allows you to view the k= nobs of the port and its dependencies before you install it. Additionally, = it shows you which from the dependencies support the Options framework as i= t does for the port itself. Then the user has just to just where to place t= he knobs according to the current configuration. He can choose global setup= and put any interesting knobs in /etc/make.conf, or follow a more speciali= zed setup putting the appropriate knobs in /usr/local/etc/pkgtools.conf in = the appropriate section. Then he can use metaport to install the port. Init= ially it will attempt to configure it through the Options framework, if any= available, and then it will use portinstall to install it, since portinsta= ll, and portupgrade, reads both from make.conf and pkgtools.conf. This ends= up to a totally organized and customized environment. This is more or less the functionality you should expect as well as the abi= lity to uninstall ports using pkg_deinstall in an agressive yet interactive= way. I am really looking forward for feedback on this one since I think it= can evolve into something better and hopefully more efficient. For those w= ho are interested into giving it a try, you need python, duh. It runs smoot= hly, hopefully, on my laptop freebsd 6.1 and python 2.4.2. Below I give you= the link from where you can fetch metaport. Enjoy! http://black.daemons.gr/msid/metaport