Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ The code for this application is maintained by the Yocto Project.

The latest version of the code can always be found here:

http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/
https://git.yoctoproject.org/layerindex-web/

Contributions are welcome. Please send patches / pull requests to
yocto-patches@lists.yoctoproject.org with '[layerindex-web]' in the
Expand Down
29 changes: 29 additions & 0 deletions layerindex/migrations/0051_fix_yoctoproject_cgit_urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 5.2.12 on 2026-04-09 18:51

from django.db import migrations


def fix_yoctoproject_cgit_urls(apps, schema_editor):
"""Update git.yoctoproject.org URLs from old cgit paths to new direct paths."""
LayerItem = apps.get_model('layerindex', 'LayerItem')

old = 'http://git.yoctoproject.org/cgit/cgit.cgi/'
new = 'https://git.yoctoproject.org/'

for layer in LayerItem.objects.filter(vcs_web_url__contains='git.yoctoproject.org/cgit/cgit.cgi/'):
layer.vcs_web_url = layer.vcs_web_url.replace(old, new)
layer.vcs_web_tree_base_url = layer.vcs_web_tree_base_url.replace(old, new)
layer.vcs_web_file_base_url = layer.vcs_web_file_base_url.replace(old, new)
layer.vcs_web_commit_url = layer.vcs_web_commit_url.replace(old, new)
layer.save()


class Migration(migrations.Migration):

dependencies = [
('layerindex', '0050_alter_recipe_inherits_alter_recipe_license'),
]

operations = [
migrations.RunPython(fix_yoctoproject_cgit_urls, migrations.RunPython.noop),
]
2 changes: 1 addition & 1 deletion layerindex/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def drop_dotgit(url):
elif self.url.startswith('git://github.com'):
return drop_dotgit('https' + self.url[3:])
elif self.url.startswith('git://git.yoctoproject.org'):
return drop_dotgit('https://git.yoctoproject.org/cgit/cgit.cgi' + self.url[26:])
return drop_dotgit('https://git.yoctoproject.org' + self.url[26:])
elif self.url.startswith('git://git.kernel.org'):
return 'https' + self.url[3:]
return None
Expand Down
8 changes: 4 additions & 4 deletions layerindex/tools/import_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def set_vcs_fields(layer, repoval):
layer.vcs_web_commit_url = 'http://cgit.openembedded.org/' + reponame + '/commit/?id=%hash%'
elif repoval.startswith('git://git.yoctoproject.org/'):
reponame = re.sub('^.*/', '', repoval)
layer.vcs_web_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame
layer.vcs_web_tree_base_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%'
layer.vcs_web_file_base_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%'
layer.vcs_web_commit_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/commit/?id=%hash%'
layer.vcs_web_url = 'https://git.yoctoproject.org/' + reponame
layer.vcs_web_tree_base_url = 'https://git.yoctoproject.org/' + reponame + '/tree/%path%?h=%branch%'
layer.vcs_web_file_base_url = 'https://git.yoctoproject.org/' + reponame + '/tree/%path%?h=%branch%'
layer.vcs_web_commit_url = 'https://git.yoctoproject.org/' + reponame + '/commit/?id=%hash%'
elif repoval.startswith('git://github.com/') or repoval.startswith('http://github.com/') or repoval.startswith('https://github.com/'):
reponame = re.sub('^.*github.com/', '', repoval)
reponame = re.sub('.git$', '', reponame)
Expand Down
8 changes: 4 additions & 4 deletions layerindex/tools/import_wiki_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ def main():
layer.vcs_web_commit_url = 'http://cgit.openembedded.org/' + reponame + '/commit/?id=%hash%'
elif repoval.startswith('git://git.yoctoproject.org/'):
reponame = re.sub('^.*/', '', repoval)
layer.vcs_web_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame
layer.vcs_web_tree_base_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%'
layer.vcs_web_file_base_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%'
layer.vcs_web_commit_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/commit/?id=%hash%'
layer.vcs_web_url = 'https://git.yoctoproject.org/' + reponame
layer.vcs_web_tree_base_url = 'https://git.yoctoproject.org/' + reponame + '/tree/%path%?h=%branch%'
layer.vcs_web_file_base_url = 'https://git.yoctoproject.org/' + reponame + '/tree/%path%?h=%branch%'
layer.vcs_web_commit_url = 'https://git.yoctoproject.org/' + reponame + '/commit/?id=%hash%'
elif repoval.startswith('git://github.com/') or repoval.startswith('http://github.com/') or repoval.startswith('https://github.com/'):
reponame = re.sub('^.*github.com/', '', repoval)
reponame = re.sub('.git$', '', reponame)
Expand Down
2 changes: 1 addition & 1 deletion templates/layerindex/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h3>Credits</h3>
<li>Tim Orling</li>
</ul>

<p>The code is Open Source and can be found on <a href="http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/">git.yoctoproject.org</a>. Patches welcome!</p>
<p>The code is Open Source and can be found on <a href="https://git.yoctoproject.org/layerindex-web/">git.yoctoproject.org</a>. Patches welcome!</p>

{% endautoescape %}
{% endblock %}
Expand Down
8 changes: 4 additions & 4 deletions templates/layerindex/editlayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ <h3>Verification</h3>
}
else if( repoval.startsWith('git://git.yoctoproject.org/') ) {
reponame = repoval.replace(/^.*\//, '')
this.vcs_web_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame
this.vcs_web_tree_base_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%'
this.vcs_web_file_base_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%'
this.vcs_web_commit_url = 'http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/commit/?id=%hash%'
this.vcs_web_url = 'https://git.yoctoproject.org/' + reponame
this.vcs_web_tree_base_url = 'https://git.yoctoproject.org/' + reponame + '/tree/%path%?h=%branch%'
this.vcs_web_file_base_url = 'https://git.yoctoproject.org/' + reponame + '/tree/%path%?h=%branch%'
this.vcs_web_commit_url = 'https://git.yoctoproject.org/' + reponame + '/commit/?id=%hash%'
this.vcs_web_type = 'cgit'
}
else if( repoval.startsWith('git://github.com/') ) {
Expand Down