Adding pkgrepo.managed state

Learned a lot about writing states with this one.