summaryrefslogtreecommitdiffstats
path: root/db-update
diff options
context:
space:
mode:
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update21
1 files changed, 18 insertions, 3 deletions
diff --git a/db-update b/db-update
index 8be0d54..34a01b7 100755
--- a/db-update
+++ b/db-update
@@ -38,9 +38,6 @@ for repo in ${repos[@]}; do
if ${REQUIRE_SIGNATURE} && ! check_pkgsig "${pkg}.sig"; then
die "Package ${repo}/${pkg##*/} does not have a valid signature"
fi
- if ! check_pkgsvn "${pkg}" "${repo}"; then
- die "Package ${repo}/${pkg##*/} is not consistent with svn repository"
- fi
if ! check_pkgrepos "${pkg}"; then
die "Package ${repo}/${pkg##*/} already exists in another repository"
fi
@@ -53,6 +50,9 @@ for repo in ${repos[@]}; do
fi
done
+# TODO: FIXME: check if package has switched between i686/x86_64 and any
+# and remove the older one if it did (commitpkg did this)
+
for repo in ${repos[@]}; do
msg "Updating [${repo}]..."
any_pkgs=($(getpkgfiles "${STAGING}/${repo}/"*-any${PKGEXT} 2>/dev/null))
@@ -61,6 +61,10 @@ for repo in ${repos[@]}; do
arch_pkgs=($(getpkgfiles "${STAGING}/${repo}/"*-${pkgarch}${PKGEXT} 2>/dev/null))
for pkg in ${arch_pkgs[@]} ${any_pkgs[@]}; do
pkgfile="${pkg##*/}"
+ pkgver="$(getpkgver "$pkg")"
+ pkgbase="$(getpkgbase "$pkg")"
+ pkgname="$(getpkgname "$pkg")"
+
msg2 "${pkgfile} (${pkgarch})"
# any packages might have been moved by the previous run
if [ -f "${pkg}" ]; then
@@ -75,6 +79,17 @@ for repo in ${repos[@]}; do
ln -s "../../../${PKGPOOL}/${pkgfile}.sig" "$FTP_BASE/$repo/os/${pkgarch}"
fi
add_pkgs[${#add_pkgs[*]}]=${pkgfile}
+
+ cd "${GITREPO}"
+ versionfile="${GITREPO}/${pkgarch}/${repo}/${pkgbase}"
+ mkdir -p "${versionfile%/*}"
+ echo "${pkgver}" > "${versionfile}"
+ git add "${versionfile}"
+ if [[ "${pkgbase}" == "${pkgname}" ]]; then
+ git commit -m "$repo/$pkgbase $pkgver $pkgarch"
+ else
+ git commit -m "$repo/$pkgbase/$pkgname $pkgver $pkgarch"
+ fi
done
if [ ${#add_pkgs[@]} -ge 1 ]; then
arch_repo_add "${repo}" "${pkgarch}" ${add_pkgs[@]}