aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/swupd-server/swupd-server/0001-delta.c-fix-xattr-test-after-patching.patch
blob: 78fb85a70d9ed3fde07d3f374b05a23761ae0b53 (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
29
30
31
32
33
34
35
36
From 048808fc3d88e1f9b7daed87f582ef35cf1dce22 Mon Sep 17 00:00:00 2001
From: Patrick Ohly <patrick.ohly@intel.com>
Date: Tue, 8 Nov 2016 18:32:00 +0100
Subject: [PATCH 1/3] delta.c: fix xattr test after patching

At the moment, swupd_create_pack fails when some files have xattrs and
get patched because the xattrs of the test file do not match the
original, unpatched file.

That's because xattrs_copy() was applied to the wrong target file.

Fixes: swupd-server/#35

Upstream-Status: Submitted [https://github.com/clearlinux/swupd-server/pull/37]

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 src/delta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/delta.c b/src/delta.c
index 3ddb13a..67e7df7 100644
--- a/src/delta.c
+++ b/src/delta.c
@@ -98,7 +98,7 @@ void __create_delta(struct file *file, int from_version)
 		ret = 0;
 		goto out;
 	}
-	xattrs_copy(original, newfile);
+	xattrs_copy(original, testnewfile);
 
 	/* does xattrs have been correctly copied?*/
 	if (xattrs_compare(original, testnewfile) != 0) {
-- 
2.1.4