Commit 3dcdb41c authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Tim Gardner

UBUNTU: [Packaging] reconstruct -- automatically reconstruct against base tag

BugLink: http://bugs.launchpad.net/bugs/1555543Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
parent 25aec214
# The following targets are for the maintainer only! do not run if you don't
# know what they do.
.PHONY: printenv updateconfigs printchanges insertchanges startnewrelease diffupstream help updateportsconfigs editportsconfigs
.PHONY: printenv updateconfigs printchanges insertchanges startnewrelease diffupstream help updateportsconfigs editportsconfigs autoreconstruct
help:
@echo "These are the targets in addition to the normal $(DEBIAN) ones:"
......@@ -104,6 +104,9 @@ printchanges:
insertchanges:
@perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN)
autoreconstruct:
$(DROOT)/scripts/misc/gen-auto-reconstruct $(release) >$(DEBIAN)/reconstruct
diffupstream:
@git diff-tree -p refs/remotes/linux-2.6/master..HEAD $(shell ls | grep -vE '^(ubuntu|$(DEBIAN)|\.git.*)')
......
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <orig tag>|<base release>" 1>&2
exit 1
fi
tag="$1"
case "$tag" in
v*) ;;
*) tag="v${tag%.*}" ;;
esac
# Validate the tag.
count=$( git tag -l "$tag" | wc -l )
if [ "$count" != 1 ]; then
echo "$0: $tag: tag invalid" 1>&2
exit 1
fi
#git ls-tree -r --full-tree HEAD | grep ^120 | \
#while read mode type blobid name
# Identify all new symlinks since the proffered tag.
echo "# Recreate any symlinks created since the orig."
git diff "$tag.." --raw | awk '(/^:000000 120000/ && $5 == "A") { print $NF }' | \
while read name
do
link=$( readlink "$name" )
echo "[ ! -L '$name' ] && ln -sf '$link' '$name'"
done
# Identify all removed files since the proffered tag.
echo "# Remove any files deleted from the orig."
git diff "$tag.." --raw | awk '(/^:/ && $5 == "D") { print $NF }' | \
while read name
do
echo "rm -f '$name'"
done
# All done, make sure this does not complete in error.
echo "exit 0"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment