Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
free(r);
}
+ /*
+ Check architecture
+ Legacy package formats use "arch = all" for source packages.
+ We need to check for "type = source" and then reset arch
+ */
+ if (strcmp(arch, "all") == 0) {
+ char* type = pakfire_archive_get(archive, "package", "type");
+ if (type) {
+ if (strcmp(type, "source") == 0) {
+ free(arch);
+ arch = NULL;
+ }
+ }
+ free(type);
+ }
+
PakfirePackage pkg = pakfire_package_create(
archive->pakfire, repo, name, evr, (arch) ? arch : "src"
);