Skip to content

Commit

Permalink
sack: don't raise error when non-existing arch is used
Browse files Browse the repository at this point in the history
Reference: rpm-software-management/libdnf@611a86a
Signed-off-by: Igor Gnatenko <[email protected]>
  • Loading branch information
Igor Gnatenko committed May 17, 2016
1 parent fcfd964 commit dc3b7e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sack.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ setarch(HySack sack, const char *req_arch)

HY_LOG_INFO("Architecture is: %s", arch);
pool_setarch(pool, arch);
/* Since one of commits after 0.6.20 libsolv allowes custom arches
* which means it will be 'newcoolarch' ad 'noarch' always. */
#if LIBSOLV_VERSION <= 620
if (!strcmp(arch, "noarch"))
// noarch never fails
goto done;
Expand All @@ -178,7 +181,7 @@ setarch(HySack sack, const char *req_arch)
count++;
if (count < 2)
ret = HY_E_FAILED;

#endif
done:
solv_free(detected);
return ret;
Expand Down

0 comments on commit dc3b7e7

Please sign in to comment.