<commit_before>#
# Copyright (c) 2009 rPath, Inc.
#
# All Rights Reserved
#

import copy
import logging
import os
import shutil
import subprocess
import sys
import tempfile
from conary import callbacks
from conary import conarycfg
from conary import updatecmd
from conary.lib.util import copyfileobj
from conary.conaryclient import cmdline
from jobmaster.util import AtomicFile, setupLogging, createFile

log = logging.getLogger(__name__)


def archiveRoot(fsRoot, destPath):
    """
    Archive the contents of the directory C{fsRoot} to the xzball C{destPath}.
    """
    try:
        proc = subprocess.Popen("/bin/tar -cC '%s' . "
                #"--exclude var/lib/conarydb "
                "--exclude var/lib/conarydb/rollbacks "<commit_msg>Don't exclude the rollbacks directory, or conary will die on R/O mounts<commit_after>#
# Copyright (c) 2009 rPath, Inc.
#
# All Rights Reserved
#

import copy
import logging
import os
import shutil
import subprocess
import sys
import tempfile
from conary import callbacks
from conary import conarycfg
from conary import updatecmd
from conary.lib.util import copyfileobj
from conary.conaryclient import cmdline
from jobmaster.util import AtomicFile, setupLogging, createFile

log = logging.getLogger(__name__)


def archiveRoot(fsRoot, destPath):
    """
    Archive the contents of the directory C{fsRoot} to the xzball C{destPath}.
    """
    try:
        proc = subprocess.Popen("/bin/tar -cC '%s' . "
                #"--exclude var/lib/conarydb "
                "--exclude var/lib/conarydb/rollbacks/\\* "
{'fraction_non_alphanumeric': 0.08653846153846154, 'fraction_numerical': 0.005128205128205128, 'mean_word_length': 3.485632183908046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4193194', 'n_tokens_mistral': 488, 'n_tokens_neox': 461, 'n_words': 159}