2009/10/15 Xavier <shiningxc@gmail.com>
That's not what I meant. I don't care much what happens with complex md5sums line, as long as ONLY the md5sums line are lost or broken and not the whole pkgbuild.
It is amazing how many messages we exchanged (like 20 between here and the bug comments) for a completely null progress.
I presented 3 technical problems : 1) sed -ne '1h;1!H;${;g;s/md5sums=([^)]*)/'$(makepkg -g 2>/dev/null)'/g;p;}' PKGBUILD sed: -e expression #1, char 73: unterminated `s' command 2) sed "/md5sums=([^)]*)/d" -> broken in some case 3) { rm PKGBUILD; awk '$0 ~ /^md5sums/ {i = 1; system("makepkg -g 2>/dev/null")}; !i {print}; $0 ~ /\)/ {i = 0}' > PKGBUILD; } < PKGBUILD -> cannot call an internal makepkg bash function (e.g: generate_checksums md5)
If you have nothing to contribute and no alternative to propose, no need to write books about it :) We just won't implement the feature request, that's all.
My bad :) Mystery solved. Against your patched makepkg: @@ -587,7 +587,11 @@ local integlist=$(get_integlist) for integ in ${integlist[@]}; do - sed -i "/${integ}sums=(/,/)$/d" "$file" + if grep ${integ}sums "$file" | grep ")" &> /dev/null; then + sed -i "/${integ}sums=(.*)/d" "$file" + else + sed -i "/${integ}sums=(/,/)$/d" "$file" + fi done generate_checksums >> "$file" That sed only worked if the patterns were separated by newlines, so now we do two kinds. Not perfect, but at least meets your criterion.