From d20d4510930f6f10c27744d4d39ec9a4a5413516 Mon Sep 17 00:00:00 2001 From: Aleksey Cheusov Date: Sat, 6 Sep 2008 22:37:17 +0000 Subject: [PATCH] version -> 0.14.0 Major changes pkg_src_summary: added option -M which implies -m and moves/adds ASSIGNMENTS field to PKGPATH. Example: 0 ~>export PSS_FIELDS='PKGPATH PKGNAME' 0 ~>pkg_src_summary -M lang/lua www/php-apc www/ap2-python PKGPATH=lang/lua PKGNAME=lua-5.1.3nb1 PKGPATH=www/php-apc:PHP_VERSION_REQD=4 PKGNAME=php4-apc-4.4.8.3.0.16 PKGPATH=www/php-apc:PHP_VERSION_REQD=5 PKGNAME=php5-apc-5.2.6.3.0.16 PKGPATH=www/ap2-python:PKG_APACHE=apache2,PYTHON_VERSION_REQD=25 PKGNAME=ap2-py25-python-3.2.10 PKGPATH=www/ap2-python:PKG_APACHE=apache2,PYTHON_VERSION_REQD=24 PKGNAME=ap2-py24-python-3.2.10 PKGPATH=www/ap2-python:PKG_APACHE=apache2,PYTHON_VERSION_REQD=23 PKGNAME=ap2-py23-python-3.2.10 PKGPATH=www/ap2-python:PKG_APACHE=apache22,PYTHON_VERSION_REQD=25 PKGNAME=ap22-py25-python-3.2.10 PKGPATH=www/ap2-python:PKG_APACHE=apache22,PYTHON_VERSION_REQD=24 PKGNAME=ap22-py24-python-3.2.10 PKGPATH=www/ap2-python:PKG_APACHE=apache22,PYTHON_VERSION_REQD=23 PKGNAME=ap22-py23-python-3.2.10 0 ~> --- pkg_summary-utils/files/Makefile.version | 2 +- pkg_summary-utils/files/NEWS | 45 +++++++++++++++++++++++ pkg_summary-utils/files/pkg_src_summary | 42 +++++++++++++++++++-- pkg_summary-utils/files/pkg_src_summary.1 | 4 +- 4 files changed, 88 insertions(+), 5 deletions(-) diff --git a/pkg_summary-utils/files/Makefile.version b/pkg_summary-utils/files/Makefile.version index c9f7f5c1a2..db46e4932c 100644 --- a/pkg_summary-utils/files/Makefile.version +++ b/pkg_summary-utils/files/Makefile.version @@ -1 +1 @@ -VERSION= 0.13.1 +VERSION= 0.14.0 diff --git a/pkg_summary-utils/files/NEWS b/pkg_summary-utils/files/NEWS index 01b97095ce..a04c616232 100644 --- a/pkg_summary-utils/files/NEWS +++ b/pkg_summary-utils/files/NEWS @@ -1,3 +1,48 @@ +---------------------------------------------------------------------- +Version 0.14.0, by Aleksey Cheusov, Sun, 7 Sep 2008 01:25:37 +0300 + + pkg_src_summary: added option -M which implies -m and moves/adds + ASSIGNMENTS field to PKGPATH. + + Example: + + 0 ~>export PSS_FIELDS='PKGPATH PKGNAME' + 0 ~>pkg_src_summary -M lang/lua www/php-apc www/ap2-python + PKGPATH=lang/lua + PKGNAME=lua-5.1.3nb1 + + PKGPATH=www/php-apc:PHP_VERSION_REQD=4 + PKGNAME=php4-apc-4.4.8.3.0.16 + + PKGPATH=www/php-apc:PHP_VERSION_REQD=5 + PKGNAME=php5-apc-5.2.6.3.0.16 + + PKGPATH=www/ap2-python:PKG_APACHE=apache2,PYTHON_VERSION_REQD=25 + PKGNAME=ap2-py25-python-3.2.10 + + PKGPATH=www/ap2-python:PKG_APACHE=apache2,PYTHON_VERSION_REQD=24 + PKGNAME=ap2-py24-python-3.2.10 + + PKGPATH=www/ap2-python:PKG_APACHE=apache2,PYTHON_VERSION_REQD=23 + PKGNAME=ap2-py23-python-3.2.10 + + PKGPATH=www/ap2-python:PKG_APACHE=apache22,PYTHON_VERSION_REQD=25 + PKGNAME=ap22-py25-python-3.2.10 + + PKGPATH=www/ap2-python:PKG_APACHE=apache22,PYTHON_VERSION_REQD=24 + PKGNAME=ap22-py24-python-3.2.10 + + PKGPATH=www/ap2-python:PKG_APACHE=apache22,PYTHON_VERSION_REQD=23 + PKGNAME=ap22-py23-python-3.2.10 + + 0 ~> + +---------------------------------------------------------------------- +Version 0.13.1, by Aleksey Cheusov, Sun, 7 Sep 2008 01:25:37 +0300 + + VARIANTS7 is reimplemented through pbulk's mk/pbulk/pbulk-index.mk. + I hope this API it will not change... + ---------------------------------------------------------------------- Version 0.13.0, by Aleksey Cheusov, Sat, 6 Sep 2008 23:05:15 +0300 diff --git a/pkg_summary-utils/files/pkg_src_summary b/pkg_summary-utils/files/pkg_src_summary index 7e163795af..df6d8532e5 100755 --- a/pkg_summary-utils/files/pkg_src_summary +++ b/pkg_summary-utils/files/pkg_src_summary @@ -61,6 +61,7 @@ OPTIONS: -A|--with-alldeps implies -d and -D -m|--multi generate ASSIGNMENTS field for multi-variant packages + -M|--MULTI implies -m and move/add ASSIGNMENTS to PKGPATH field EOF } @@ -119,6 +120,8 @@ process_options (){ with_bdep=1;; -m) multi_var=1;; + -M) + multi_var=2;; --) shift break;; @@ -136,7 +139,7 @@ process_options (){ process_options $PSS_OPTIONS "$@" -if test "_$multi_var" = _1; then +if test "$multi_var"; then # VARIANTS7 - artificial field keeping all variable assignments # for multi-variant packages. This should be in pkgsrc but # idea was declined by pkgsrc developers. @@ -417,7 +420,37 @@ NF == 0 { ' "$@" } -if test "_$multi_var" = _1; then +if test "_$multi_var" = _2; then + move_ASSIGNMENTS_to_PKGPATH (){ + awk ' + $0 ~ /^PKGPATH=/ { + pkgpath = $0 + next + } + $0 ~ /^ASSIGNMENTS=/ { + assigns = substr($0, 13) + gsub(/ /, ",", assigns) + next + } + NF == 0 { + if (assigns != "") + print pkgpath ":" assigns body "\n" + else + print pkgpath body "\n" + + pkgpath = assigns = body = "" + next + } + { body = body "\n" $0 } + ' "$@" + } +else + move_ASSIGNMENTS_to_PKGPATH (){ + cat "$@" + } +fi + +if test "$multi_var"; then pkg_grep_summary VARIANTS7 '$2 != ""' \ < $partial_summary_fn >$multi_pkgs_fn @@ -426,10 +459,13 @@ if test "_$multi_var" = _1; then < $partial_summary_fn >$normal_pkgs_fn grep -v VARIANTS7 $normal_pkgs_fn > $partial_summary_fn + rm $normal_pkgs_fn + runpipe0 \ summary2all_variants < $multi_pkgs_fn '|' \ pkg_src_summary $make_plist '|' \ - grep -v VARIANTS7 >> "$partial_summary_fn" + grep -v VARIANTS7 '|' \ + move_ASSIGNMENTS_to_PKGPATH >> "$partial_summary_fn" fi fi diff --git a/pkg_summary-utils/files/pkg_src_summary.1 b/pkg_summary-utils/files/pkg_src_summary.1 index e1d3323f5b..fb83b4d4e0 100644 --- a/pkg_summary-utils/files/pkg_src_summary.1 +++ b/pkg_summary-utils/files/pkg_src_summary.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_src_summary.1,v 1.12 2008/09/06 20:31:30 cheusov Exp $ +.\" $NetBSD: pkg_src_summary.1,v 1.13 2008/09/06 22:37:17 cheusov Exp $ .\" .\" Copyright (c) 2008 by Aleksey Cheusov (vle@gmx.net) .\" Absolutely no warranty. @@ -46,6 +46,8 @@ implies -d and -D .It Fl m generate summary for all variants of multi-variant packages (Python {22,23,24,25}, PHP {4,5}, Apache {1.3,2,2.2} etc.) +.It Fl M +implies -m and moves/adds ASSIGNMENTS field to PKGPATH .El .Sh ENVIRONMENT .Bd -literal