Version HEAD
+ - Don't treat dummy packages consisting of compressed 0-byte files as
+ invalid.
+
- Avoid crashing on invalid/empty .lst.gz file. Make "files in use"
dialog modal to prevent the user from aborting the install and creating
a corrupt .lst.gz.
+2008-04-08 Brian Dessent <brian@dessent.net>
+
+ * CHANGES: Update.
+ * install.cc (Installer::installOne): Cope with compressed
+ 0-byte dummy packages. Fix progress bar update bug introduced
+ in earlier refactoring.
+
2008-04-08 Brian Dessent <brian@dessent.net>
* CHANGES: Update.
if ((tarstream = archive::extract (try_decompress)) == NULL)
{
/* Decompression succeeded but we couldn't grok it as a valid tar
- archive, so notify the user and abort processing this package. */
+ archive. */
+ char c;
+ if (try_decompress->peek (&c, 1) < 0)
+ /* In some cases, maintainers have uploaded bzipped
+ 0-byte files as dummy packages instead of empty tar files.
+ This is common enough that we should not treat this as an
+ error condition. */
+ ;
+ else
+ {
+ note (NULL, IDS_ERR_OPEN_READ, source.Cached (),
+ "Invalid or unsupported tar format");
+ ++errors;
+ }
delete try_decompress;
- note (NULL, IDS_ERR_OPEN_READ, source.Cached (),
- "Invalid or unsupported tar format");
- ++errors;
return;
}
}
// We're done with this file
break;
}
- progress (tarstream->tell ());
+ progress (pkgfile->tell ());
num_installs++;
}