~ubuntu-branches/ubuntu/quantal/virtinst/quantal-updates

« back to all changes in this revision

Viewing changes to virtinst/DistroInstaller.py

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-07-24 08:52:01 UTC
  • mfrom: (1.6.8 sid)
  • Revision ID: package-import@ubuntu.com-20120724085201-q3h0cbabg4t46gfm
Tags: 0.600.2-1ubuntu1
* Merge from debian unstable. Remaining changes:
  - debian/patches/9003-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch.
  - debian/patches/9004_ubuntu_fix_tree_support.patch: Fix tree detection
    for all ISO/HTTP source, to not longer fail with cobbler/koan.
  - debian/patches/0004-Fix-path-to-qemu-dm.patch: fix the path to the
    qemu-dm binary.
  - debian/{control,rules,pyversions}: Build using dh_python2, use
    debhelper v8 instead of cdbs; for some reason the package build an
    empty binary package when using dh_python2.
  - debian/control: added acl package to depends.
  - debian/control: added libvirt-bin to recommends
* Dropped patches:
  - debian/patches/9005_ubuntu_releases.patch: Upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import logging
21
21
import os
22
 
import sys
23
22
import shutil
24
23
import subprocess
25
24
import tempfile
287
286
        logging.debug("Appending to the initrd.")
288
287
        find_proc = subprocess.Popen(['find', '.', '-print0'],
289
288
                                     stdout=subprocess.PIPE,
290
 
                                     stderr=sys.stderr, cwd=tempdir)
 
289
                                     stderr=subprocess.PIPE,
 
290
                                     cwd=tempdir)
291
291
        cpio_proc = subprocess.Popen(['cpio', '-o', '--null', '-Hnewc', '--quiet'],
292
292
                                     stdin=find_proc.stdout,
293
293
                                     stdout=subprocess.PIPE,
294
 
                                     stderr=sys.stderr, cwd=tempdir)
 
294
                                     stderr=subprocess.PIPE,
 
295
                                     cwd=tempdir)
295
296
        f = open(initrd, 'ab')
296
297
        gzip_proc = subprocess.Popen(['gzip'], stdin=cpio_proc.stdout,
297
 
                                     stdout=f, stderr=sys.stderr)
 
298
                                     stdout=f, stderr=subprocess.PIPE)
298
299
        cpio_proc.wait()
299
300
        find_proc.wait()
300
301
        gzip_proc.wait()
301
302
        f.close()
302
303
        shutil.rmtree(tempdir)
303
304
 
 
305
        finderr = find_proc.stderr.read()
 
306
        cpioerr = cpio_proc.stderr.read()
 
307
        gziperr = gzip_proc.stderr.read()
 
308
        if finderr:
 
309
            logging.debug("find stderr=%s", finderr)
 
310
        if cpioerr:
 
311
            logging.debug("cpio stderr=%s", cpioerr)
 
312
        if gziperr:
 
313
            logging.debug("gzip stderr=%s", gziperr)
 
314
 
304
315
    def support_remote_url_install(self):
305
316
        if not self.conn:
306
317
            return False