apache 2.4
Bjarne D Mathiesen
macintosh at mathiesen.info
Fri Apr 20 00:08:12 PDT 2012
Ryan Schmidt wrote:
>
> On Apr 19, 2012, at 18:17, Bjarne D Mathiesen wrote:
>
>> Ryan Schmidt wrote
>>>
>>> When we actually commit the update to apache2 2.4.x, we'd have to
>>> increase the revision of every module port that we want to get rebuilt.
>>
>> Do you have a procedure for doing this or are you interested in a script
>> that'll generate the diff files ???
>
> I had no specific procedure in mind yet. A number of scripts had floated around to help with this before but I don't have any of them handy. This is part of the reason I'm less than thrilled about doing this update and am therefore postponing it until a later time when I feel like dealing with it. If you have a script handy that might help.
OK -- this bash 4.2 script generates modified portfiles and diff files
for all ports that have either a dependency on apache2 -or- a apache2
variant.
line-breaks are a bit messy ;-)
#!/macports/bin/bash
port list | while read portname[0] portname[1] portname[2]
do
declare founddep=$(port deps ${portname[0]} | grep 'apache2' |
wc -l)
declare foundvar=$(port variants ${portname[0]} | grep 'apache2' |
wc -l)
if [[ ${founddep} -eq 1 || ${foundvar} -eq 1 ]]
then
echo -e "${portname[2]}"
mkdir -p portfiles/${portname[2]}
cp $(port file ${portname[0]})
portfiles/${portname[2]}/'Portfile.orig'
declare portrev=( $( grep 'revision' $(port file ${portname[0]}) ) )
if [[ ${#portrev[@]} -eq 0 ]]
then
sed -En -e "1,/^version/p"
portfiles/${portname[2]}/'Portfile.orig' \
> portfiles/${portname[2]}/'Portfile'
echo -e "revison\t\t0" \
>> portfiles/${portname[2]}/'Portfile'
sed -E -e "1,/^version/d"
portfiles/${portname[2]}/'Portfile.orig' \
>> portfiles/${portname[2]}/'Portfile'
else
portrev[1]=$(( ++portrev[1] ))
sed -E -e "/^revision/s/[[:digit:]]{1,}/${portrev[1]}/" \
portfiles/${portname[2]}/'Portfile.orig' \
> portfiles/${portname[2]}/'Portfile'
fi
diff -u \
$(port file ${portname[0]}) \
portfiles/${portname[2]}/Portfile \
> portfiles/${portname[2]}/patch-Portfile.diff
fi
done
--
Bjarne D Mathiesen
København N ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
More information about the macports-users
mailing list