Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 539688 Details for
Bug 661242
Suggestion for development workflow
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch
patch.patch (text/plain), 5.96 KB, created by
Bruno Pinto
on 2018-07-16 00:02:54 UTC
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Bruno Pinto
Created:
2018-07-16 00:02:54 UTC
Size:
5.96 KB
patch
obsolete
>diff --git a/Dockerfile b/Dockerfile >index d54d9fa..ae4e124 100644 >--- a/Dockerfile >+++ b/Dockerfile >@@ -23,7 +23,6 @@ RUN bundler install > > # Git clones here. > RUN cp /var/www/packages.gentoo.org/htdocs/config/secrets.yml.dist /var/www/packages.gentoo.org/htdocs/config/secrets.yml >-RUN sed -i 's/set_me/ENV["SECRET_KEY_BASE"]/'g /var/www/packages.gentoo.org/htdocs/config/secrets.yml > > # Precompile our assets. > RUN rake assets:precompile >diff --git a/bin/update-changelogs.sh b/bin/update-changelogs.sh >index ae64050..b21678a 100755 >--- a/bin/update-changelogs.sh >+++ b/bin/update-changelogs.sh >@@ -1,5 +1,6 @@ > #!/bin/bash > >+mkdir /var/cache/pgo-egencache || exit 1 > cd /mnt/packages-tree/gentoo/ || exit 1 > egencache -j 6 --cache-dir /var/cache/pgo-egencache --repo gentoo --repositories-configuration '[gentoo] > location = /mnt/packages-tree/gentoo' --update-changelogs >diff --git a/bin/update-md5.sh b/bin/update-md5.sh >index 05eca90..643d6d1 100755 >--- a/bin/update-md5.sh >+++ b/bin/update-md5.sh >@@ -1,5 +1,6 @@ > #!/bin/bash > >+mkdir /var/cache/pgo-egencache || exit 1 > cd /mnt/packages-tree/gentoo/ || exit 1 > egencache -j 6 --cache-dir /var/cache/pgo-egencache --repo gentoo --repositories-configuration '[gentoo] > location = /mnt/packages-tree/gentoo' --update >diff --git a/docker-compose.override.yml b/docker-compose.override.yml >new file mode 100644 >index 0000000..45a45e5 >--- /dev/null >+++ b/docker-compose.override.yml >@@ -0,0 +1,21 @@ >+version: '2' >+ >+services: >+ http-serving: >+ environment: >+ - RAILS_ENV=development >+ - KKULEOMI_RUNTIME_PORTDIR=/mnt/packages-tree/gentoo >+ ports: >+ - "5000:5000" >+ volumes: >+ - .:/var/www/packages.gentoo.org/htdocs/ >+ - packages_tree:/mnt/packages-tree/gentoo/ >+ sidekiq: >+ environment: >+ - RAILS_ENV=development >+ volumes: >+ - .:/var/www/packages.gentoo.org/htdocs/ >+ - packages_tree:/mnt/packages-tree/gentoo/ >+ >+volumes: >+ packages_tree: >diff --git a/lib/kkuleomi/store.rb b/lib/kkuleomi/store.rb >index e5fc169..e9f540d 100644 >--- a/lib/kkuleomi/store.rb >+++ b/lib/kkuleomi/store.rb >@@ -4,43 +4,47 @@ module Kkuleomi::Store > end > > def self.create_index(force = false) >- types = [ >- Category, >- Package, >- Version, >- Change, >- Useflag, >- ] >+ types = [ >+ Category, >+ Package, >+ Version, >+ Change, >+ Useflag, >+ ] > > base_settings = { >- analysis: { >- filter: { >- autocomplete_filter: { >- type: 'edge_ngram', >- min_gram: 1, >- max_gram: 20, >- } >- }, >- analyzer: { >- autocomplete: { >- type: 'custom', >- tokenizer: 'standard', >- filter: %w(lowercase autocomplete_filter) >- } >- } >+ analysis: { >+ filter: { >+ autocomplete_filter: { >+ type: 'edge_ngram', >+ min_gram: 1, >+ max_gram: 20, >+ } > }, >- mapping: { total_fields: { limit: 50000 } } >+ analyzer: { >+ autocomplete: { >+ type: 'custom', >+ tokenizer: 'standard', >+ filter: %w(lowercase autocomplete_filter) >+ } >+ } >+ }, >+ mapping: { total_fields: { limit: 50000 } } > } > >- # In ES 1.5, we could use 1 mega-index. But in ES6, each model needs its own. >- types.each { |type| >- client = type.gateway.client >- client.indices.delete(index: type.index_name) rescue nil if force >- body = { >- settings: type.settings.to_hash.merge(base_settings), >- mappings: type.mappings.to_hash >- } >- client.indices.create(index: type.index_name, body: body) >- } >+ # In ES 1.5, we could use 1 mega-index. But in ES6, each model needs its own. >+ types.each { |type| >+ client = type.gateway.client >+ client.indices.delete(index: type.index_name) rescue nil if force >+ >+ body = { >+ settings: type.settings.to_hash.merge(base_settings), >+ mappings: type.mappings.to_hash >+ } >+ >+ unless client.indices.exists? index: type.index_name >+ client.indices.create index: type.index_name, body: body >+ end >+ } > end > end >diff --git a/lib/tasks/kkuleomi.rake b/lib/tasks/kkuleomi.rake >index 9b8bca0..94049a7 100644 >--- a/lib/tasks/kkuleomi.rake >+++ b/lib/tasks/kkuleomi.rake >@@ -4,6 +4,11 @@ namespace :kkuleomi do > task init: :environment do > Kkuleomi::Store.create_index true > end >+ >+ desc 'Updates the ElasticSearch index' >+ task update: :environment do >+ Kkuleomi::Store.create_index false >+ end > end > > namespace :update do >diff --git a/script/setup.sh b/script/setup.sh >new file mode 100755 >index 0000000..9c21c12 >--- /dev/null >+++ b/script/setup.sh >@@ -0,0 +1,72 @@ >+#!/usr/bin/env bash >+ >+set -o pipefail >+set -o errexit >+set -o nounset >+ >+error() { >+ echo -e "\e[31m$1" >+} >+ >+info() { >+ echo -e "\e[0m$1" >+} >+ >+success() { >+ echo -e "\e[32m$1" >+} >+ >+info 'Copying configuration...' >+if test -e config/secrets.yml; then >+ success ' File "config/secrets.yml" already exists.' >+else >+ cp -n config/secrets.yml.example config/secrets.yml >+fi >+ >+info 'Installing gems...' >+if bundle install --quiet; then >+ success ' Installed.' >+else >+ error ' Installation failed.' >+ exit 1 >+fi >+ >+info 'Updating gentoo packages tree...' >+if git -C /mnt/packages-tree/gentoo pull --rebase &>/dev/null; then >+ success ' Updated.' >+else >+ error ' Update failed.' >+ exit 1 >+fi >+ >+info 'Updating md5...' >+if bin/update-md5.sh; then >+ success ' Updated.' >+else >+ error ' Update failed.' >+ exit 1 >+fi >+ >+info 'Updating USE flags...' >+if bin/update-use.sh; then >+ success ' Updated.' >+else >+ error ' Update failed.' >+ exit 1 >+fi >+ >+info 'Creating indexes...' >+if rake kkuleomi:index:update; then >+ success ' Created.' >+else >+ error ' Creation failed.' >+ exit 1 >+fi >+ >+info 'Seeding packages...' >+if rake kkuleomi:update:all; then >+ success ' Seeded.' >+else >+ error ' Packages seed failed.' >+ exit 1 >+fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 661242
:
539678
|
539688
|
586282