]> 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>
Tue, 14 Nov 2023 09:55:43 +0000 (11:55 +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 138553ba10f3416220299550eea2df64bfa371a0..4c10ff46763992e805dca5f7715d6f403c318b26 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -2518,8 +2518,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: