summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhang zhigang <zg84.zhang@samsung.com>2023-10-23 08:13:49 +0000
committerGerrit Code Review <gerrit@review>2023-10-23 08:13:49 +0000
commit043a495872e1ade65d2fbbf44d51b0fa64cb615d (patch)
tree73852f87ef96b1d167b0df85a904e353ecbff09c
parentc655cb580187cede26c22ee232f860ad85a3ff0d (diff)
parent894a0cb4562c358725b063db1a6ab37e7dcc694d (diff)
downloadrpm-043a495872e1ade65d2fbbf44d51b0fa64cb615d.tar.gz
rpm-043a495872e1ade65d2fbbf44d51b0fa64cb615d.tar.bz2
rpm-043a495872e1ade65d2fbbf44d51b0fa64cb615d.zip
Merge "Update autotools files on riscv64" into tizen_base
-rw-r--r--build/parseBuildInstallClean.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/build/parseBuildInstallClean.c b/build/parseBuildInstallClean.c
index f7b4bb715..199571720 100644
--- a/build/parseBuildInstallClean.c
+++ b/build/parseBuildInstallClean.c
@@ -48,18 +48,23 @@ int parseBuildInstallClean(rpmSpec spec, int parsePart)
}
if (parsePart == PART_BUILD) {
- char* buf = strdup(
- "if [[ `uname -m` == \"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"
- " grep -q config-patches@ $c || continue\n"
- " grep -q aarch64 $c || install -m 755 $ref/config.$s $c\n"
- " grep -q ppc64le $c || install -m 755 $ref/config.$s $c\n"
- " done\n"
- "done\n"
- "fi\n"
- );
+ char* buf = strdup(
+ "ref=/usr/lib/rpm\n"
+ "mints=0\n"
+ "case $(uname -m) in\n"
+ " aarch64) mints=20120610;;\n"
+ " ppc64le) mints=20130610;;\n"
+ " riscv64) mints=20160911;;\n"
+ "esac\n"
+ "for s in guess sub; do\n"
+ " for c in $(find -maxdepth 8 -name \"config.$s\"); do\n"
+ " grep -q config-patches@ $c || continue\n"
+ " timestamp=$(sed -n \"/^timestamp=/{s///;s/[-'\\\"]//g;p;q;}\" $c)\n"
+ " test -n \"$timestamp\" || timestamp=0\n"
+ " test $timestamp -ge $mints || install -m 755 $ref/config.$s $c\n"
+ " done\n"
+ "done\n"
+ );
appendLineStringBuf(*sbp, buf);
free(buf);
}