diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/files/mdraid.rc b/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/files/mdraid.rc index a30035dbbb..6fbe4a26ea 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/files/mdraid.rc +++ b/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/files/mdraid.rc @@ -7,11 +7,24 @@ depend() { after modules } +assemble() { + local rv + mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1 + rv=$? + if [ ${rv} -eq 2 ]; then + # mdadm exits with status 2 when there is nothing to assemble. + # This is undocumented. + # https://bugs.gentoo.org/295397 + return 0 + fi + return "${rv}" +} + start() { local output ebegin "Starting up RAID devices" - output=$(mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1) + output=$(assemble) eend $? "${output}" local pat="/dev/md_d*" diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.4-r1.ebuild similarity index 98% rename from sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.4.ebuild rename to sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.4-r1.ebuild index cb3b0a96ed..3e0c88d505 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.4-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.5-r1.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.5.ebuild rename to sdk_container/src/third_party/portage-stable/sys-fs/mdadm/mdadm-4.5-r1.ebuild