File: 116_ar_nonexistent_files.dpatch

package info (click to toggle)
binutils 2.15-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 86,288 kB
  • ctags: 93,872
  • sloc: ansic: 672,886; asm: 243,857; exp: 44,950; makefile: 29,286; sh: 17,224; lisp: 7,387; yacc: 5,855; lex: 1,520; perl: 1,383; cpp: 1,339; sed: 522; pascal: 175; awk: 26
file content (41 lines) | stat: -rw-r--r-- 1,401 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh -e
## 116_ar_nonexistent_files.dpatch
##
## DP: Description: Fix ar to error out on non-existent files. (#267139)
## DP: Author: Nick Clifton  <nickc@redhat.com>
## DP: Upstream status: Committed to trunk
## DP: Date: 2004-09-09
## DP: URL: http://sources.redhat.com/bugzilla/show_bug.cgi?id=363#c2

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
diff -urNad /home/james/debian/packages/binutils/binutils-2.15/binutils/ar.c binutils-2.15/binutils/ar.c
--- /home/james/debian/packages/binutils/binutils-2.15/binutils/ar.c	2004-05-17 20:35:50.000000000 +0100
+++ binutils-2.15/binutils/ar.c	2004-09-09 18:12:49.613666653 +0100
@@ -1325,8 +1325,7 @@
       /* Add to the end of the archive.  */
       after_bfd = get_pos_bfd (&arch->next, pos_end, NULL);
 
-      if (get_file_size (* files_to_move) > 0
-	  && ar_emul_append (after_bfd, *files_to_move, verbose))
+      if (ar_emul_append (after_bfd, *files_to_move, verbose))
 	changed = TRUE;
 
     next_file:;