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

"Failed to pull latest commits" on multiple packages #959

Open
etdr opened this issue Nov 7, 2024 · 5 comments
Open

"Failed to pull latest commits" on multiple packages #959

etdr opened this issue Nov 7, 2024 · 5 comments

Comments

@etdr
Copy link

etdr commented Nov 7, 2024

I am really sorry if this is a duplicate, I'm not sure if my setup is configured incorrectly.

Every time I try to upgrade a package I immediately get "Failed to pull latest commits - you may be building an old version!" and sure enough it builds the version that currently exists on my system. I feel like this is something I'm just overlooking, was a longtime Aura 3 user and have been using v4 since it hit stable a few months ago. I have run aura check and nothing in there seems to be anything that would affect this. It happens with both git and non-git AUR packages.

When I run aura -Au I get "a git clone failed" and when I just run aura -Ay I get "a git pull failed" for every package. I don't have any other problems with git on my system.

@fosskers
Copy link
Owner

fosskers commented Nov 7, 2024

a longtime Aura 3 user

Thank you for sticking with Aura :)

It happens with both git and non-git AUR packages.

Aura 4 now does a git clone on every package on the AUR in order to keep metadata "closer to home". This speeds up various processes later in the pipeline, but is clearly causing you a problem here.

git is being invoked internally in functions like:

pub fn pull(dir: &Path) -> Result<(), Error> {
    debug!("Pulling {}", dir.display());

    Command::new("git")
        .arg("pull")
        .arg("--quiet")
        .arg("--ff-only")
        .stdout(Stdio::null())
        .stderr(Stdio::null())
        .current_dir(dir)
        .status()
        .map_err(Error::Io)?
        .success()
        .then_some(())
        .ok_or_else(|| Error::Pull(dir.to_path_buf()))
}

Two things to try:

  1. Try some of these operations with --log-level=debug active and see if anything suspicious sticks out.
  2. Entirely delete the contents of ~/.cache/aura/packages/ and then try to install a single thing from the AUR to see if the problem persists.

It may have been that somehow the initial clone calls failed, leaving a kind of broken clone for which subsequent pull fails just die.

@etdr
Copy link
Author

etdr commented Nov 8, 2024

Ok so, here's the debug output:

00:05:16 [DEBUG] (1) aura: Args {
    english: false,
    japanese: false,
    german: false,
    polish: false,
    croatian: false,
    swedish: false,
    spanish: false,
    portuguese: false,
    french: false,
    russian: false,
    italian: false,
    serbian: false,
    norwegian: false,
    indonesian: false,
    simplified_chinese: false,
    esperanto: false,
    dutch: false,
    turkish: false,
    arabic: false,
    ukrainian: false,
    romanian: false,
    vietnamese: false,
    czech: false,
    korean: false,
    hindi: false,
    bengali: false,
    log_level: Some(
        Debug,
    ),
    noconfirm: false,
    subcmd: Aur(
        Aur {
            info: [],
            search: [],
            provides: None,
            abc: false,
            limit: None,
            reverse: false,
            quiet: false,
            open: None,
            pkgbuild: None,
            build: None,
            builduser: None,
            diff: false,
            hotedit: false,
            shellcheck: false,
            delmakedeps: false,
            clean: false,
            asdeps: false,
            sysupgrade: true,
            git: false,
            ignore: [],
            dryrun: false,
            wclone: [],
            unsuppress: false,
            refresh: false,
            nocheck: false,
            skipdepcheck: false,
            skipinteg: false,
            skippgpcheck: false,
            packages: [],
        },
    ),
}
00:05:16 [DEBUG] (1) aura::env: Reading: /home/winfield/.config/aura/config.toml
00:05:16 [DEBUG] (1) aura::env: Raw config parse successful: true
00:05:16 [DEBUG] (1) i18n_embed: Attempting to load language file: "en-US/aura_pm.ftl"
00:05:16 [DEBUG] (1) i18n_embed::fluent: Loaded language file: "en-US/aura_pm.ftl" for language: "en-US"
00:05:16 [INFO] Language: en
00:05:16 [INFO] Upgrading all AUR packages.
00:05:16 [DEBUG] (1) aura::command::aur: Will ignore: {}
00:05:17 [DEBUG] (1) aura::command::aur: Foreign packages: 66
00:05:17 [DEBUG] (1) aura::command::aur: After excluding ignores and debugs: 65
aura :: Fetching package information...
00:05:17 [DEBUG] (20) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=alhp-keyring
00:05:17 [DEBUG] (13) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=calcmysky
00:05:17 [DEBUG] (11) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=non-timeline
00:05:17 [DEBUG] (7) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=brother-mfc-l5900dw
00:05:17 [DEBUG] (2) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=python-launcher
00:05:17 [DEBUG] (3) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=rate-mirrors
00:05:17 [DEBUG] (14) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=aura
00:05:17 [DEBUG] (5) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=gcc12-libs
00:05:17 [DEBUG] (12) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=ams-lv2
00:05:17 [DEBUG] (16) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=python311
00:05:17 [DEBUG] (19) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=bitwig-studio
00:05:17 [DEBUG] (4) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=ninjas2-standalone
00:05:17 [DEBUG] (21) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=figlet-fonts
00:05:17 [DEBUG] (15) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=python-vdf
00:05:17 [DEBUG] (8) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=alhp-mirrorlist
00:05:17 [DEBUG] (10) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=android-sdk-platform-tools
00:05:17 [DEBUG] (17) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=osmid
00:05:17 [DEBUG] (6) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=qt5-webview
00:05:17 [DEBUG] (18) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=python310
00:05:17 [DEBUG] (9) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=ookla-speedtest-bin
00:05:17 [DEBUG] (20) aura_core::git: Cloning https://aur.archlinux.org/alhp-keyring.git
00:05:17 [DEBUG] (12) aura_core::git: Cloning https://aur.archlinux.org/ams-lv2.git
00:05:17 [DEBUG] (2) aura_core::git: Cloning https://aur.archlinux.org/python-launcher.git
00:05:17 [DEBUG] (8) aura_core::git: Cloning https://aur.archlinux.org/alhp-mirrorlist.git
00:05:17 [DEBUG] (5) aura_core::git: Cloning https://aur.archlinux.org/gcc12.git
00:05:17 [DEBUG] (7) aura_core::git: Cloning https://aur.archlinux.org/brother-mfc-l5900dw.git
00:05:17 [DEBUG] (17) aura_core::git: Cloning https://aur.archlinux.org/osmid.git
00:05:17 [DEBUG] (9) aura_core::git: Cloning https://aur.archlinux.org/ookla-speedtest-bin.git
00:05:17 [DEBUG] (4) aura::fetch: CURL calling https://faur.fosskers.ca/packages?names=ninjas2-vst
00:05:17 [DEBUG] (19) aura_core::git: Cloning https://aur.archlinux.org/bitwig-studio.git
00:05:17 [DEBUG] (14) aura_core::git: Cloning https://aur.archlinux.org/aura.git
00:05:17 [DEBUG] (18) aura_core::git: Cloning https://aur.archlinux.org/python310.git
00:05:17 [DEBUG] (3) aura_core::git: Cloning https://aur.archlinux.org/rate-mirrors.git
00:05:17 [DEBUG] (15) aura_core::git: Cloning https://aur.archlinux.org/python-vdf.git
00:05:17 [DEBUG] (11) aura_core::git: Cloning https://aur.archlinux.org/non-daw.git
00:05:17 [DEBUG] (10) aura_core::git: Cloning https://aur.archlinux.org/android-sdk-platform-tools.git
00:05:17 [DEBUG] (6) aura_core::git: Cloning https://aur.archlinux.org/qt5-webview.git
00:05:17 [DEBUG] (13) aura_core::git: Cloning https://aur.archlinux.org/calcmysky.git
00:05:17 [DEBUG] (16) aura_core::git: Cloning https://aur.archlinux.org/python311.git
00:05:17 [DEBUG] (21) aura_core::git: Cloning https://aur.archlinux.org/figlet-fonts.git
aura :: A git clone failed: https://aur.archlinux.org/ams-lv2.git

This was after deleting the entire ~/.cache/aura directory and running aura -Au a few times, every time I run it I get a different package that causes the failure but it's usually the first or second it tries and so my guess is that all of them would fail and just one is failing first.

@fosskers
Copy link
Owner

fosskers commented Nov 9, 2024

There's currently no retry mechanism, but it seems like there certainly should be.

@etdr
Copy link
Author

etdr commented Nov 10, 2024

Ok so after cloning the repo and trying to fumble my way through Rust debugging for awhile I finally got the idea to try to clone a repo specifically from the AUR using git by itself, and it turned out that it was having an issue with a ~/.netrc file, deleting that made the problem go away. I did have to delete the ~/.cache/aura/packages directory again because it thought it had cloned a file but no big deal.

Someday I will be good at computers, man, maybe even good at Rust

@fosskers
Copy link
Owner

Thanks for the update, I'm glad you figured that out. In case this happens to someone else in the future, can you recall what specifically the problem with the .netrc file was?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants