Commit Graph

12 Commits

Author SHA1 Message Date
bd31e5150b adjust copyright year 2021-10-05 10:52:37 +02:00
just_fun
a11b004805 pkgadd: avoid fake installations if unpacking fails
This patch aborts the package installation and remove the package
from the database on any extraction error. This fixes FS#620.

I don't know why the extraction errors were ignored (even documented).
The initial commit already had this behaviour. Another odd thing
is that the install status of the package was commited to the database
before it was installed while there are exceptions used in pkg_install():
 - archive open error
 - empty archive
 - archive read error
Any of these errors will falsely mark the package as installed (maybe
not a big problem with upgrades).

To avoid breaking something (else), this fix kicks in
only with fresh installs (not upgrades).

Thanks Erich Eckner, for pointing out that the issue
is reproductible with a read-only destination. Otherwise,
I don't think I would have looked at this issue.

A test case is presented with the FS issue, just in case someone
who loves C++ enough to dig deeper or have more knowledge about
the history of this program would take a closer look.
2017-09-19 23:44:01 +02:00
Fredrik Rinnestam
66f664ffb7 updated copyright to 2017 2017-02-07 21:01:46 +01:00
06c526de4e update copyright year 2016-10-05 11:26:26 +02:00
d804a38feb update copyright year to 2013 2013-01-21 16:14:45 +01:00
50689e8a22 Updated copyright notices to 2010. 2010-05-29 16:30:15 +02:00
Tilman Sauerbeck
780862a6ec Be less strict about the package name suffix.
Note that we never made sure that the string in PKG_EXT
really is the final part of the filename.
2010-05-18 19:24:17 +02:00
Tilman Sauerbeck
6fe55c25a2 Updated copyright notices. 2007-04-18 22:38:09 +02:00
Tilman Sauerbeck
9fb2521b15 Removed some dead (and buggy) code. 2006-12-29 16:51:27 +01:00
Tilman Sauerbeck
25f9975ca5 Use archive_errno() instead of errno for libarchive errors. 2006-11-15 20:34:22 +01:00
Tilman Sauerbeck
3e5b7ed9bb added support for INSTALL rules. based on a patch by johannes. documentation needs to be updated. 2006-08-25 12:54:15 +02:00
Simone Rota
9ac667e68d Initial import 2005-11-11 23:40:48 +01:00