public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Daisuke Fujimura <booleanlabel@gmail.com>
To: cygwin-apps@cygwin.com
Subject: Re: [PATCH cygport] pkg_info.cygpart: Do not detect dependencies on itself in ruby package
Date: Wed, 3 Apr 2024 23:18:15 +0900	[thread overview]
Message-ID: <CAA3frXShRjbXu1BqdL_0CvwnctvhLsYdZGFY7zehg6+a=xpMLA@mail.gmail.com> (raw)
In-Reply-To: <d80304da-f5cc-49f2-82fc-bf639b127e8d@dronecode.org.uk>

Thank you for reviewing this.

> Can you clarify what the "failure" is here?

ruby.cygport and its CI results are as follows.

- https://cygwin.com/cgit/cygwin-packages/ruby/commit/?id=65af41c137b45d09614ea99f78d7a4818b1bdfb1
- https://github.com/cygwin/scallywag/actions/runs/7580195232/job/20645744555#step:6:22939

```
>>> Creating source package
ruby-3.3.0-1.src/
ruby-3.3.0-1.src/2.0.0-cygwin-configure.patch
ruby-3.3.0-1.src/2.0.0-cygwin-rubygems.patch
ruby-3.3.0-1.src/2.5.1-win32-resolv.patch
ruby-3.3.0-1.src/9357.patch
ruby-3.3.0-1.src/ruby-2.1.0-always-use-i386.patch
ruby-3.3.0-1.src/ruby-2.1.0-custom-rubygems-location.patch
ruby-3.3.0-1.src/ruby-2.1.0-Enable-configuration-of-archlibdir.patch
ruby-3.3.0-1.src/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
ruby-3.3.0-1.src/ruby-2.3.0-ruby_version.patch
ruby-3.3.0-1.src/ruby-3.3.0-Disable-syntax-suggest-test-case.patch
ruby-3.3.0-1.src/ruby-3.3.0.tar.gz
ruby-3.3.0-1.src/ruby-3.4.0-ruby-net-http-Renew-test-certificates.patch
ruby-3.3.0-1.src/ruby.cygport

/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
>>> ruby requires: cygwin libcrypt2 libffi8 libgcc1 libgmp10 libssl3 libyaml0_2 ruby_33 zlib0 ca-certificates
/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
>>> ruby-devel requires: pkg-config ruby ruby_33 libcrypt-devel libgmp-devel
/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
/usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file
-- rbconfig (LoadError)
from /usr/share/rubygems/rubygems.rb:8:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
>>> ruby-doc requires:
>>> ruby-tcltk requires: ruby-tk
>>> Testing ruby-3.3.0-1.x86_64
:
:
```

LoadError is occurring three times because the ruby.exe used to detect
dependencies in the ruby package is not /usr/bin/ruby.exe but
${D}/usr/bin/ruby.exe.

- https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L562
- https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L564
- https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L565

${D}/usr/bin/ruby.exe is used because ${D} is added to the PATH.

- https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L137

As the ruby package itself does not depend on ruby-* other than its
own sub-packages, we considered that lines 560~600 did not need to be
executed.

- https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L560-L600

As for `ruby_xy`, as pointed out, there should be no diff.


On Sun, Mar 10, 2024 at 10:34 PM Jon Turney <jon.turney@dronecode.org.uk> wrote:
>
> On 16/02/2024 12:51, Daisuke Fujimura via Cygwin-apps wrote:
> > Attempting to create a package for ruby-3.3, but it fails when trying
> > to detect a dependency on itself.
>
> Thanks for this patch.
>
> Can you clarify what the "failure" is here?
>
> > To avoid this, skip them if the target is `ruby`.
>
> The second hunk seems like a removes the dependency on ruby_xy for the
> ruby package, which also provides ruby_xy.
>
> Historically, we've allowed self-dependencies like this, because they
> seem to be benign, although it seems like we could do with some generic
> code to suppress them
>
> (e.g. cygport also ends up generating cygwin-debuginfo with a dependency
> on itself, which is harmless but could be suppressed)
>

  reply	other threads:[~2024-04-03 14:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 12:51 Daisuke Fujimura
2024-03-10 13:34 ` Jon Turney
2024-04-03 14:18   ` Daisuke Fujimura [this message]
2024-05-06 14:12     ` Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA3frXShRjbXu1BqdL_0CvwnctvhLsYdZGFY7zehg6+a=xpMLA@mail.gmail.com' \
    --to=booleanlabel@gmail.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).