~smoser/ubuntu/vivid/curtin/fix-1263181

« back to all changes in this revision

Viewing changes to curtin/reporter/__init__.py

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2014-10-27 12:25:27 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20141027122527-7vn110c6ykgpoy93
Tags: 0.1.0~bzr195-0ubuntu1
* New upstream snapshot.
  * move install log from /var/log/curtin_install.log to
    /var/log/curtin/install.log (LP: #1378910)
  * to not use '--acl' when extracting tar files (LP: #1382632)
    as it inadvertently writes default directory acls.
  * invoke lsblk with '--output' rather than '--out' to avoid
    ambiguity in newer versions of lsblk (LP: #1386275)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# TODO - make python3 compliant
21
21
# str = None
22
22
 
 
23
import os
 
24
 
23
25
from abc import (
24
26
    ABCMeta,
25
27
    abstractmethod,
27
29
from curtin.log import LOG
28
30
from curtin.util import (
29
31
    try_import_module,
 
32
    ensure_dir,
30
33
    )
31
34
 
32
 
INSTALL_LOG = "/var/log/curtin_install.log"
 
35
INSTALL_LOG = "/var/log/curtin/install.log"
33
36
 
34
37
 
35
38
class BaseReporter:
90
93
 
91
94
def clear_install_log():
92
95
    """Clear the installation log, so no previous installation is present."""
 
96
    # Create MAAS install log directory
 
97
    ensure_dir(os.path.dirname(INSTALL_LOG))
93
98
    try:
94
99
        open(INSTALL_LOG, 'w').close()
95
 
    except IOError:
 
100
    except:
96
101
        pass
97
102
 
98
103