As Evalu8ter says, obsolescence (a subset of unavailability in general) is always a problem. The Apache programme kicked off over 20 years ago now, and we (MoD) typically insert a clause asking for guaranteed support for 15 years - even then that is a bit tongue in cheek as it can almost never be enforced on avionic suppliers. Apache has done very well to last until now.
On Apache there was existing obsolescence in 1996 when contract negotiations were under way. The US tried to palm us off with kit they were already replacing. Obvious cases, like Bendix 221 VHF radio, were spotted by the DHP Sea King section (as the Apache office didn't have any avionic specialists, their AD had to ask around for advice) but I'm sure some were missed.
Another important factor at this time was funding for avionic obsolescence management was chopped in the years 1991-92, and removed altogether in January 1993. All pretence at management disappeared when the Def Stan was cancelled and agency contracts not renewed. It took many years to recover from this AMSO policy (the Alcock era) and I'd say we still haven't.