summaryrefslogtreecommitdiffstats
path: root/main/apk-tools/0001-db-fix-package-caching.patch
blob: e4173c7db8aa813d76e9d894ceb29325fc67f7b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 1c6ab67984b20b49ed12a0576e59cd446a44ae84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Fri, 21 Jan 2011 09:37:19 +0200
Subject: [PATCH] db: fix package caching

---
 src/database.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/database.c b/src/database.c
index c985233..53a18c7 100644
--- a/src/database.c
+++ b/src/database.c
@@ -2061,9 +2061,9 @@ static int apk_db_unpack_pkg(struct apk_database *db,
 
 	if (need_copy) {
 		if (r == 0)
-			renameat(db->cachetmp_fd, file, db->cache_fd, file);
+			renameat(db->cachetmp_fd, item, db->cache_fd, item);
 		else
-			unlinkat(db->cachetmp_fd, file, 0);
+			unlinkat(db->cachetmp_fd, item, 0);
 	}
 
 	if (r != 0) {
-- 
1.7.1