I want to port my installed packages on a SLES SP1 System to another SLES System without an internet connection. So I got the idea to use
rpmrebuild packagename
to pack all installed packages back into rpms and then copy those to the other machine.
So I am searching for a way to loop through the names of all installed packages.