Date: Fri, 11 Nov 2005 15:23:03 +0000 (GMT) From: Jan Grant <Jan.Grant@bristol.ac.uk> To: "Michael C. Shultz" <ringworm01@gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: gnome-upgrade.sh Message-ID: <Pine.GSO.4.62.0511111516410.19268@mail.ilrt.bris.ac.uk> In-Reply-To: <200511110639.47578.ringworm01@gmail.com> References: <43726E40.3090701@iaces.com> <200511110603.44395.ringworm01@gmail.com> <Pine.GSO.4.62.0511111425250.19268@mail.ilrt.bris.ac.uk> <200511110639.47578.ringworm01@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Fri, 11 Nov 2005, Michael C. Shultz wrote: > > > One last thing, if you make a script that does the conversion, might I > > > have a copy? Here is how I'll set up pm-020.conf to work: > > > > Surely. pkgtools.conf is actually a ruby script: I've no idea how > > dynamically the rules are evaluated but something that works ona > > prettystock bunch of settings should be close to trivial. > > Thank you. If it works well I might use it to have portmanager pick up > settings from portupgrade "on the fly", or at least provide some sort > of conversion command. Thanks :) Attached uses ruby to parse the pkgtools.conf (it relies on the portupgrade ruby package) - it'll spit out the appropriate sections (HOLD_PKGS, BEFOREBUILD, AFTERINSTALL and MAKE_ARGS) in what I think the portmanager format is (although the script is trivial, as you can see). Note that the MAKE_ARGS etc go through a hash/dictionary and consequently are unordered. A small snippet of the output I get from this: [[[ CATEGORY/PORT|OPTION=| # do not delete this line! # Ignored packages from HOLD_PKGS IGNORE|bsdpan-*| IGNORE|x11/nvidia-driver| IGNORE|editors/openoffice*| # STOP entries come from BEFOREBUILD # START entries come from AFTERINSTALL START|/databases/postgresql7 chmod a+x /usr/local/share/postgresql/502.pgsql| START|/www/jakarta-tomcat5 chmod a-x /usr/local/etc/rc.d/020.jakarta-tomcat*.sh| # Package options from MAKE_ARGS # Note: pkgtools.conf will use the UNION of all matching lines security/gnupg|WITH_SUID_GPG=yes| devel/subversion|WITH_PYTHON=yes WITH_MOD_DAV_SVN=yes WITHOUT_BDB=yes| x11/kde3|| deskutils/kdepim3|WITH_KPILOT=yes| www/gallery|| www/rt*|WITH_FASTCGI=yes WITH_APACHE2=yes DB_TYPE=Pg DB_HOST=localhost DB_DATABASE=rt3 DB_USER=rt3| www/apache2|WITH_PROXY_MODULES=yes| multimedia/kdemultimedia*|WITH_LAME=yes WITH_XINE=yes WITH_MPEGLIB=yes| */*|BATCH=yes| java/jdk14|NATIVE_BOOTSTRAP=yes JAVA_HOME=| */kde*|WITH_KDE_DEBUG=yes| mail/exim|WITH_EXIMON=yes WITH_EXISCAN_ACL=yes WITH_TCP_WRAPPERS=yes WITH_PGSQL=yes WITHOUT_PERL=yes | ]]] -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44 (0)117 3317661 http://ioctl.org/jan/ I'm the dandy information superhighwayman. [-- Attachment #2 --] #!/usr/local/bin/ruby require "pkgtools" puts "CATEGORY/PORT|OPTION=| # do not delete this line!" load_config # held packages puts "" puts "# Ignored packages from HOLD_PKGS" puts "" config_value(:HOLD_PKGS).each do |pkg| puts "IGNORE|" + pkg + "|" end # beforebuild becomes stop puts "" puts "# STOP entries come from BEFOREBUILD" puts "" config_value(:BEFOREBUILD).each do |pkg| puts "STOP|/" + pkg[0] + " " + pkg[1] + "|" end # afterinstall becomes start puts "" puts "# START entries come from AFTERINSTALL" puts "" config_value(:AFTERINSTALL).each do |pkg| puts "START|/" + pkg[0] + " " + pkg[1] + "|" end # package options. puts "" puts "# Package options from MAKE_ARGS" puts "# Note: pkgtools.conf will use the UNION of all matching lines" puts "" config_value(:MAKE_ARGS).each do |pkg| puts pkg[0] + "|" + pkg[1] + "|" end
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.62.0511111516410.19268>
