[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [livepatch-build-tools 3/4] livepatch-build: Do not follow every symlink for patch file
> On 29. Apr 2019, at 14:40, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> wrote: > > On 4/8/19 9:32 AM, Pawel Wieczorkiewicz wrote: >> In some build systems symlinks might be used for patch file names >> to point from target directories to actual patches. Following those >> symlinks breaks naming convention as the resulting built modules >> would be named after the actual hardlink insteads of the symlink. >> Livepatch-build obtains hotpatch name from the patch file, so it >> should not canonicalize the file path resolving all the symlinks to >> not lose the original symlink name. >> Signed-off-by: Pawel Wieczorkiewicz <wipawel@xxxxxxxxx> >> Reviewed-by: Martin Pohlack <mpohlack@xxxxxxxxx> >> Reviewed-by: Bjoern Doebel <doebel@xxxxxxxxx> >> Reviewed-by: Norbert Manthey <nmanthey@xxxxxxxxx> >> --- >> livepatch-build | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> diff --git a/livepatch-build b/livepatch-build >> index c057fa1..796838c 100755 >> --- a/livepatch-build >> +++ b/livepatch-build >> @@ -265,7 +265,9 @@ done >> [ -z "$DEPENDS" ] && die "Build-id dependency not given" >> SRCDIR="$(readlink -m -- "$srcarg")" >> -PATCHFILE="$(readlink -m -- "$patcharg")" >> +# We need an absolute path because we move around, but we need to >> +# retain the name of the symlink (= realpath -s) >> +PATCHFILE="$(readlink -f "$(dirname "$patcharg")")/$(basename "$patcharg")" >> CONFIGFILE="$(readlink -m -- "$configarg")" >> OUTPUT="$(readlink -m -- "$outputarg")" >> > > This works, but would it not be simpler to just pass $patcharg into > make_patch_name()? > No strong opinion here, but the readlink change felt less invasive (no changes to the existing semantics). Thank you for looking into this. > -- > Ross Lagerwall > Best Regards, Pawel Wieczorkiewicz Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich Ust-ID: DE 289 237 879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |