blob: 2133f46db401caf1bc9ac4e01bae0b7af0d51814 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/bash
# -*- coding: utf-8 -*-
source config
source local_config
source libremessages
for repo in ${ARCHREPOS[@]}; do
for arch in 'i686' 'x86_64' 'any'; do
msg "Syncing ${repo} ${arch}"
# makes a file containing rsync output for filter.py
${rsync_list_command} \
rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \
${repodir}/staging/${repo}/ > ${rsout_file}
# reads blacklist and rsout_file and makes an rsync exclude-from
# list
filter.py -r ${rsync_blacklist} -k ${blacklist} \
-f ${rsout_file}
# list files in ${repodir}/${repo} and write their names on
# rsync_not_needed for using as an rsync exclude-from
find ${repodir}/${repo} -name "*${PKGEXT}" \
-fprintf ${rsync_not_needed} '%f\n'
# Actual rsync command
${rsync_update_command} \
--exclude-from=${rsync_blacklist} \
--exclude-from=${rsync_not_needed} \
rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \
${repodir}/staging/${repo}/
done
for arch in 'i686' 'x86_64'; do
msg "Cleaning $repo $arch"
# if there is a db in repo (db is created on rsync)
if [ -r ${repodir}/staging/${repo}/os/${arch}/${repo}${DBEXT} ]; then
# clean_repo makes pending list with files on db and remove
# packages from db
clean_repo.py -k ${blacklist} -w ${whitelist} \
-p ${docs_dir}/pending-${repo}.txt \
-b ${repodir}/staging/${repo}/${repo}${DBEXT}
fi
done
# if some nonfree files got pass the filter this command delete them
msg "Fallback cleaning repo"
python clean_repo.py -k ${blacklist} -d ${repodir}/staging/${repo}
done
db-update
ftpdir-cleanup
get_license.sh
|