]>
Commit | Line | Data |
---|---|---|
70f8787d JR |
1 | --- rpm-5.4.10/lib/depends.c.ignore_arch~ 2012-07-27 21:11:47.463139875 +0200 |
2 | +++ rpm-5.4.10/lib/depends.c 2012-07-27 21:29:21.811958701 +0200 | |
3 | @@ -587,11 +587,24 @@ int rpmtsAddInstallElement(rpmts ts, Hea | |
4 | if (nplatpat > 1) { | |
5 | const char * platform = NULL; | |
6 | ||
7 | - he->tag = RPMTAG_PLATFORM; | |
8 | - xx = headerGet(h, he, 0); | |
9 | - platform = he->p.str; | |
10 | - if (!xx || platform == NULL) | |
11 | - platform = rpmExpand(arch, "-unknown-", os, NULL); | |
12 | + /* | |
13 | + * If ignore arch, we just set the arch in package platform string to | |
14 | + * same as on system so that we're sure that it'll match, same goes for | |
15 | + * os as well. | |
16 | + */ | |
17 | + if (rpmExpandNumeric("%{__ignore_arch}") || rpmExpandNumeric("%{__ignore_os}")) { | |
18 | + platform = rpmExpand( | |
19 | + rpmExpandNumeric("%{__ignore_arch}") ? "%{_target_cpu}" : arch, | |
20 | + "-unknown-", | |
21 | + rpmExpandNumeric("%{__ignore_os}") ? "%{_target_os}" : os, | |
22 | + NULL); | |
23 | + } else { | |
24 | + he->tag = RPMTAG_PLATFORM; | |
25 | + xx = headerGet(h, he, 0); | |
26 | + platform = he->p.str; | |
27 | + if (!xx || platform == NULL) | |
28 | + platform = rpmExpand(arch, "-unknown-", os, NULL); | |
29 | + } | |
30 | ||
31 | rc = rpmPlatformScore(platform, platpat, nplatpat); | |
32 | #if defined(RPM_VENDOR_MANDRIVA) | |
33 | --- rpm-5.4.10/rpmpopt.in.ignore_arch~ 2012-07-27 21:29:07.687135285 +0200 | |
34 | +++ rpm-5.4.10/rpmpopt.in 2012-07-27 21:29:35.399788829 +0200 | |
35 | @@ -431,6 +431,10 @@ rpm alias --without --define "_without_ | |
36 | ||
37 | rpm alias --arch --qf '%-34{=NAME}\t%{ARCH}\n' \ | |
38 | --POPTdesc=$"list package architecture" | |
39 | + | |
40 | +rpm alias --ignorearch --define '__ignore_arch 1' | |
41 | +rpm alias --ignoreos --define '__ignore_os 1' | |
42 | + | |
43 | #============================================================================== | |
44 | rpmbuild alias --dbpath --define '_dbpath !#:+' \ | |
45 | --POPTdesc=$"use database in DIRECTORY" \ |