summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_blacklist.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/bin/reproducible_blacklist.sh b/bin/reproducible_blacklist.sh
index a6f02155..1727ad85 100755
--- a/bin/reproducible_blacklist.sh
+++ b/bin/reproducible_blacklist.sh
@@ -14,20 +14,17 @@ blacklist_packages() {
DATE=$(date +'%Y-%m-%d %H:%M')
TMPFILE=$(mktemp)
for PKG in $PACKAGES ; do
- VERSION=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT version from sources WHERE name = '$PKG';")
- sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_packages VALUES ('$PKG','$VERSION','blacklisted','$DATE');"
+ VERSION=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT version FROM sources WHERE name='$PKG' AND suite='$SUITE';")
+ PKGID=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT id FROM sources WHERE name='$PKG' AND suite='$SUITE';")
+ sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date) VALUES ('$PKGID', '$VERSION', 'blacklisted', '$DATE');"
done
- echo "============================================================================="
- echo "The following $TOTAL source packages have been (re-)scheduled: $PACKAGES"
- echo "============================================================================="
- echo
}
check_candidates() {
PACKAGES=""
TOTAL=0
for PKG in $CANDIDATES ; do
- RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT name from sources WHERE name = '$PKG';")
+ RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT name from sources WHERE name='$PKG' AND suite='$SUITE';")
if [ ! -z "$RESULT" ] ; then
PACKAGES="$PACKAGES $RESULT"
let "TOTAL+=1"
@@ -41,6 +38,8 @@ check_candidates() {
# main
#
set +x
+SUITE="$1"
+shift
CANDIDATES="$@"
check_candidates
PACKAGES=$(echo $PACKAGES)
@@ -56,4 +55,8 @@ echo
echo "$MESSAGE"
kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "$MESSAGE"
echo
+echo "============================================================================="
+echo "The following $TOTAL source packages from $SUITE have been blacklisted: $PACKAGES"
+echo "============================================================================="
+echo
echo "Probably edit notes.git/packages.yml now and enter reasons for blacklisting there"