Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rua fails to install split packages where pkgname != pkgbase #21

Open
Morganamilo opened this Issue Mar 10, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@Morganamilo
Copy link
Collaborator

Morganamilo commented Mar 10, 2019

For example when installing libc++ rua tries to fetch the libc++abi pkgbuild even though it doesn't exist.

morganamilo@Octavia srcinfo-crate ~git/rua % cargo run install libc++   
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/rua install libc++`
libc++ depends on AUR package libc++abi=7.0.1-2. Trying to fetch it...
thread 'main' panicked at 'Command failed with exit code Some(128)
Stderr: Cloning into 'aur.tmp'...
fatal: repository 'https://aur.archlinux.org/libc++abi=7.0.1-2.git/' not found

Stdout: ', src/aur_download.rs:15:2
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:340
   7: rua::aur_download::assert_command_success
             at src/aur_download.rs:15
   8: rua::aur_download::fresh_download
             at src/aur_download.rs:54
   9: rua::wrapped::prefetch_aur
             at src/wrapped.rs:140
  10: rua::wrapped::prefetch_aur
             at src/wrapped.rs:162
  11: rua::wrapped::install
             at src/wrapped.rs:260
  12: rua::main
             at src/main.rs:145
  13: std::rt::lang_start::{{closure}}
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  14: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  15: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  16: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  17: std::rt::lang_start
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  18: main
  19: __libc_start_main
  20: _start

If I try to install libc++abi directly it tries to pull llvm in as a dependency even though it is not a dependency. Hitting M to effectively skip installing it then causes makepkg because of the missing dependency. Even though using makepkg directly works fine.

morganamilo@Octavia srcinfo-crate ~git/rua % cargo run install libc++abi
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/rua install libc++abi`

In order to install libc++abi, the following pacman packages will need to be installed:
  llvm
And the following AUR packages will need to be built and installed:
  libc++abi

Proceed? [O]=ok, Ctrl-C=abort. o
Verifying package libc++abi. [V]=view PKGBUILD, [E]=edit PKGBUILD, [I]=run shell to inspect, [O]=ok, use package: o
Packages need to be installed:

    pacman -S --asdeps --needed llvm

Enter S to `sudo` install it, or install manually and press M when done. m
==> Making package: libc++abi 3.9.1-1 (Sun 10 Mar 2019 18:32:12 GMT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
  -> llvm
==> ERROR: Could not resolve all dependencies.
thread 'main' panicked at 'Failed to build package', src/wrapped.rs:64:2
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::begin_panic
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/panicking.rs:412
   6: rua::wrapped::build_local
             at src/wrapped.rs:64
   7: rua::wrapped::build_directory
             at src/wrapped.rs:86
   8: rua::wrapped::install_all
             at src/wrapped.rs:213
   9: rua::wrapped::install
             at src/wrapped.rs:267
  10: rua::main
             at src/main.rs:145
  11: std::rt::lang_start::{{closure}}
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  12: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  13: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  14: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  15: std::rt::lang_start
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  16: main
  17: __libc_start_main
  18: _start

And as another example of this there's clion-jre.

morganamilo@Octavia srcinfo-crate ~git/rua % cargo run install clion-jre 
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
     Running `target/debug/rua install clion-jre`
thread 'main' panicked at 'Repository clion-jre does not have an SRCINFO file. Does this package exist in AUR?', src/aur_download.rs:55:2
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:340
   7: rua::aur_download::fresh_download
             at src/aur_download.rs:55
   8: rua::wrapped::prefetch_aur
             at src/wrapped.rs:140
   9: rua::wrapped::install
             at src/wrapped.rs:260
  10: rua::main
             at src/main.rs:145
  11: std::rt::lang_start::{{closure}}
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  12: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  13: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  14: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  15: std::rt::lang_start
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  16: main
  17: __libc_start_main
  18: _start

@vn971 vn971 added the bug label Mar 10, 2019

@vn971

This comment has been minimized.

Copy link
Owner

vn971 commented Mar 10, 2019

Yeah. I know of this problem.. The proper solution is probably to use the AUR web (json) API.

@Morganamilo

This comment has been minimized.

Copy link
Collaborator Author

Morganamilo commented Mar 10, 2019

Oh I figured the LLVM dep out now. There used to be an aur package called libc++abi. And because the backing git repo is never removed, rua fetches the very old .SRCINFO file from that.

@vn971

This comment has been minimized.

Copy link
Owner

vn971 commented Mar 20, 2019

Oh, I understood it now. We shouldn't git clone when analyzing dependencies then, instead only use it when all dependencies are checked via AUR JSON API, and when user confirms the actions.

It seems sad that we have to rely on AUR JSON API more and more though, to my tastes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.