summaryrefslogtreecommitdiffstats
path: root/src/apk_archive.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2008-11-14 14:26:59 +0200
committerTimo Teras <timo.teras@iki.fi>2008-11-14 14:26:59 +0200
commit8e23a2ba4eb7f6192c6bce8a6da81004803eca3f (patch)
tree1450b08f0e2818a4bc12206081b6777b3e92b7f8 /src/apk_archive.h
parent86676ac8c40a96880f323c2b1a09a5714d85705e (diff)
downloadapk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.tar.bz2
apk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.tar.xz
db: checksum installed files, protect config files
Checksum of installed is computed on the fly when extracting them and it'll be saved to fdb. When installing config files those are diverted with suffix .apk-new if earlier version of same file with local changes exist.
Diffstat (limited to 'src/apk_archive.h')
-rw-r--r--src/apk_archive.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/apk_archive.h b/src/apk_archive.h
index b51aee5..ac2387f 100644
--- a/src/apk_archive.h
+++ b/src/apk_archive.h
@@ -16,29 +16,17 @@
#include "apk_blob.h"
#include "apk_io.h"
-struct apk_archive_entry {
- char *name;
- char *link_target;
- char *uname;
- char *gname;
- off_t size;
- uid_t uid;
- gid_t gid;
- mode_t mode;
- time_t mtime;
- dev_t device;
-};
-
typedef int (*apk_archive_entry_parser)(void *ctx,
- const struct apk_archive_entry *ae,
+ const struct apk_file_info *ae,
struct apk_istream *istream);
+int apk_file_get_info(const char *filename, struct apk_file_info *fi);
struct apk_istream *apk_gunzip_bstream(struct apk_bstream *);
int apk_parse_tar(struct apk_istream *, apk_archive_entry_parser parser, void *ctx);
int apk_parse_tar_gz(struct apk_bstream *, apk_archive_entry_parser parser, void *ctx);
-int apk_archive_entry_extract(const struct apk_archive_entry *ae,
+int apk_archive_entry_extract(const struct apk_file_info *ae,
struct apk_istream *is,
const char *to);