Date: Sun, 19 Feb 2006 10:05:46 +0200 From: Sideris Michael <msid@daemons.gr> To: ports@freebsd.org Subject: python script to enhance ports. Message-ID: <20060219080546.GA39055@daemons.gr>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060219080546.GA39055>