use fs.copyfile instead of deprecated copy
copy arg in configure_file API is deprecated since meson
version 0.64.0. As we moved to meson version 1.1.1 we can
leverage the filesystem module copyfile() to achive the
same result.
Change-Id: I8ec540a505060306ff643a153cb2ca1b1ca4d35e
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/meson.build b/meson.build
index 07ded48..2c277ec 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,7 @@
add_project_arguments('-include', '@0@'.format(config), language: 'cpp')
cpp = meson.get_compiler('cpp')
+filesystem = import('fs')
phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
sdbusplus = dependency('sdbusplus')
@@ -181,13 +182,11 @@
if get_option('systemd').enabled()
systemd_system_unit_dir = dependency('systemd').get_variable(
'systemdsystemunitdir')
-
- configure_file(
- copy: true,
- input: 'pldmd/service_files/pldmd.service',
+ filesystem.copyfile(
+ 'pldmd/service_files/pldmd.service',
+ 'pldmd.service',
install: true,
- install_dir: systemd_system_unit_dir,
- output: 'pldmd.service',
+ install_dir: systemd_system_unit_dir
)
if get_option('oem-ibm').enabled()
diff --git a/oem/ibm/service_files/meson.build b/oem/ibm/service_files/meson.build
index 96c3b07..c0f0314 100644
--- a/oem/ibm/service_files/meson.build
+++ b/oem/ibm/service_files/meson.build
@@ -1,16 +1,12 @@
subdir('scripts')
-configure_file(
- copy: true,
- input: 'pldm-create-phyp-nvram.service',
+filesystem.copyfile(
+ 'pldm-create-phyp-nvram.service',
install: true,
- install_dir: systemd_system_unit_dir,
- output: 'pldm-create-phyp-nvram.service',
+ install_dir: systemd_system_unit_dir
)
-configure_file(
- copy: true,
- input: 'pldm-create-phyp-nvram-cksum.service',
+filesystem.copyfile(
+ 'pldm-create-phyp-nvram-cksum.service',
install: true,
install_dir: systemd_system_unit_dir,
- output: 'pldm-create-phyp-nvram-cksum.service',
)
diff --git a/softoff/meson.build b/softoff/meson.build
index fb46280..9c8f443 100644
--- a/softoff/meson.build
+++ b/softoff/meson.build
@@ -17,9 +17,11 @@
install_dir: get_option('bindir'))
if get_option('systemd').enabled()
- configure_file(input: 'services/pldmSoftPowerOff.service',
- output: 'pldmSoftPowerOff.service',
- copy: true,
- install_dir: systemd_system_unit_dir)
+ filesystem.copyfile(
+ 'services/pldmSoftPowerOff.service',
+ 'pldmSoftPowerOff.service',
+ install: true,
+ install_dir: systemd_system_unit_dir
+ )
endif