1 |
vapier 07/12/10 08:39:41 |
2 |
|
3 |
Added: tar-1.19-update-flag.patch digest-tar-1.19-r1 |
4 |
Log: |
5 |
Fix from upstream for an update regression #200315 by Billy DeVincentis. |
6 |
(Portage version: 2.1.4_rc9) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-arch/tar/files/tar-1.19-update-flag.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/tar/files/tar-1.19-update-flag.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/tar/files/tar-1.19-update-flag.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: tar-1.19-update-flag.patch |
15 |
=================================================================== |
16 |
http://bugs.gentoo.org/200315 |
17 |
|
18 |
2007-12-05 Sergey Poznyakoff <gray@×××××××.ua> |
19 |
|
20 |
* src/buffer.c (check_compressed_archive): Do not bail out if the |
21 |
file is too short, set boolean flag, passed as an argument |
22 |
instead. This fixes a bug introduced on 2007-08-24. See also |
23 |
tests/shortupd.at. |
24 |
|
25 |
Index: src/buffer.c |
26 |
=================================================================== |
27 |
RCS file: /cvsroot/tar/tar/src/buffer.c,v |
28 |
retrieving revision 1.115 |
29 |
retrieving revision 1.116 |
30 |
diff -u -p -r1.115 -r1.116 |
31 |
--- src/buffer.c 31 Oct 2007 13:10:55 -0000 1.115 |
32 |
+++ src/buffer.c 5 Dec 2007 09:45:22 -0000 1.116 |
33 |
@@ -229,19 +229,21 @@ static struct zip_magic const magic[] = |
34 |
|
35 |
/* Check if the file ARCHIVE is a compressed archive. */ |
36 |
enum compress_type |
37 |
-check_compressed_archive () |
38 |
+check_compressed_archive (bool *pshort) |
39 |
{ |
40 |
struct zip_magic const *p; |
41 |
bool sfr; |
42 |
- bool short_file = false; |
43 |
+ bool temp; |
44 |
+ |
45 |
+ if (!pshort) |
46 |
+ pshort = &temp; |
47 |
|
48 |
/* Prepare global data needed for find_next_block: */ |
49 |
record_end = record_start; /* set up for 1st record = # 0 */ |
50 |
sfr = read_full_records; |
51 |
read_full_records = true; /* Suppress fatal error on reading a partial |
52 |
record */ |
53 |
- if (find_next_block () == 0) |
54 |
- short_file = true; |
55 |
+ *pshort = find_next_block () == 0; |
56 |
|
57 |
/* Restore global values */ |
58 |
read_full_records = sfr; |
59 |
@@ -254,9 +256,6 @@ check_compressed_archive () |
60 |
if (memcmp (record_start->buffer, p->magic, p->length) == 0) |
61 |
return p->type; |
62 |
|
63 |
- if (short_file) |
64 |
- ERROR ((0, 0, _("This does not look like a tar archive"))); |
65 |
- |
66 |
return ct_none; |
67 |
} |
68 |
|
69 |
@@ -273,11 +272,16 @@ open_compressed_archive () |
70 |
|
71 |
if (!multi_volume_option) |
72 |
{ |
73 |
- enum compress_type type = check_compressed_archive (); |
74 |
+ bool shortfile; |
75 |
+ enum compress_type type = check_compressed_archive (&shortfile); |
76 |
|
77 |
if (type == ct_none) |
78 |
- return archive; |
79 |
- |
80 |
+ { |
81 |
+ if (shortfile) |
82 |
+ ERROR ((0, 0, _("This does not look like a tar archive"))); |
83 |
+ return archive; |
84 |
+ } |
85 |
+ |
86 |
/* FD is not needed any more */ |
87 |
rmtclose (archive); |
88 |
|
89 |
@@ -502,15 +506,18 @@ _open_archive (enum access_mode wanted_a |
90 |
{ |
91 |
case ACCESS_READ: |
92 |
{ |
93 |
+ bool shortfile; |
94 |
enum compress_type type; |
95 |
|
96 |
archive = STDIN_FILENO; |
97 |
|
98 |
- type = check_compressed_archive (); |
99 |
+ type = check_compressed_archive (&shortfile); |
100 |
if (type != ct_none) |
101 |
FATAL_ERROR ((0, 0, |
102 |
_("Archive is compressed. Use %s option"), |
103 |
compress_option (type))); |
104 |
+ if (shortfile) |
105 |
+ ERROR ((0, 0, _("This does not look like a tar archive"))); |
106 |
} |
107 |
break; |
108 |
|
109 |
@@ -554,7 +561,7 @@ _open_archive (enum access_mode wanted_a |
110 |
O_RDWR | O_CREAT | O_BINARY, |
111 |
MODE_RW, rsh_command_option); |
112 |
|
113 |
- if (check_compressed_archive () != ct_none) |
114 |
+ if (check_compressed_archive (NULL) != ct_none) |
115 |
FATAL_ERROR ((0, 0, |
116 |
_("Cannot update compressed archives"))); |
117 |
break; |
118 |
|
119 |
|
120 |
|
121 |
1.1 app-arch/tar/files/digest-tar-1.19-r1 |
122 |
|
123 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/tar/files/digest-tar-1.19-r1?rev=1.1&view=markup |
124 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/tar/files/digest-tar-1.19-r1?rev=1.1&content-type=text/plain |
125 |
|
126 |
Index: digest-tar-1.19-r1 |
127 |
=================================================================== |
128 |
MD5 bcc2e19b19823b9ab68c94586067a792 tar-1.19.tar.bz2 1882486 |
129 |
RMD160 302d814c1b1d6a8074a9d26e202eb59284b675b0 tar-1.19.tar.bz2 1882486 |
130 |
SHA256 c690d46da77b1ee07b7c758de46d6d07da698a75e63ed3e8f83e3fca8f809cb4 tar-1.19.tar.bz2 1882486 |
131 |
|
132 |
|
133 |
|
134 |
-- |
135 |
gentoo-commits@g.o mailing list |