Author: glondu-guest
Date: Wed Feb 18 14:20:56 2009
New Revision: 6195

URL: http://svn.debian.org/wsvn/?sc=1&rev=6195
Log:
Add scripts/get_sources_from_archive.sh

Added:
    trunk/tools/scripts/
    trunk/tools/scripts/get_sources_from_archive.sh   (with props)

Added: trunk/tools/scripts/get_sources_from_archive.sh
URL: 
http://svn.debian.org/wsvn/trunk/tools/scripts/get_sources_from_archive.sh?rev=6195&op=file
==============================================================================
--- trunk/tools/scripts/get_sources_from_archive.sh (added)
+++ trunk/tools/scripts/get_sources_from_archive.sh Wed Feb 18 14:20:56 2009
@@ -1,0 +1,40 @@
+#!/bin/sh
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2009 Stéphane Glondu <[email protected]>
+#
+# This program 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.
+
+# DISCLAIMER: very quick and dirty
+
+# Usage: cd to an empty directory, and run this script
+# It will dget all packages build-depending on ocaml from the archive
+# (this can be useful to detect potential problems with binNMUs)
+
+# Warning: at the time of writing, the whole thing is ~600 MB
+
+set -e
+
+SUITE=$1
+if [ -z "$SUITE" ]; then
+    SUITE=unstable
+fi
+
+get_package () {
+    (
+        { mkdir "$1" || true; } &&
+        cd "$1" && dget -ux "http://ftp.fr.debian.org/debian/$2";
+    )
+}
+
+(
+    mkdir "$SUITE" || true
+    cd "$SUITE"
+    wget -O - 
"ftp://ftp.fr.debian.org/debian/dists/$SUITE/main/source/Sources.bz2"; | bzcat > 
Sources
+    grep-dctrl -FBuild-Depends ocaml -sPackage,Version,Directory Sources \
+        | awk 
'/^Package:/{PKG=$2};/^Version:/{VER=$2};/^Directory:/{DIR=$2};/^$/{printf "%s 
%s/%s_%s.dsc\n",PKG,DIR,PKG,VER}' \
+        | while read a b; do get_package "$a" "$b"; done
+)

Propchange: trunk/tools/scripts/get_sources_from_archive.sh
------------------------------------------------------------------------------
    svn:executable = *


_______________________________________________
Pkg-ocaml-maint-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to