Example #1
0
 def tree_id(self):
     md5sum = hashlib.md5()
     if self.patches:
         for patch in self.patches:
             md5sum.update(patch[0])
     if self.quilt:
         md5sum.update(get_output("quilt files", cwd=self.srcdir, extra_env={"QUILT_PATCHES": self.quilt.srcdir}))
     return "%s-%s" % (self.version, md5sum.hexdigest())
Example #2
0
def warn_local_modulesets(config):
    if config.use_local_modulesets:
        return

    moduleset_local_path = os.path.join(SRCDIR, 'modulesets')
    if not os.path.exists(moduleset_local_path):
        # moduleset-less checkout
        return

    if not os.path.exists(os.path.join(moduleset_local_path, '..', '.git')):
        # checkout was not done via git
        return

    if type(config.moduleset) == type([]):
        modulesets = config.moduleset
    else:
        modulesets = [ config.moduleset ]

    if not [x for x in modulesets if x.find('/') == -1]:
        # all modulesets have a slash; they are URI
        return

    try:
        git_diff = get_output(['git', 'diff', 'origin/master', '--', '.'],
                cwd=moduleset_local_path).strip()
    except CommandError:
        # git error, ignore
        return

    if not git_diff:
        # no locally modified moduleset
        return

    logging.info(
            'Modulesets were edited locally but JHBuild is configured '\
            'to get them from the network, perhaps you need to add '\
            'use_local_modulesets = True to your %s.' % config.filename)
Example #3
0
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

import sys
import os
import signal
import subprocess
import locale

from icbuild.frontends import buildscript
from icbuild.utils import cmds
from icbuild.errors import CommandError, FatalError

try: t_bold = cmds.get_output(['tput', 'bold'])
except: t_bold = ''
try: t_reset = cmds.get_output(['tput', 'sgr0'])
except: t_reset = ''
t_colour = [''] * 16
try:
    for i in range(8):
        t_colour[i] = cmds.get_output(['tput', 'setf', '%d' % i])
        t_colour[i+8] = t_bold + t_colour[i]
except: pass


class TerminalBuildScript(buildscript.BuildScript):
    triedcheckout = None
    is_end_of_build = False