diff options
Diffstat (limited to 'redhat/build/update_repository.sh')
-rwxr-xr-x | redhat/build/update_repository.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/redhat/build/update_repository.sh b/redhat/build/update_repository.sh index 51b6dc7c6..fc1073bfa 100755 --- a/redhat/build/update_repository.sh +++ b/redhat/build/update_repository.sh @@ -17,16 +17,18 @@ RPMDIR=$(rpm -E %{_rpmdir}.tde-${TDE_VERSION}) if [ -x /usr/sbin/urpmi ]; then REPOUPDATE='(cd ${RPMDIR}; genhdlist2 --clean --allow-empty noarch & genhdlist2 --clean --allow-empty ${ARCH} & wait; sudo urpmi.update rpmbuild.${ARCH} rpmbuild.noarch)' +elif [ -x /usr/bin/dnf ]; then + REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo dnf clean expire-cache --disablerepo="*" --enablerepo="rpmbuild*")' elif [ -x /usr/bin/zypper ]; then REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo zypper refresh rpmbuild.${ARCH} rpmbuild.noarch)' elif [ -x /usr/bin/yum ]; then if [ "$(rpm -E %dist)" = ".el5" ]; then - REPOUPDATE='(cd ${RPMDIR}; createrepo ${ARCH} & createrepo noarch & wait; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")' + REPOUPDATE='(cd ${RPMDIR}; createrepo ${ARCH} & createrepo noarch & wait; sudo yum clean metadata --disablerepo="*" --enablerepo="rpmbuild*")' else - REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")' + REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo yum clean metadata --disablerepo="*" --enablerepo="rpmbuild*")' fi elif [ -x /usr/bin/apt-get ]; then - REPOUPDATE='(cd ${RPMDIR}; genpkglist $PWD noarch & genpkglist $PWD ${ARCH} & wait; genbasedir $PWD ${ARCH} noarch; sudo apt-get update)' + REPOUPDATE='(cd ${RPMDIR}; genpkglist $PWD noarch & genpkglist $PWD ${ARCH} & wait; genbasedir $PWD i586 x86_64 noarch; sudo apt-get update)' fi eval "${REPOUPDATE}; rm -f ${LOCKFILE}" || exit 1 |