Fix detection of rpm arch type 70/201670/1 accepted/tizen/base/20190402.084607 submit/tizen_base/20190326.000421
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 18 Mar 2019 17:10:02 +0000 (20:10 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 18 Mar 2019 17:37:23 +0000 (20:37 +0300)
`uname -m` command does not correctly identify the architecture to
build the package because the buildroot architecture may be different
from the kernel architecture

Change-Id: Ic88898ddd9317301305a2c5c676857186ccb96ac
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
build/parseBuildInstallClean.c

index f7b4bb7..7cfd707 100644 (file)
@@ -49,7 +49,7 @@ int parseBuildInstallClean(rpmSpec spec, int parsePart)
 
     if (parsePart == PART_BUILD) {
         char* buf = strdup(
-            "if [[ `uname -m` == \"aarch64\" ]]; then\n"
+            "if [[ $RPM_ARCH == \"aarch64\" ]]; then\n"
             "ref=/usr/lib/rpm\n"
             "for s in guess sub; do\n"
             "    for c in $(find -maxdepth 8 -name \"config.$s\"); do\n"