Deduplicate a lot of code

5 jobs for add-base-devel-tags in 35 seconds (queued for 2 seconds)