~bregma/libertine/add-more-missing-runtime-deps

« back to all changes in this revision

Viewing changes to python/libertine/Libertine.py

  • Committer: Stephen M. Webb
  • Date: 2015-09-08 17:46:14 UTC
  • mfrom: (100.1.2 lp-1493296)
  • Revision ID: stephen.webb@canonical.com-20150908174614-xim38xcc391x6vap
python3-libertine: made proot dependency arch-specific and optional

Show diffs side-by-side

added added

removed removed

Lines of Context:
403
403
 
404
404
        if installed_release == "trusty":
405
405
            print("Additional configuration for Trusty chroot...")
406
 
            cmd_line_prefix = "proot -b /usr/lib/locale -S " + self.chroot_path
 
406
 
 
407
            proot_cmd = '/usr/bin/proot'
 
408
            if not os.path.isfile(proot_cmd) or not os.access(proot_cmd, os.X_OK):
 
409
                raise RuntimeError('executable proot not found')
 
410
            cmd_line_prefix = proot_cmd + " -b /usr/lib/locale -S " + self.chroot_path
407
411
            
408
412
            command_line = cmd_line_prefix + " dpkg-divert --local --rename --add /etc/init.d/systemd-logind"
409
413
            args = shlex.split(command_line)
449
453
 
450
454
    def update_libertine_container(self):
451
455
        if self.series == "trusty":
452
 
            command_line = "proot -b /usr/lib/locale -S " + self.chroot_path + " apt-get update"
 
456
            proot_cmd = '/usr/bin/proot'
 
457
            if not os.path.isfile(proot_cmd) or not os.access(proot_cmd, os.X_OK):
 
458
                raise RuntimeError('executable proot not found')
 
459
            command_line = proot_cmd + " -b /usr/lib/locale -S " + self.chroot_path + " apt-get update"
453
460
        else:
454
461
            command_line = "fakechroot fakeroot chroot " + self.chroot_path + " /usr/bin/apt-get update"
455
462
        args = shlex.split(command_line)
456
463
        cmd = subprocess.Popen(args).wait()
457
464
 
458
465
        if self.series == "trusty":
459
 
            command_line = "proot -b /usr/lib/locale -S " + self.chroot_path + " apt-get dist-upgrade -y"
 
466
            proot_cmd = '/usr/bin/proot'
 
467
            if not os.path.isfile(proot_cmd) or not os.access(proot_cmd, os.X_OK):
 
468
                raise RuntimeError('executable proot not found')
 
469
            command_line = proot_cmd + " -b /usr/lib/locale -S " + self.chroot_path + " apt-get dist-upgrade -y"
460
470
        else:
461
471
            command_line = "fakechroot fakeroot chroot " + self.chroot_path + " /usr/bin/apt-get dist-upgrade -y"
462
472
        args = shlex.split(command_line)
464
474
 
465
475
    def install_package(self, package_name):
466
476
        if self.series == "trusty":
467
 
            command_line = "proot -b /usr/lib/locale -S " + self.chroot_path + " apt-get install -y " + package_name
 
477
            proot_cmd = '/usr/bin/proot'
 
478
            if not os.path.isfile(proot_cmd) or not os.access(proot_cmd, os.X_OK):
 
479
                raise RuntimeError('executable proot not found')
 
480
            command_line = proot_cmd + " -b /usr/lib/locale -S " + self.chroot_path + " apt-get install -y " + package_name
468
481
        else:
469
482
            command_line = "fakechroot fakeroot chroot " + self.chroot_path + " /usr/bin/apt-get install -y " + package_name
470
483
        args = shlex.split(command_line)