Restore #6484 reverted by c751168.
Merge pull request #7909 from Elemecca/t-apt-list

Restore #6484 (YAML lists in apt) reverted by c751168.