Code Monkey home page Code Monkey logo

Comments (8)

anatol avatar anatol commented on August 23, 2024

Thanks for info. Yes these two packages need rake make dependency. I added it and was able to build it successfully.

Do you see the issue with other packages?

from quarry.

eli-schwartz avatar eli-schwartz commented on August 23, 2024

Not yet. I got all the way to ruby-debug-ide, which failed because it declares a patched-in dependency on debase but no other package currently needs it, and it is not in the whitelist, and quarry does not add dependencies from config.pkg/*.yaml to the build queue.

So, I've just appended it to the whitelist as a dirty hack, and the mass build is now progressing again.

from quarry.

anatol avatar anatol commented on August 23, 2024

Yeah, I see ruby-debug-ide uses debase gem https://github.com/ruby-debug/ruby-debug-ide/blob/master/Gemfile but does not declare it in its *.gemspec. It is weird. Maybe upstream should be contacted to clarify this situation.

In a short-term just add a dependency to its config.pkg with a comment why it been added + this issue number.

PS here is upstream issue ruby-debug/ruby-debug-ide#92

from quarry.

eli-schwartz avatar eli-schwartz commented on August 23, 2024

Uhhh, there's already a patch in quarry :D and the package has a depends+=(ruby-debase) and a prepare() that patches it into the gemfile.

But, the build queue does not realize that it should build debase, and therefore makechrootpkg fails with an error: target not found: ruby-debase

This is why I am saying, if a package already declares a config.pkg dependency on a package that is a valid ruby package, it should be added to the build queue alongside packages in the whitelist.
Otherwise the package is required, but not built with the native dependencies.

from quarry.

anatol avatar anatol commented on August 23, 2024

there's already a patch in quarry :D and the package

Oops missed that.

if a package already declares a config.pkg dependency on a package that is a valid ruby package, it should be added to the build queue alongside packages in the whitelist.

That is how quarry worked from the beginning. Are you saying that is not true anymore? If so then it is a bug and should be fixed.

from quarry.

eli-schwartz avatar eli-schwartz commented on August 23, 2024

It... doesn't seem to be true? As I said, ruby-debase is not being built.

quarry/lib/quarry.rb

Lines 564 to 579 in 2e4b609

while pkg = packages_to_generate.last
version = slot_to_version(*pkg)
spec = package_spec(pkg[0], version)
upfront_deps = [] # packages should be processed before 'pkg'
for d in spec.runtime_dependencies
s = dependency_to_slot(d)
key = [d.name, s]
if packages_to_generate.include?(key)
# if dependency has to be generated, do it before 'pkg'
packages_to_generate.delete(key)
upfront_deps << key
elsif not existing_packages[key]
upfront_deps << key
end
end

And I stuck a bunch of debugging prints to see what is going on at various stages, this is what I get -- notice that debase is not mentioned anywhere. AFAICT dependencies are only added from spec.runtime_dependencies and not the config.pkg:

Queueing ["unicorn", nil] to build...
building OFFICIAL_PACKAGES cache...
Not building ["unicorn", nil] as package is in the official repos
sync root chroot in case next package needs the package we just build
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 quarry is up to date
:: Starting full system upgrade...
 there is nothing to do
Queueing ["treetop", nil] to build...
Not queueing ["polyglot", nil] because it is already in the repos
Not building ["treetop", nil] as package is in the official repos
sync root chroot in case next package needs the package we just build
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 quarry is up to date
:: Starting full system upgrade...
 there is nothing to do
Queueing ["tilt", nil] to build...
Not building ["tilt", nil] as package is in the official repos
sync root chroot in case next package needs the package we just build
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 quarry is up to date
:: Starting full system upgrade...
 there is nothing to do
Queueing ["thor", nil] to build...
Not building ["thor", nil] as package is in the official repos
sync root chroot in case next package needs the package we just build
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 quarry is up to date
:: Starting full system upgrade...
 there is nothing to do
Queueing ["thin", nil] to build...
Not queueing ["rack", nil] because it is already in the repos
Not queueing ["eventmachine", nil] because it is already in the repos
Not queueing ["daemons", nil] because it is already in the repos
Not building ["thin", nil] as package is in the official repos
sync root chroot in case next package needs the package we just build
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 quarry is up to date
:: Starting full system upgrade...
 there is nothing to do
Queueing ["ruby-debug-ide", nil] to build...
Not queueing ["rake", nil] because it is already in the repos
Building ["ruby-debug-ide", nil]...
==> Synchronizing chroot copy [/var/lib/quarry/quarry/work/chroot/root] -> [quarry]...done
==> Making package: ruby-ruby-debug-ide 0.6.1-1 (Fri Feb 16 14:20:09 EST 2018)
==> Retrieving sources...
  -> Found ruby-debug-ide-0.6.1.gem
  -> Found patch
==> Validating source files with sha1sums...
    ruby-debug-ide-0.6.1.gem ... Passed
    patch ... Passed
==> Making package: ruby-ruby-debug-ide 0.6.1-1 (Fri Feb 16 14:20:11 EST 2018)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: ruby-debase
==> ERROR: 'pacman' failed to install missing dependencies.
==> ERROR: Build failed, check /var/lib/quarry/quarry/work/chroot/quarry/build
Traceback (most recent call last):
	4: from ./lib/update.rb:20:in `<main>'
	3: from /var/lib/quarry/quarry/lib/quarry.rb:636:in `build_packages'
	2: from /var/lib/quarry/quarry/lib/quarry.rb:574:in `build_package'
	1: from /var/lib/quarry/quarry/lib/quarry.rb:574:in `chdir'
/var/lib/quarry/quarry/lib/quarry.rb:581:in `block in build_package': The binary package was not built: ruby-ruby-debug-ide-0.6.1-1-x86_64.pkg.tar.xz (RuntimeError)
  • Note that "not building ... as package is in the official repos" is the warning when we skip running build_package
  • "Not queueing ... because it is already in the repos" is what happens when a dependency key is rejected from getting added via upfront_deps << key.
  • "Queueing ... at the head of the stack" indicates a dependency key from spec.runtime_dependencies was already in packages_to_generate and had to be deleted and re-added
  • "Adding ... to the queue" is the same but for keys that are not yet in packages_to_generate.

from quarry.

anatol avatar anatol commented on August 23, 2024

ruby-debase is not being built.

Then it is definitely a Quarry bug.

The dependency list is built by package_with_changed_dependencies() that calls generate_dependency_list() that has this snippet

if config and config['depends']
  dependencies = config['depends'] + dependencies
end

The dependencies are lost somewhere along the way.

from quarry.

eli-schwartz avatar eli-schwartz commented on August 23, 2024

Hmm, looks like package_with_changed_dependencies is modifying the existing_packages in place, and adding that to the list of packages that need to be built (with dependencies included).

This only works if the package has been built before without the added dependency from config.pkg, which is why I'm seeing this error -- I am attempting to build all packages from scratch.

I discovered this when it turned out pp changed_dep_packages returned nothing at all, despite this being obviously wrong.

from quarry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.