diff --git a/debian/changelog b/debian/changelog index 8d9f757..e226355 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,18 @@ ubuntu-dev-tools (0.45ubuntu1) intrepid; urgency=low + [ Siegfried-Angel Gevatter Pujals ] * common.py: - Trying to read from a locked sqlite cookie database isn't a fatal error anymore. - -- Siegfried-Angel Gevatter Pujals Sat, 06 Sep 2008 15:46:55 +0200 + [ Adrien Cunin ] + * update-maintainer: + - check at the beginning of the script that the necessary files are + readable/writable, and note which control files we are going to modify + - at the end, only modify those control files, so that the script doesn't + return 1 anymore when it was actually successful + + -- Adrien Cunin Sun, 07 Sep 2008 15:10:08 +0200 ubuntu-dev-tools (0.44ubuntu1) intrepid; urgency=low diff --git a/update-maintainer b/update-maintainer index 5403ef4..d321f14 100755 --- a/update-maintainer +++ b/update-maintainer @@ -66,6 +66,20 @@ else echo "Please execute «$0» in the source folder." >&2 && exit 1 fi +if [ ! -r $DEBIANDIR/changelog ] +then + echo "Make sure that the changelog file is readable." >&2 && exit 1 +fi + +for file in control{,.in,.real}; do + if [ -f $DEBIANDIR/$file ]; then + if [ ! -r $DEBIANDIR/$file -o ! -w $DEBIANDIR/$file ]; then + echo "Make sure that the control file(s) is (are) readable and writable." >&2 && exit 1 + fi + controls="$controls $file" + fi +done + if [ -z "$(head -1 $DEBIANDIR/changelog | grep -E '\(*ubuntu.*\)')" ] then echo "Latest changelog entry has no Ubuntu version number." >&2 @@ -95,6 +109,6 @@ case $section in *) echo "No section found for this package; aborting" >&2; exit 1 ;; esac -for file in control{,.in,.real}; do - [ -f $DEBIANDIR/$file ] && sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/$file +for file in $controls; do + sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/$file done