Skip to content

Conversation

@darukutsu
Copy link

@darukutsu darukutsu commented Nov 21, 2025

Checklist

  • Admin:
    • No duplicate PRs
  • Integration:
    • Always add unit tests for fixes or new functionality
    • If adding new options, update dist/completion/*
  • Documentation:
    • If adding new options, update usage and doc/*.ronn
    • If adding new strings, update locale/*.po

Description

If you don't store all tarballs in your ~/.cache/yay (like me, store only last 2) or if you use other aur-manager you could instead use vcs to switch to desired branch and rebuild chosen version. Hopefully everything works as should, tested only for yay.

@darukutsu
Copy link
Author

darukutsu commented Nov 22, 2025

Added some tests, however i don't understand yet how syntax works, so will edit them when I figure out.

Copy link
Member

@pbrisbin pbrisbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good. Sorry, I should've warned you not to worry about the existing shfmt / shellcheck stuff.

@darukutsu
Copy link
Author

darukutsu commented Dec 30, 2025

I realized that makepkg -fs outputs correct pkg name so no more need to rename and rename back to use gitpkg... now its literally placeholder for build_pkg() to determine whether it should be build. File with gitpkg never exists. So only what we need to alter is to_install array and I come up with safe solution. That previous renaming using -ctime wasn't imo very good solution.

see

593: printf "%s\0" "$item" >> new_to_install.downgrade

613: mapfile -d '' to_install < new_to_install.downgrade
614: rm new_to_install.downgrade

Here's simple command how to try build something from aur

 $ downgrade --git --pacman-cache ~/.cache/yay --maxdepth 2 'ani-cli>4.7' bash

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

Successfully merging this pull request may close these issues.

2 participants