aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--layerindex/models.py7
-rw-r--r--rrs/admin.py6
-rwxr-xr-xrrs/tools/rrs_upgrade_history.py21
3 files changed, 6 insertions, 28 deletions
diff --git a/layerindex/models.py b/layerindex/models.py
index 04888be..8ac0cab 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -50,13 +50,6 @@ class PythonEnvironment(models.Model):
return cmd
@staticmethod
- def get_default_python2_environment():
- for env in PythonEnvironment.objects.all().order_by('id'):
- if env.name.replace(' ', '').lower().startswith(('python2', 'py2')):
- return env
- return None
-
- @staticmethod
def get_default_python3_environment():
for env in PythonEnvironment.objects.all().order_by('id'):
if env.name.replace(' ', '').lower().startswith(('python3', 'py3')):
diff --git a/rrs/admin.py b/rrs/admin.py
index a4712f2..445e591 100644
--- a/rrs/admin.py
+++ b/rrs/admin.py
@@ -22,9 +22,6 @@ class MaintenancePlanLayerBranchFormSet(BaseInlineFormSet):
def __init__(self, *args, **kwargs):
from layerindex.models import PythonEnvironment
initialfields = {}
- py2env = PythonEnvironment.get_default_python2_environment()
- if py2env:
- initialfields['python2_environment'] = py2env.id
py3env = PythonEnvironment.get_default_python3_environment()
if py3env:
initialfields['python3_environment'] = py3env.id
@@ -36,9 +33,6 @@ class MaintenancePlanLayerBranchFormSet(BaseInlineFormSet):
def empty_form(self):
from layerindex.models import PythonEnvironment
form = super(MaintenancePlanLayerBranchFormSet, self).empty_form
- py2env = PythonEnvironment.get_default_python2_environment()
- if py2env:
- form.fields['python2_environment'].initial = py2env
py3env = PythonEnvironment.get_default_python3_environment()
if py3env:
form.fields['python3_environment'].initial = py3env
diff --git a/rrs/tools/rrs_upgrade_history.py b/rrs/tools/rrs_upgrade_history.py
index 5070cc2..38e258c 100755
--- a/rrs/tools/rrs_upgrade_history.py
+++ b/rrs/tools/rrs_upgrade_history.py
@@ -38,21 +38,12 @@ if not fetchdir:
def run_internal(maintplanlayerbranch, commit, commitdate, options, logger, bitbake_map, initial=False):
from layerindex.models import PythonEnvironment
from rrs.models import Release
- if commitdate < maintplanlayerbranch.python3_switch_date:
- # Python 2
- if maintplanlayerbranch.python2_environment:
- cmdprefix = maintplanlayerbranch.python2_environment.get_command()
- else:
- cmdprefix = 'python'
- # Ensure we're using a bitbake version that is python 2 compatible
- if commitdate > datetime(2016, 5, 10):
- commitdate = datetime(2016, 5, 10)
+
+ # Python 3-only these days
+ if maintplanlayerbranch.python3_environment:
+ cmdprefix = maintplanlayerbranch.python3_environment.get_command()
else:
- # Python 3
- if maintplanlayerbranch.python3_environment:
- cmdprefix = maintplanlayerbranch.python3_environment.get_command()
- else:
- cmdprefix = 'python3'
+ cmdprefix = 'python3'
bitbake_rev = utils.runcmd(['git', 'rev-list', '-1', '--before=%s' % str(commitdate), 'origin/master'],
bitbakepath, logger=logger)
@@ -244,7 +235,7 @@ if __name__=="__main__":
parser = optparse.OptionParser(usage = """%prog [options]""")
# Starting date of the yocto project 1.6 release
- DEFAULT_SINCE_DATE = '2013-11-11'
+ DEFAULT_SINCE_DATE = '2016-06-02'
parser.add_option("-s", "--since",
help="Specify initial date for importing recipe upgrades (default '%s')" % DEFAULT_SINCE_DATE,
action="store", dest="since", default=DEFAULT_SINCE_DATE)