File: queue-versions

package info (click to toggle)
debbugs 2.6.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,800 kB
  • sloc: perl: 19,270; makefile: 81; sh: 75
file content (24 lines) | stat: -rwxr-xr-x 676 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh
set -e

# Called from update-versions (inside the lock) to process all *.versions
# files in the queue.

SOURCE="$1"

cd "/org/bugs.debian.org/versions/queue/$SOURCE"

find . -maxdepth 1 -name \*.versions -printf '%P\n' | while read x; do
    perl -ne '
	if (/(\w[-+0-9a-z.]+) \(([^\(\) \t]+)\)/) {
	    push @v, "$1/$2";
	}
	END { print join(" ", @v), "\n"; }
    ' "$x" \
	| /org/bugs.debian.org/versions/bin/merge-one-version "$x" \
	|| continue
    pkg="${x%%_*}"
    pkghash="$(echo "$pkg" | cut -b 1)"
    mkdir -p "/org/bugs.debian.org/versions/archive/$SOURCE/$pkghash/$pkg"
    mv "$x" "/org/bugs.debian.org/versions/archive/$SOURCE/$pkghash/$pkg/$x"
done