- for file in *.{noarch,$architecture}.rpm; do
- rpm -qpl $file | sed 's#^#'$file':#' >> $ourcachedirectory/files-cache
- rpm -qp --provides $file | cut -d " " -f 1 | sed 's#^#'$file':#' >> $ourcachedirectory/package-cache
+ for arch in noarch $(echo $architecture | sed -e 's/,/\n/g'); do
+ for file in *.$arch.rpm; do
+ rpm -qpl $file | sed 's#^#'$file':#' >> $ourcachedirectory/files-cache
+ rpm -qp --provides $file | cut -d " " -f 1 | sed 's#^#'$file':#' >> $ourcachedirectory/package-cache
+ done