Advertisement
Thaodan

bug7_gitapply_nogit.patch

Jan 11th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.13 KB | None | 0 0
  1. # Björn Bidar <theodortormgrade@gmail.com>
  2. # fiy #7 "git apply" fails silently under specific conditions
  3.  
  4. --- a/patches/patchinstall.sh   2015-01-10 22:27:16.000000000 +0100
  5. +++ b/patches/patchinstall.sh   2015-01-12 06:12:32.045926414 +0100
  6. @@ -659,15 +659,23 @@
  7.  
  8.  # Apply the patches using gitapply.sh, a small wrapper around 'patch'
  9.  if test "$backend" = "patch"; then
  10. -
  11. -       patch_apply ()
  12. -       {
  13. -               echo "Applying $1"
  14. +  if [ -d "$DESTDIR/.git" ] || (cd $DESTDIR ;git rev-parse --git-dir) > /dev/null 2>&1 ; then
  15. +       patch_apply ()
  16. +       {
  17. +               echo "Applying $1"
  18. +               if ! ../debian/tools/gitapply.sh --notgit -d "$DESTDIR" < "$1"; then
  19. +                       abort "Failed to apply patch, aborting!"
  20. +               fi
  21. +       }
  22. +  else
  23. +       patch_apply ()
  24. +       {
  25. +               echo "Applying $1"
  26.                 if ! ../debian/tools/gitapply.sh -d "$DESTDIR" < "$1"; then
  27.                         abort "Failed to apply patch, aborting!"
  28.                 fi
  29. -       }
  30. -
  31. +       }
  32. +  fi
  33.  # GIT backend - apply patches using 'git am'
  34.  elif test "$backend" = "git" -o "$backend" = "git-am"; then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement