query: added --repoid, --arch & --provides options, fixed --latest