Remove dpatch dependency. 42/314542/1
authorxuhy <huayong.xu@samsung.com>
Mon, 24 Jun 2024 01:23:08 +0000 (09:23 +0800)
committerxuhy <huayong.xu@samsung.com>
Mon, 15 Jul 2024 06:31:03 +0000 (14:31 +0800)
dpatch package is not available on ubuntu 24.04.

Change-Id: I169ecf2b6998f20cd88647a2d7bbc2a1e40f0dbc
Signed-off-by: xuhy <huayong.xu@samsung.com>
debian/control
init_buildsystem

index 831940ba3c28c179941a6e89f483049dfa89090c..ec1ba0bafc3fb9e79dde976c37b58c95bba02d36 100644 (file)
@@ -2,7 +2,7 @@ Source: build
 Section: devel
 Priority: optional
 Maintainer: Adrian Schroeter <adrian@suse.de>
-Build-Depends: debhelper (>= 4), dpatch, cdbs,libc6,
+Build-Depends: debhelper (>= 4), cdbs, libc6
 Standards-Version: 3.7.2
 
 Package: build
index 3e4a892341042f8005e758c2666c76806053252e..aa3a072827d01cecf905d66caf028cbd201e11e3 100755 (executable)
@@ -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
 }