KAMPALA, Uganda—Uganda’s electoral commission said Saturday that longtime President Yoweri Museveni has won a sixth five-year term, while top opposition challenger Bobi Wine alleges rigging and officials struggle to explain how polling results were compiled amid an Internet blackout. In a generational clash watched across the African continent with a booming young population and a host of aging leaders, the 38-year-old singer-turned-lawmaker Wine posed arguably Museveni’s greatest challenge yet. The self-described “ghetto president” had strong support in urban centers where frustration with unemployment and corruption is high. He has claimed victory. The electoral commission said Museveni received 58 percent of ballots and Wine 34 percent, and voter turnout was 52 percent. It advised people celebrating to remember COVID-19 precautions, but reaction in the capital, Kampala, was muted. At one point, hundreds of Museveni supporters on motorcycles sped by, honking and chanting. The military remained in the streets. Police checked vehicles …