]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3147] trivial hammer fix: don't move files
authorAndrei Pavel <andrei@isc.org>
Mon, 13 Nov 2023 10:04:34 +0000 (12:04 +0200)
committerAndrei Pavel <andrei@isc.org>
Mon, 13 Nov 2023 10:04:34 +0000 (12:04 +0200)
Don't move files to themselves.

Solves error: mv: 'kea-pkg/isc-kea-2.5.4-r20231113065823.apk' and
'kea-pkg/isc-kea-2.5.4-r20231113065823.apk' are the same file

hammer.py

index f4556d8c1d8f34d191ae32ec38321aa657d46560..a4f08c246d2b2c4ead2706b30fe5c0988e57ee90 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -2519,8 +2519,9 @@ def _build_native_pkg(system, revision, features, tarball_path, env, check_times
     elif system in ['fedora', 'centos', 'rhel']:
         execute('mv pkgs/* %s' % pkgs_dir)
     elif system in ['alpine']:
-        #execute('mv kea-src/* %s' % pkgs_dir)
-        execute('mv kea-pkg/* %s' % pkgs_dir)
+        # Don't move files if the source and the target locations are the same.
+        if pkgs_dir != 'kea-pkg':
+            execute('mv kea-pkg/* %s' % pkgs_dir)
     elif system in ['arch']:
         pass
     else: