mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-01 02:51:32 +00:00
add "add-patch" that provides the non-interactive version of
edit-patch
This commit is contained in:
parent
8e30fddfae
commit
af2497291f
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -31,6 +31,10 @@ ubuntu-dev-tools (0.109) UNRELEASED; urgency=low
|
|||||||
- Fix crash if uploading to ubuntu without building the package before.
|
- Fix crash if uploading to ubuntu without building the package before.
|
||||||
- Fix: The package was only uploaded if the target was "ubuntu".
|
- Fix: The package was only uploaded if the target was "ubuntu".
|
||||||
* Recommend bzr-builddeb (used by sponsor-patch for branches).
|
* Recommend bzr-builddeb (used by sponsor-patch for branches).
|
||||||
|
|
||||||
|
[ Michael Vogt ]
|
||||||
|
* add "add-patch" that provides the non-interactive version of
|
||||||
|
edit-patch
|
||||||
|
|
||||||
-- Benjamin Drung <bdrung@ubuntu.com> Wed, 22 Dec 2010 14:22:58 +0100
|
-- Benjamin Drung <bdrung@ubuntu.com> Wed, 22 Dec 2010 14:22:58 +0100
|
||||||
|
|
||||||
|
51
edit-patch
51
edit-patch
@ -3,8 +3,8 @@
|
|||||||
# Copyright (C) 2009 Canonical
|
# Copyright (C) 2009 Canonical
|
||||||
#
|
#
|
||||||
# Authors:
|
# Authors:
|
||||||
# Daniel Holbach
|
|
||||||
# Michael Vogt
|
# Michael Vogt
|
||||||
|
# Daniel Holbach
|
||||||
# David Futcher
|
# David Futcher
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it under
|
# This program is free software; you can redistribute it and/or modify it under
|
||||||
@ -142,6 +142,43 @@ edit_patch_quilt() {
|
|||||||
vcs_add $PREFIX/$1 $PREFIX/series
|
vcs_add $PREFIX/$1 $PREFIX/series
|
||||||
}
|
}
|
||||||
|
|
||||||
|
edit_patch_none() {
|
||||||
|
# Dummy edit-patch function, just display a warning message
|
||||||
|
echo "No patchsystem could be found so the patch was applied inline and a copy \
|
||||||
|
stored in debian/patches-applied. Please remember to mention this in your changelog."
|
||||||
|
}
|
||||||
|
|
||||||
|
add_patch_quilt() {
|
||||||
|
# $1 is the original patchfile, $2 the normalized name
|
||||||
|
# FIXME: use quilt import instead?
|
||||||
|
cp $1 $PREFIX/$2
|
||||||
|
if ! grep -q $2 $PREFIX/series; then
|
||||||
|
echo "$2" >> $PREFIX/series
|
||||||
|
fi
|
||||||
|
vcs_add $PREFIX/$2 $PREFIX/series
|
||||||
|
}
|
||||||
|
|
||||||
|
add_patch_cdbs() {
|
||||||
|
# $1 is the original patchfile, $2 the normalized name
|
||||||
|
cp $1 $PREFIX/$2
|
||||||
|
vcs_add $PREFIX/$2
|
||||||
|
}
|
||||||
|
|
||||||
|
add_patch_dpatch() {
|
||||||
|
# $1 is the original patchfile, $2 the normalized name
|
||||||
|
cp $1 $PREFIX
|
||||||
|
if ! grep -q $2 $PREFIX/00list; then
|
||||||
|
echo "$2" >> $PREFIX/00list
|
||||||
|
fi
|
||||||
|
vcs_add $PREFIX/$2 $PREFIX/00list
|
||||||
|
}
|
||||||
|
|
||||||
|
add_patch_none() {
|
||||||
|
# $1 is the original patchfile, $2 the normalized name
|
||||||
|
cp $1 $PREFIX/$2
|
||||||
|
vcs_add $PREFIX/$2
|
||||||
|
}
|
||||||
|
|
||||||
vcs_add() {
|
vcs_add() {
|
||||||
if [ -d .bzr ]; then
|
if [ -d .bzr ]; then
|
||||||
bzr add $@
|
bzr add $@
|
||||||
@ -204,12 +241,6 @@ detect_patch_location() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
edit_patch_none() {
|
|
||||||
# Dummy edit-patch function, just display a warning message
|
|
||||||
echo "No patchsystem could be found so the patch was applied inline and a copy \
|
|
||||||
stored in debian/patches-applied. Please remember to mention this in your changelog."
|
|
||||||
}
|
|
||||||
|
|
||||||
handle_file_patch() {
|
handle_file_patch() {
|
||||||
if [ "$PATCHTYPE" = "file" ]; then
|
if [ "$PATCHTYPE" = "file" ]; then
|
||||||
[ -f "$PATCHORIG" ] || fatal_error "No patch detected"
|
[ -f "$PATCHORIG" ] || fatal_error "No patch detected"
|
||||||
@ -259,7 +290,11 @@ main() {
|
|||||||
normalize_patch_path
|
normalize_patch_path
|
||||||
normalize_patch_extension
|
normalize_patch_extension
|
||||||
handle_file_patch
|
handle_file_patch
|
||||||
edit_patch_$PATCHSYSTEM $PATCHNAME
|
if [ "$(basename $0)" = "edit-patch" ]; then
|
||||||
|
edit_patch_$PATCHSYSTEM $PATCHNAME
|
||||||
|
elif [ "$(basename $0)" = "add-patch" ]; then
|
||||||
|
add_patch_$PATCHSYSTEM $1 $PATCHNAME
|
||||||
|
fi
|
||||||
add_patch_tagging $PATCHNAME
|
add_patch_tagging $PATCHNAME
|
||||||
add_changelog $PATCHNAME
|
add_changelog $PATCHNAME
|
||||||
vcs_commit
|
vcs_commit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user