Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Aug 2003 00:52:18 +0200
From:      Jens Rehsack <rehsack@liwing.de>
To:        Sergei Kolobov <sergei@kolobov.com>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: ANNOUNCE: FreeBSD Port Tools 0.20
Message-ID:  <3F299DA2.8080605@liwing.de>
In-Reply-To: <20030731213607.GA1867@chetwood.ru>
References:  <20030727132837.GA730@chetwood.ru> <3F23E83F.50601@liwing.de> <20030731213607.GA1867@chetwood.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------060104040304060405080303
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

On 31.07.2003 23:36, Sergei Kolobov wrote:

> On 2003-07-27 at 16:57 +0200, Jens Rehsack wrote:
>> great idea to make such tools public. As long I don't work
>> everytime with cvs but with cvsup, too, I used attached script
>> with a patched send-pr. It seems not so good as yours but it
>> doesn't require "a working copy of the port checked out of CVS".
>> I rank that very high, maybe there is a way to combine both
>> ways.
> 
> Thanks for suggestion - I have added a -d <diffmode> option
> in FreeBSD Port Tools 0.25:
> 
> -d CVS - diff against CVS (default)
> -d <dir> - diff against Ports tree in <dir> (e.g. /usr/ports)
> -d <pattern> - diff against a port in `pwd`<pattern> (e.g. ".orig")

with pattern in my submit-pr I meant sth. like *openldap*,
what I use to separate my patches from each other, if there're
several per port. Eg. I had a
~/patches/ports/lang/php4/patch-noipv6-Makefile and a
~/patches/ports/lang/php4/patch-openldap-Makefile, both patching
/usr/ports/lang/php4/Makefile and
/usr/ports/lang/php4/scripts/configure.php, but different thing...

To generate a patch from a cvsup'ed tree, I use attached script.

> I hope you can find it useful.

I'm sure I will :-)
I let you know my expiriences.

Jens

--------------060104040304060405080303
Content-Type: text/plain;
 name="difflist"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="difflist"

#!/bin/sh

usage()
{
	cat <<EOF
Usage $0 [-e <file-expr>] [-l <relative location>]
	file-expr	expression to identify the modified file, eg. pkg-*
	relative
	  location	location relative to current dir to search within
EOF
	exit 1
}

newExpr="*"
location=""

while getopts l:e: options
do
	case $options in
		e)
			newExpr=$OPTARG
			;;
		l)
			location=$OPTARG
			;;
		h)
			usage;
			break;;
		\?)
			usage
			break;;
	esac
done

origExpr=${newExpr}.orig
base=`pwd`/
wd="${base}${location}"

for filename in `find ${wd} -name "${origExpr}"`
do
	fn=`echo ${filename}|sed "s|${base}||"`
	ofn=`echo ${fn}|sed "s/.orig//"`
	echo "Index: ${ofn}"
	echo "==================================================================="
	echo "diff -u ${fn} ${ofn}"
	diff -u ${fn} ${ofn}
done

--------------060104040304060405080303--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F299DA2.8080605>