From: xuhy Date: Mon, 24 Jun 2024 01:23:08 +0000 (+0800) Subject: Remove dpatch dependency. X-Git-Tag: accepted/tools/devbase/tools/20250527.103727~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa0b3c22b2afa40040ad039dc3b53314a93e4024;p=tools%2Fbuild.git Remove dpatch dependency. dpatch package is not available on ubuntu 24.04. Change-Id: I169ecf2b6998f20cd88647a2d7bbc2a1e40f0dbc Signed-off-by: xuhy --- diff --git a/debian/control b/debian/control index 831940b..ec1ba0b 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: build Section: devel Priority: optional Maintainer: Adrian Schroeter -Build-Depends: debhelper (>= 4), dpatch, cdbs,libc6, +Build-Depends: debhelper (>= 4), cdbs, libc6 Standards-Version: 3.7.2 Package: build diff --git a/init_buildsystem b/init_buildsystem index 3e4a892..aa3a072 100755 --- a/init_buildsystem +++ b/init_buildsystem @@ -462,7 +462,11 @@ downloadpkg() { ;; esac # if there is such package, didn't mv. - mv -n "$destfile" "$SRC" || cleanup_and_exit 1 + if [ ! -f "$SRC" ]; then + # avoid race condition in multi-thread cases, + # and skip errors if $SRC exists, because nothing is moved in this case. + ln -PT "$destfile" "$SRC" && rm "$destfile" || true || cleanup_and_exit 1 + fi rm -rf $destdir }