[Pkg-debile-commits] [debile-slave] 69/100: Update toolchain

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:53:11 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 3fde83c1c0ee0c08c84fb46e16ec24191e556761
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Mon Jun 10 22:57:26 2013 -0400

    Update toolchain
---
 ethel/utils.py |   24 ++++++++++++++++++++++++
 setup.py       |    1 +
 2 files changed, 25 insertions(+)

diff --git a/ethel/utils.py b/ethel/utils.py
index e1e235f..a1587c6 100644
--- a/ethel/utils.py
+++ b/ethel/utils.py
@@ -1,11 +1,13 @@
 from ethel.error import EthelError
 
 from contextlib import contextmanager
+from schroot import schroot
 from debian import deb822
 import subprocess
 import tempfile
 import shutil
 import shlex
+import sys
 import os
 
 try:
@@ -14,6 +16,28 @@ except ImportError:
     import ConfigParser as configparser
 
 
+def upgrade(chroot):
+    print("Schrooting")
+    with schroot(chroot) as chroot:
+        print("updating")
+        out, err, ret = chroot.run([
+            "apt-get", "update"
+        ], user='root')
+        print(out, err)
+        out, err, ret = chroot.run([
+            "apt-get", "upgrade", "-y"
+        ], user='root')
+        print(out, err)
+        out, err, ret = chroot.run([
+            "apt-get", "dist-upgrade", "-y"
+        ], user='root')
+        print(out, err)
+
+
+def doupdate():
+    upgrade(*sys.argv[1:])
+
+
 @contextmanager
 def tdir():
     fp = tempfile.mkdtemp()
diff --git a/setup.py b/setup.py
index 72f68dd..342bf54 100755
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,7 @@ setup(
 #            'ethel-buildd = ethel.client:buildd',
 #            'ethel-next = ethel.cli:next',
              'etheld = ethel.daemon:main',
+             'ethel-update = ethel.utils:doupdate',
 #            'ethel-close = ethel.cli:close',
 #            'ethel-submit = ethel.cli:submit',
 #            'ethel-dget-url = ethel.cli:dget',

-- 
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