[Pkg-debile-commits] [debile-slave] 10/100: meh (for @protonk)

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:52:59 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch master
in repository debile-slave.

commit b7ade8eb77718848e19f7e480d217a894be31d6d
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Wed May 22 17:00:47 2013 -0400

    meh (for @protonk)
---
 bin/create-schroot-file    |   56 ++++++++++++++++++++++++++++++++++++++++++++
 ethel/cli.py               |    6 ++++-
 ethel/client.py            |    5 ++++
 ethel/commands/piuparts.py |    5 ++--
 setup.py                   |    3 ++-
 5 files changed, 71 insertions(+), 4 deletions(-)

diff --git a/bin/create-schroot-file b/bin/create-schroot-file
new file mode 100755
index 0000000..4b33d1d
--- /dev/null
+++ b/bin/create-schroot-file
@@ -0,0 +1,56 @@
+#!/bin/bash
+set -e
+
+SUITE=$1
+MIRROR=http://debian.lcs.mit.edu/debian/
+OUTPUT="/var/lib/ethel/chroots/"
+VARIANT="buildd"
+TARBALL="${OUTPUT}/${SUITE}.tar.gz"
+
+
+if [ -e ${TARBALL} ]; then
+    echo "Rebuild image? C-c to stop."
+    read FOO
+    sudo rm -rf ${TARBALL}
+fi
+
+
+if [ "x$SUITE" = "x" ]; then
+    echo "$0 unstable"
+    exit 1
+fi
+
+
+WHERE=$(mktemp -d)
+
+POP=$(pwd)
+cd ${WHERE}
+
+TARGET="chroot"
+
+sudo debootstrap \
+    --verbose \
+    --variant="$VARIANT" \
+    "$SUITE" \
+    "." \
+    "$MIRROR"
+
+sudo tar -zcf ${TARBALL} .
+
+cd $POP
+sudo rm -rf ${WHERE}
+
+echo ""
+cat <<EOF
+[${SUITE}-$(dpkg-architecture -qDEB_BUILD_ARCH)]
+type=file
+description=Ethel Chroot
+file=${TARBALL}
+groups=root,sbuild
+root-groups=root,sbuild
+source-groups=root,sbuild
+source-root-groups=root,sbuild
+EOF
+echo ""
+
+exit 0
diff --git a/ethel/cli.py b/ethel/cli.py
index f2ed4ab..04b8932 100644
--- a/ethel/cli.py
+++ b/ethel/cli.py
@@ -1,4 +1,4 @@
-from ethel.client import submit_report, next_job, close_job
+from ethel.client import submit_report, next_job, close_job, dget_url
 import sys
 
 
@@ -12,3 +12,7 @@ def next():
 
 def close():
     return close(sys.argv[1])
+
+
+def dget():
+    return dget_url(sys.argv[1])
diff --git a/ethel/client.py b/ethel/client.py
index 8194c08..fa2b64a 100644
--- a/ethel/client.py
+++ b/ethel/client.py
@@ -32,3 +32,8 @@ def next_job(job):
 def close_job(job):
     proxy = get_proxy()
     return proxy.close_job(job)
+
+
+def dget_url(package):
+    proxy = get_proxy()
+    return proxy.get_dsc_url(package)
diff --git a/ethel/commands/piuparts.py b/ethel/commands/piuparts.py
index c2fc26c..c5bd7c8 100644
--- a/ethel/commands/piuparts.py
+++ b/ethel/commands/piuparts.py
@@ -111,5 +111,6 @@ def parse_log(lines, path):
 
 
 def main():
-    report = piuparts(*sys.argv[1:])
-    print(report)
+    output = open(sys.argv[3], 'wb')
+    report = piuparts(*sys.argv[1:2])
+    output.write(report.to_xml_bytes())
diff --git a/setup.py b/setup.py
index 925d1eb..affb7a5 100755
--- a/setup.py
+++ b/setup.py
@@ -23,8 +23,9 @@ setup(
             'ethel-submit = ethel.cli:submit',
             'ethel-next = ethel.cli:next',
             'ethel-close = ethel.cli:close',
-            'ethel-adequate = ethel.commands.adequate:main',
+            'ethel-dget-url = ethel.cli:dget',
             'ethel-update = ethel.chroot:run_update',
+            'ethel-adequate = ethel.commands.adequate:main',
             'ethel-piuparts = ethel.commands.piuparts:main',
         ],
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-slave.git



More information about the Pkg-debile-commits mailing list