Commit Graph

27 Commits

Author SHA1 Message Date
bd31e5150b adjust copyright year 2021-10-05 10:52:37 +02:00
Fun
d51cdd1c8f pkgadd: add lzip support (closes FS#1638)
It should complete the commit ae5df6094b ('pkgmk: dropped bzip2 support, added support for lzip').

Signed-off-by: Fun <just.the.real.fun@gmail.com>
2018-04-10 23:18:51 +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
Tilman Sauerbeck
f30a8abd09 Switched to libarchive 3.x. 2012-03-27 20:28:46 +02:00
50689e8a22 Updated copyright notices to 2010. 2010-05-29 16:30:15 +02:00
Tilman Sauerbeck
a09b143460 Added support for bzip2- and xz-compressed packages. 2010-05-16 12:35:34 +02:00
Tilman Sauerbeck
0b4af85e50 Only enable the tar and gzip modules when initialising libarchive.
This means you will only be able to run pkgadd/pkginfo on gzipped tarballs
but not on tarballs that were compressed with eg bzip2 or xz.
2009-06-14 00:02:54 +02:00
Lucas Hazel
6ae354d751 Bug #244: Relative paths are supported now in pkgadd -r. 2008-04-11 18:19:09 +02:00
Johannes Weiner
d324dd089c Bug #204: Restore mtime for extracted files. 2007-12-03 18:37:50 +01:00
Tilman Sauerbeck
6fe55c25a2 Updated copyright notices. 2007-04-18 22:38:09 +02:00
Tilman Sauerbeck
c9984aa86e Moved archive initialization code to INIT_ARCHIVE. 2007-04-17 20:49:58 +02:00
Tilman Sauerbeck
9fb2521b15 Removed some dead (and buggy) code. 2006-12-29 16:51:27 +01:00
Tilman Sauerbeck
2a62ed9ad2 Set ARCHIVE_EXTRACT_UNLINK when extracting archive entries. 2006-12-06 21:17:49 +01:00
Tilman Sauerbeck
e83769cac3 Fixed setting up the flags for archive_read_extract(). 2006-12-02 01:55:52 +01:00
Simone Rota
25efd91b9e preserve owner/permissions when extracting 2006-12-02 01:43:19 +01:00
Tilman Sauerbeck
80db05ef8d Fixed the permission lookup problem for hardlinks.
We now do two runs over the archive, where the first one remembers
permissions for hardlink targets, which are then looked up in the
second run.
2006-11-24 21:59:10 +01:00
Tilman Sauerbeck
7f84e1cc9e Prefer archive_entry_mode() over archive_entry_stat().
If we're only interested in the mode, just call archive_entry_mode()
instead of getting the whole stat struct.
2006-11-24 21:42:59 +01:00
Tilman Sauerbeck
fa6b0879f2 Some indentation fixes. 2006-11-15 20:34:33 +01:00
Tilman Sauerbeck
25f9975ca5 Use archive_errno() instead of errno for libarchive errors. 2006-11-15 20:34:22 +01:00
Matthias-Christian Ott
c3434674df Switched from libtar to libarchive. 2006-11-15 20:32:56 +01:00
Tilman Sauerbeck
2213199529 tell the user when we didn't install a file because an INSTALL rule kicked in 2006-08-27 12:12:21 +02: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
Tilman Sauerbeck
5401bd4576 use the proper sentinel in the execl() call 2006-04-14 10:06:11 +02:00
Simone Rota
9ac667e68d Initial import 2005-11-11 23:40:48 +01:00