OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.0 KiB

  1. #!/bin/sh -e
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../uclibc/pkg_patch/binutils-300-006_better_file_error.patch
  6. # Copyright (C) 2006 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. # --- SDE-COPYRIGHT-NOTE-END ---
  18. ## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
  19. ##
  20. ## All lines beginning with `## DP:' are a description of the patch.
  21. ## DP: Specify which filename is causing an error if the filename is a
  22. ## DP: directory. (#45832)
  23. if [ $# -ne 1 ]; then
  24. echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  25. exit 1
  26. fi
  27. [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  28. patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
  29. case "$1" in
  30. -patch) patch $patch_opts -p1 < $0;;
  31. -unpatch) patch $patch_opts -p1 -R < $0;;
  32. *)
  33. echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  34. exit 1;;
  35. esac
  36. exit 0
  37. @DPATCH@
  38. diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
  39. --- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
  40. +++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
  41. @@ -150,6 +150,13 @@
  42. {
  43. bfd *nbfd;
  44. const bfd_target *target_vec;
  45. + struct stat s;
  46. +
  47. + if (stat (filename, &s) == 0)
  48. + if (S_ISDIR(s.st_mode)) {
  49. + bfd_set_error (bfd_error_file_not_recognized);
  50. + return NULL;
  51. + }
  52. nbfd = _bfd_new_bfd ();
  53. if (nbfd == NULL)