Bug 1308057 - rubygem-occi-core: FTBFS in rawhide
Summary: rubygem-occi-core: FTBFS in rawhide
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-occi-core
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: František Dvořák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1308101
Blocks: F24FTBFS 1308055 1308056
TreeView+ depends on / blocked
 
Reported: 2016-02-13 22:22 UTC by Fedora Release Engineering
Modified: 2016-07-02 15:29 UTC (History)
3 users (show)

Fixed In Version: rubygem-occi-core-4.3.2-4.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-02 15:29:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (25.01 KB, text/plain)
2016-02-13 22:22 UTC, Fedora Release Engineering
no flags Details
root.log (86.46 KB, text/plain)
2016-02-13 22:22 UTC, Fedora Release Engineering
no flags Details
state.log (661 bytes, text/plain)
2016-02-13 22:22 UTC, Fedora Release Engineering
no flags Details
example of collect in initializer (307 bytes, application/x-ruby)
2016-05-27 14:17 UTC, František Dvořák
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Ruby 12437 0 None None None 2016-05-30 10:44:01 UTC

Description Fedora Release Engineering 2016-02-13 22:22:15 UTC
Your package rubygem-occi-core failed to build from source in current rawhide.

http://koji.fedoraproject.org/koji/taskinfo?taskID=12866853

For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

Comment 1 Fedora Release Engineering 2016-02-13 22:22:17 UTC
Created attachment 1126231 [details]
build.log

Comment 2 Fedora Release Engineering 2016-02-13 22:22:18 UTC
Created attachment 1126232 [details]
root.log

Comment 3 Fedora Release Engineering 2016-02-13 22:22:19 UTC
Created attachment 1126233 [details]
state.log

Comment 4 František Dvořák 2016-02-14 13:09:35 UTC
Peculiar error from dnf:

Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 rubygem-bigdecimal                        x86_64                1.2.8-54.fc24                      fedora                 87 k
 rubygem-did_you_mean                      x86_64                1.0.0-54.fc24                      fedora                219 k
 rubygem-io-console                        x86_64                0.4.5-54.fc24                      fedora                 58 k

Maybe fixing build of rubygems and its rebuild could help?

Comment 5 Mamoru TASAKA 2016-02-16 03:52:32 UTC
Caused by this change

https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52591

This can be reproduced even on Fedora 23 if you modify /usr/share/ruby/set.rb , around lines like

---------------------------------------------------------
  # Replaces the elements with ones returned by collect().
  def collect!
    block_given? or return enum_for(__method__)
    # ruby 2.2. definition
    #set = self.class.new
    #each { |o| set << yield(o) }
    #replace(set)
    # ruby 2.3 definition
    replace(self.class.new(self) { |o| yield(o) })
  end
--------------------------------------------------------

Backtrace actually shows this. Vit, is it "legal" to call collect! in class initializer? The code in question here is:

---------------------------------------------------------
      1 module Occi
      2   module Core
      3     class Categories < Set
      4 
      5       include Occi::Helpers::Inspect
      6       include Occi::Helpers::Comparators::Categories
      7 
      8       attr_accessor :model
      9 
     10       def initialize(categories=[])
     11         categories.collect! { |category| convert category } if categories <==================================
     12         super categories
     13       end
---------------------------------------------------------

Comment 6 Vít Ondruch 2016-02-22 12:54:59 UTC
(In reply to Mamoru TASAKA from comment #5)
> Vit, is it "legal" to call collect! in class initializer?

I have not a chance to dig deep enough to understand the problem, but generally, I can't see any reason why collect! should not be called.

But since you identified the upstream change responsible for this issue and the code used to work but it does not work anymore, I would open upstream bug, since "microptimization" and "readability" can be hardly justification for regression.

Comment 7 Jan Kurik 2016-02-24 15:09:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 8 Vít Ondruch 2016-05-27 13:55:09 UTC
Is it by a chance fixed by Ruby 2.3.1 (in Fedora 24/Rawhide)?

Comment 9 František Dvořák 2016-05-27 14:14:28 UTC
No, still the same error, built with ruby 2.3.1-56.fc25 (http://koji.fedoraproject.org/koji/taskinfo?taskID=14276169)

I guess we should report that to bugs.ruby-lang.org?

In the meantime it could be worked-around by patch in rubygem-occi-core.

Comment 10 František Dvořák 2016-05-27 14:17:04 UTC
Created attachment 1162501 [details]
example of collect in initializer

Attaching the simple example showing the problem.

Comment 11 Mamoru TASAKA 2016-05-30 03:44:56 UTC
If you would ask this upstream, I would appreciate it (I think it is best to report this upstream)

Comment 12 Vít Ondruch 2016-05-30 10:44:01 UTC
Reported upstream to move forward with this issue.

Comment 13 Fedora Update System 2016-06-19 18:57:54 UTC
rubygem-occi-core-4.3.2-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-87be38c14e

Comment 14 František Dvořák 2016-06-19 19:10:19 UTC
Worked around using this patch (based on the ruby change 52591):

http://pkgs.fedoraproject.org/cgit/rpms/rubygem-occi-core.git/plain/ftbfs-ruby23.patch

Theoretically there could be some side effects (it's a hack! :-)), but this gem and all dependencies are covered by tests so it should be all right.

Thanks!

Comment 15 Upstream Release Monitoring 2016-06-19 20:55:47 UTC
valtri's rubygem-occi-core-4.3.2-4.fc25 completed http://koji.fedoraproject.org/koji/buildinfo?buildID=773958

Comment 16 Fedora Update System 2016-06-20 20:54:36 UTC
rubygem-occi-core-4.3.2-4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-87be38c14e

Comment 17 Fedora Update System 2016-07-02 15:29:17 UTC
rubygem-occi-core-4.3.2-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.