From bba8c33a039ec4d1e1d13f88304ba0aeb754b03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Fri, 22 Apr 2011 00:30:43 -0700 Subject: Midnight fix --- config | 7 +++++-- db-functions | 6 +++--- db-update | 7 ++++--- get_license.sh | 54 ------------------------------------------------------ repo-update | 17 +++++++++-------- 5 files changed, 21 insertions(+), 70 deletions(-) delete mode 100755 get_license.sh diff --git a/config b/config index 7180f9e..6936a9b 100644 --- a/config +++ b/config @@ -1,6 +1,8 @@ -FTP_BASE="/home/parabolavnx/parabolagnulinux.org/free" +#!/bin/bash +FTP_BASE="/home/parabolavnx/parabolagnulinux.org/repo" ARCH_BASE="/home/parabolavnx/parabolagnulinux.org/repo" SVNREPO="/home/parabolavnx/parabolagnulinux.org/abslibre" + ARCHREPOS=('core' 'extra' 'community' 'testing' 'multilib') PKGREPOS=(${ARCHREPOS[@]} 'libre' 'libre-testing' 'social' 'sugar') PKGPOOL='pool/packages' @@ -23,7 +25,8 @@ LOCK_TIMEOUT=300 STAGING="$FTP_BASE/staging" TMPDIR="$HOME/tmp" -ARCHES=(i686 x86_64 mips64el) +ARCHARCHES=(i686 x86_64) +ARCHES=(${ARCHARCHES[@]} mips64el) DBEXT=".db.tar.gz" FILESEXT=".files.tar.gz" PKGEXT=".pkg.tar.?z" diff --git a/db-functions b/db-functions index 20bfa0e..4dddcb5 100644 --- a/db-functions +++ b/db-functions @@ -211,7 +211,7 @@ repo_unlock () { #repo_unlock _grep_pkginfo() { local _ret - _ret="$(bsdtar -xOqf "$1" .PKGINFO | /bin/grep -m 1 "^${2} = ")" + _ret="$(bsdtar -xOqf "$1" .PKGINFO | grep -m 1 "^${2} = ")" echo "${_ret#${2} = }" } @@ -499,7 +499,7 @@ arch_repo_add() { pushd "${FTP_BASE}/${repo}/os/${arch}" >/dev/null repo-add -q "${repo}${DBEXT}" ${pkgs[@]} >/dev/null \ || error "repo-add ${repo}${DBEXT} ${pkgs[@]}" - /usr/bin/repo-add -f -q "${repo}${FILESEXT}" ${pkgs[@]} \ + repo-add -f -q "${repo}${FILESEXT}" ${pkgs[@]} \ || error "repo-add -f ${repo}${FILESEXT} ${pkgs[@]}" popd >/dev/null set_repo_permission "${repo}" "${arch}" @@ -518,7 +518,7 @@ arch_repo_remove() { fi repo-remove -q "${dbfile}" ${pkgs[@]} >/dev/null \ || error "repo-remove ${dbfile} ${pkgs[@]}" - /usr/bin/repo-remove -q "${filesfile}" ${pkgs[@]} \ + repo-remove -q "${filesfile}" ${pkgs[@]} \ || error "repo-remove ${filesfile} ${pkgs[@]}" set_repo_permission "${repo}" "${arch}" } diff --git a/db-update b/db-update index 6bd0209..7604547 100755 --- a/db-update +++ b/db-update @@ -39,9 +39,10 @@ for repo in ${repos[@]}; do # die "Package ${repo}/$(basename ${pkg}) already exists in another repository" #fi done - if ! check_splitpkgs ${repo} ${pkgs[@]}; then - die "Missing split packages for ${repo}" - fi + # This is fucking obnoxious +# if ! check_splitpkgs ${repo} ${pkgs[@]}; then +# die "Missing split packages for ${repo}" +# fi else die "Could not read ${STAGING}" fi diff --git a/get_license.sh b/get_license.sh deleted file mode 100755 index 1b755c6..0000000 --- a/get_license.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# -*- coding: utf-8 -*- - - # get_license.sh - # Copyright 2010 Joshua Ismael Haase Hernández - - # ---------- GNU General Public License 3 ---------- - - # This file is part of Parabola. - - # Parabola is free software: you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation, either version 3 of the License, or - # (at your option) any later version. - - # Parabola is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - - # You should have received a copy of the GNU General Public License - # along with Parabola. If not, see . - -source ./config -source ./local_config -source ./libremessages - -msg "Creating pending licenses list" -pushd ${licenses_dir} >/dev/null -rm -rf ${licenses_dir}/* -popd >/dev/null - -dir=$(mktemp -d ${tempdir}/licenses.XXXX) -pushd $dir > /dev/null - -for repo in ${ARCHREPOS[@]}; do - msg2 "Extracting licenses in ${repo}" - pending=($(cut -d: -f1 ${docs_dir}/pending-${repo}.txt)) - for name in ${pending[@]}; do - plain "${pkg}" - for pkg in $(find ${repodir}/staging/${repo} -name "${name}-*${PKGEXT}" -printf '%f '); do - chmod +r ${pkg} - bsdtar -xf ${pkg} usr/share/licenses || { - error "${pkg} has no licenses" - } - chmod -r ${pkg} - done - done -done - -mv ${dir}/* ${licenses_dir}/ -rm -rf ${dir} - -exit 0 diff --git a/repo-update b/repo-update index 697e188..88ddda3 100755 --- a/repo-update +++ b/repo-update @@ -1,12 +1,12 @@ #!/bin/bash # -*- coding: utf-8 -*- -source config -source local_config -source libremessages +source $(dirname $0)/config +source $(dirname $0)/local_config +source $(dirname $0)/libremessages for repo in ${ARCHREPOS[@]}; do - for arch in 'i686' 'x86_64' 'any'; do + for arch in ${ARCHARCHES[@]} 'any'; do msg "Syncing ${repo} ${arch}" # makes a file containing rsync output for filter.py ${rsync_list_command} \ @@ -27,7 +27,7 @@ for repo in ${ARCHREPOS[@]}; do rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ ${repodir}/staging/${repo}/ done - for arch in 'i686' 'x86_64'; do + for arch in ${ARCHARCHES[@]}; 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 @@ -43,7 +43,8 @@ for repo in ${ARCHREPOS[@]}; do python clean_repo.py -k ${blacklist} -d ${repodir}/staging/${repo} done -db-update -~/repm/cron-jobs/ftpdir-cleanup +msg "Removing leftover files..." +find ${repodir}/staging/ \! -name "*${PKGEXT}*" -delete -get_license.sh +db-update +$(dirname $0)/cron-jobs/ftpdir-cleanup -- cgit v1.2.3