aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2018-02-26 19:30:14 -0500
committerAlec Warner <antarus@gentoo.org>2018-02-26 19:30:14 -0500
commit950ae1aa1bf3db94e00539f677a445e747209988 (patch)
treeda75b13c806ee9200ed8b40715de2a4325700666
parentUse new unique_versions view in package show UI. (diff)
downloadpackages-950ae1aa1bf3db94e00539f677a445e747209988.tar.gz
packages-950ae1aa1bf3db94e00539f677a445e747209988.tar.bz2
packages-950ae1aa1bf3db94e00539f677a445e747209988.zip
Fix broken deletion of versions in import code.v6.0.6
The previous version relied on elastic search matching packages based solely on package name (e.g. "gentoo-sources") but in order to collect the version from the index, an entire atom is required.
-rw-r--r--lib/kkuleomi/store/models/package_import.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kkuleomi/store/models/package_import.rb b/lib/kkuleomi/store/models/package_import.rb
index 5de425a..99ab433 100644
--- a/lib/kkuleomi/store/models/package_import.rb
+++ b/lib/kkuleomi/store/models/package_import.rb
@@ -103,7 +103,7 @@ module Kkuleomi::Store::Models::PackageImport
end
def import_versions!(package_model, ebuilds, options)
- index_v = Hash[Version.find_all_by(:package, self.name).map { |v| [v.version, v] }]
+ index_v = Hash[Version.find_all_by(:package, package_model.to_cp).map { |v| [v.version, v] }]
model_v = Hash[ebuilds.map { |v| [v.version, v] }]
index_keys = index_v.keys