Would be nice to have a query tag that would present the database header number, to easily extract the installation order of a set of packages.
Each header now carries it's origin and instance, accessible as header methods. The origin (i.e. the path from which the package was installed) can be displayed by rpm -qa --qf '%{packageorigin}\n' Adding the header instance number as a tag would be messy, as the value is not a constant, but is reassigned each and every --rebuilddb. FWIW, the instance number has almost nothing to do with installation order.