diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-01-30 14:35:02 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-01-30 14:35:02 +0200 |
commit | c553970061a61f4a6c62b8cf949f1012259854e6 (patch) | |
tree | 7c89fd843eb2f665289c13a743777c46405fdc42 /src/io.c | |
parent | 0276e227315f9ef94843d3bcf7f564221b150f26 (diff) | |
download | apk-tools-c553970061a61f4a6c62b8cf949f1012259854e6.tar.gz apk-tools-c553970061a61f4a6c62b8cf949f1012259854e6.tar.bz2 apk-tools-c553970061a61f4a6c62b8cf949f1012259854e6.tar.xz apk-tools-c553970061a61f4a6c62b8cf949f1012259854e6.zip |
remove support for old database location in /var
the location changed in apk-tools 2.1.0 (March 2011) which was
used in Alpine Linux 2.2.
Diffstat (limited to 'src/io.c')
-rw-r--r-- | src/io.c | 31 |
1 files changed, 0 insertions, 31 deletions
@@ -813,37 +813,6 @@ size_t apk_ostream_write_string(struct apk_ostream *os, const char *string) return len; } -int apk_move_file(int atfd, const char *from, const char *to) -{ - struct apk_istream *is; - struct stat64 st; - int rc, tofd; - - if (renameat(atfd, from, atfd, to) == 0) - return 0; - - if (fstatat64(atfd, from, &st, 0) != 0) - return -errno; - - is = apk_istream_from_file(atfd, from); - if (IS_ERR(is)) return PTR_ERR(is); - if (!is) return -ENOENT; - - tofd = openat(atfd, to, O_CREAT | O_RDWR | O_TRUNC | O_CLOEXEC, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - if (tofd < 0) { - rc = -errno; - goto close_is; - } - - rc = apk_istream_splice(is, tofd, st.st_size, NULL, NULL); - close(tofd); - unlinkat(atfd, from, 0); -close_is: - is->close(is); - return rc; -} - struct cache_item { apk_hash_node hash_node; unsigned int genid; |