Re: bin/genDLA proposal: auto-commit requested DLA numbers (was: Re: [SECURITY] [DLA 265-1] unattended-upgrades security update)
Hi,
On Sat, 04 Jul 2015, Mike Gabriel wrote:
> >It displays a colorful warning and offers to commit only the
> >modified file (if you use svn, if you use git-svn like me, you're on your
> >own).
>
> Why not also commit the changes to the dla-needed.txt file?
I just forgot about it. You're right we should do that too.
What about this then (not entirely tested, I use git-svn):
diff --git a/bin/gen-DSA b/bin/gen-DSA
index 395a8f1..9156d0b 100755
--- a/bin/gen-DSA
+++ b/bin/gen-DSA
@@ -368,4 +368,17 @@ EOF
sed -rn '/^'"$PACKAGE"'\b/{: next;n;/^\s/b next;d};p' $needed_file > $needed_file.new
mv $needed_file.new $needed_file
echo "$IDMODE text written to ./$IDMODE-$DAID"
+ if [ "$IDMODE" = "DLA" ]; then
+ warn "you need to commit the changes to data/$IDMODE/list to actually reserve the $IDMODE number and avoid conflicts with others."
+ if [ -d .svn ]; then
+ idmode=$(echo "$IDMODE" | tr A-Z a-z)
+ echo "Here are the pending changes:"
+ svn diff data/$IDMODE/list data/$idmode-needed.txt
+ echo -n "Do you want to commit them now ? [Yn] "
+ read reply
+ if [ "$reply" = "Y" ] || [ "$reply" = "" ] || [ "$reply" = "y" ]; then
+ svn commit data/$IDMODE/list data/$idmode-needed.txt
+ fi
+ fi
+ fi
fi
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/
Reply to: