* 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
This commit is contained in:
Adrien Cunin 2008-09-07 15:32:07 +02:00
parent 6009e9d41b
commit 4988769730
2 changed files with 25 additions and 3 deletions

10
debian/changelog vendored
View File

@ -1,10 +1,18 @@
ubuntu-dev-tools (0.45ubuntu1) intrepid; urgency=low ubuntu-dev-tools (0.45ubuntu1) intrepid; urgency=low
[ Siegfried-Angel Gevatter Pujals ]
* common.py: * common.py:
- Trying to read from a locked sqlite cookie database isn't a fatal - Trying to read from a locked sqlite cookie database isn't a fatal
error anymore. error anymore.
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> 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 <adri2000@ubuntu.com> Sun, 07 Sep 2008 15:10:08 +0200
ubuntu-dev-tools (0.44ubuntu1) intrepid; urgency=low ubuntu-dev-tools (0.44ubuntu1) intrepid; urgency=low

View File

@ -66,6 +66,20 @@ else
echo "Please execute «$0» in the source folder." >&2 && exit 1 echo "Please execute «$0» in the source folder." >&2 && exit 1
fi 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.*\)')" ] if [ -z "$(head -1 $DEBIANDIR/changelog | grep -E '\(*ubuntu.*\)')" ]
then then
echo "Latest changelog entry has no Ubuntu version number." >&2 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 ;; *) echo "No section found for this package; aborting" >&2; exit 1 ;;
esac esac
for file in control{,.in,.real}; do for file in $controls; do
[ -f $DEBIANDIR/$file ] && sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/$file sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/$file
done done