diff options
author | John Baldwin <jhb@FreeBSD.org> | 2013-11-15 20:01:07 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2013-11-15 20:01:07 +0000 |
commit | 8cc81f38e9421d6b7eb4849a8f52cbc224bdd772 (patch) | |
tree | 42e48beb48d4a7bf1823d9259b9ad965c54eb6a5 /tools | |
parent | 38ec4caa8b0c2495b777a03aad8af137b6cdf029 (diff) | |
download | src-8cc81f38e9421d6b7eb4849a8f52cbc224bdd772.tar.gz src-8cc81f38e9421d6b7eb4849a8f52cbc224bdd772.zip |
Fix a couple of issues with -F:
- Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks.
In particular, always install a file where the only change was
the FreeBSD ID even if -F is specified.
- Fix the -F option in the case that the only upstream change is a
change in the FreeBSD ID and the local file is removed.
- Add tests for these two cases.
Notes
Notes:
svn path=/head/; revision=258185
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/regression/usr.sbin/etcupdate/fbsdid.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tools/regression/usr.sbin/etcupdate/fbsdid.sh b/tools/regression/usr.sbin/etcupdate/fbsdid.sh index 07df248f54ad..e713c35a8b3a 100755 --- a/tools/regression/usr.sbin/etcupdate/fbsdid.sh +++ b/tools/regression/usr.sbin/etcupdate/fbsdid.sh @@ -195,6 +195,17 @@ EOF these are some local mods to the file EOF + + # local-remove: A file removed locally changed it's FreeBSD ID + # but nothing else + store_id $OLD/local-remove ": head/local-remove 12000 jhb " + store_id $NEW/local-remove ": head/local-remove 12345 jhb " + for i in $OLD $NEW; do + cat >> $i/local-remove <<EOF + +this is a file +EOF + done } # $1 - relative path to file that should be missing from TEST @@ -282,6 +293,7 @@ cat > $WORKDIR/correct.out <<EOF C /add Warnings: Modified regular file remains: /remove + Removed file changed: /local-remove EOF echo "Differences for regular:" @@ -299,6 +311,7 @@ conflict /conflict 868452f666fea1c60ffb918ad9ad9607 file /local "" aa33e614b5e749449f230e2a2b0072eb conflict /local 3df93e64043c8e348fc625b93ea220f4 file /local-already "" 0298b958a603049f45ae6a109c4f7fea +missing /local-remove # Now test with -F. @@ -329,3 +342,38 @@ file /conflict "" dc27978df125b0daeb7d9b93265f03fd conflict /conflict 868452f666fea1c60ffb918ad9ad9607 file /local "" 3ed5a35e380c8a93fb5f599d4c052713 file /local-already "" 0298b958a603049f45ae6a109c4f7fea +missing /local-remove + +# Now test with -F and -A forcing all installs. (-A should have +# precedence over -F) + +build_trees + +$COMMAND -A '/*' -rF -d $WORKDIR -D $TEST > $WORKDIR/testAF.out + +cat > $WORKDIR/correctAF.out <<EOF + D /remove + U /already + U /conflict + U /local + U /local-already + A /local-remove + U /old + U /add +EOF + +echo "Differences for -A '/*' -F:" +diff -u -L "correct" $WORKDIR/correctAF.out -L "test" $WORKDIR/testAF.out + +missing /remove +file /old "" 6a9f34f109d94406a4de3bc5d72de259 +noconflict /old +file /already "" 21f4eca3aacc702c49878c8da7afd3d0 +noconflict /already +file /add "" 0208bd647111fedf6318511712ab9e97 +noconflict /add +file /conflict "" 75ee141c4136beaf14e39de92efa84e4 +noconflict /conflict +file /local "" 6a8fc5c2755b7a49015089f5e1dbe092 +file /local-already "" 49045f8b51542dd634655301cd296f66 +file /local-remove "" 5c38322efed4014797d7127f5c652d9d |