package/alsa-utils: fix install if directories exist
PATCH 1/1 package/alsa-utils: fix install if directories exist
"mkdir" (without "-p") fails if the target directory exists, which means that if alsa-utils is being reinstalled or if other files have previously been installed in the alsa-state.d or alsa-restore.d directories the installation will fail.
Switch to "$(INSTALL) -d" which allows us to be explicit about the permissions and handles the case of a pre-existing directory correctly.
--- package/alsa-utils/alsa-utils.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/alsa-utils/alsa-utils.mk +2 -2
@@ -86,10 +86,10 @@ define ALSA_UTILS_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service $(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-state.service \ $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service - mkdir $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d printf '[Install]\nWantedBy=multi-user.target\n' \ >$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d/buildroot-enable.conf - mkdir $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d printf '[Install]\nWantedBy=multi-user.target\n' \ >$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d/buildroot-enable.conf; endef
Signature · 1 line
2.28.0
Thomas Petazzoni
AppliedPATCH 1/1 package/alsa-utils: fix install if directories exist
Quoted 5 lines · On Thu, 3 Sep 2020 14:35:33 +0100 John Keeping <[email protected]> wrote:
"mkdir" (without "-p") fails if the target directory exists, which means that if alsa-utils is being reinstalled or if other files have previously been installed in the alsa-state.d or alsa-restore.d directories the installation will fail.
Quoted 7 lines
Switch to "$(INSTALL) -d" which allows us to be explicit about the permissions and handles the case of a pre-existing directory correctly.
Signed-off-by John Keeping <[email protected]>--- package/alsa-utils/alsa-utils.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/alsa-utils: fix install if directories exist
In reply to John KeepingQuoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"John" == John Keeping <[email protected]> writes:
"mkdir" (without "-p") fails if the target directory exists, which means that if alsa-utils is being reinstalled or if other files have previously been installed in the alsa-state.d or alsa-restore.d directories the installation will fail.
Switch to "$(INSTALL) -d" which allows us to be explicit about the permissions and handles the case of a pre-existing directory correctly.
Signed-off-by John Keeping <[email protected]>
Committed to 2020.02.x, 2020.05.x and 2020.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard