summaryrefslogtreecommitdiffstats
path: root/mkrepo
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-01-18 09:07:10 +0100
committerRemi Collet <remi@remirepo.net>2018-01-18 09:07:10 +0100
commit4a462b6b5b0908b16d82e3b088d2fed56e36d86f (patch)
tree28362d9356429618c43cfd755d6465284edb824d /mkrepo
parent2078d064f95c1f738576f8ccfaf3b3ac21bfb0d4 (diff)
switch to createrepo_c (F27 only for now)
Diffstat (limited to 'mkrepo')
-rwxr-xr-xmkrepo30
1 files changed, 21 insertions, 9 deletions
diff --git a/mkrepo b/mkrepo
index 6d496f9..5790363 100755
--- a/mkrepo
+++ b/mkrepo
@@ -46,13 +46,25 @@ fi
cache=/home/rpmbuild/site/rpms/.createrepocache/$nom
mkdir -p $cache
check=sha256
-echo "+ Génération des meta + sql ($check)"
-createrepo --workers 4 \
- --cachedir $cache \
- --checksum $check \
- --unique-md-filenames \
- --compress-type=bz2 \
- --database .
+if [ "$dis" == "fedora" -a "$ver" -ge 27 ]; then
+ echo "+ Génération repodata (createrepo_c, $check)"
+ createrepo_c --workers 4 \
+ --cachedir $cache \
+ --unique-md-filenames \
+ --retain-old-md 1 \
+ --changelog-limit 3 \
+ --compress-type=bz2 \
+ --database .
+else
+ echo "+ Génération repodata (createrepo, $check)"
+ createrepo --workers 4 \
+ --cachedir $cache \
+ --checksum $check \
+ --unique-md-filenames \
+ --changelog-limit 3 \
+ --compress-type=bz2 \
+ --database .
+fi
if [ -d headers ]
then
@@ -64,8 +76,8 @@ echo "+ Génération repoview"
nom=${PWD#/home/rpmbuild/site/rpms/}
echo repoview --url http://rpms.remirepo.net/$nom \
--template-dir /home/rpmbuild/site/rpms/repotmpl \
- --title "Les RPM de Remi - ${nom//\// - }" .
+ --title "Remi's RPM repository - ${nom//\// - }" .
LANG=C repoview --url http://rpms.remirepo.net/$nom \
--template-dir /home/rpmbuild/site/rpms/repotmpl \
- --title "Les RPM de Remi - ${nom//\// - }" .
+ --title "Remi's RPM repository - ${nom//\// - }" .