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

aur sync to just rebuild a package? #423

Closed
je-vv opened this issue Jun 19, 2018 · 5 comments
Closed

aur sync to just rebuild a package? #423

je-vv opened this issue Jun 19, 2018 · 5 comments
Labels

Comments

@je-vv
Copy link

je-vv commented Jun 19, 2018

Hi,

At times I just need to rebuild a package, although there's no new AUR new version for it. For example, grive started to complain about "libjson-c.so.3" not being there, but that's because now "libjson-c.so.4" is there, same thing with it's other dependency on libboost...

I've used "-f" on "aur sync", but that still ignores rebuilding and adding to the repo DB the same package.

There are many manual ways to solve the issue. One is to remove the package with "pacman -R", so that there are no posterior problems with same versions but different contents on the installed DB, then removing the package from the aurutils repo DB (repo-remove), then remove the package itself from the repo (as well as its signature), and build the package again with "aur sync", so it gets into the aur utils repo, and then install it back through pacman...

Wondering if there's something missing for such cases, or if I'm the one missing something when there's something already available...

@rafasc
Copy link
Collaborator

rafasc commented Jun 19, 2018

Can't you just rebuild it with: aur sync --no-ver-shallow -f grive. and reinstall it?

@terencode
Copy link
Contributor

terencode commented Jun 19, 2018

@je-vv what about making aur rebuild user 'script' ? You can just make it execute what @rafasc suggested.

@je-vv
Copy link
Author

je-vv commented Jun 19, 2018

well, @rafasc was right, it works in a 2 steps process, but pretty easy. 1st, re-build, and include new package into aurutils repo, and 2nd, install with pacman... might create a 3rd party script, as suggested by @terencode , or live with those 2 steps...

This can be closed then, though in my mind "aur sync" might take care of that in one step (it does the rebuild and repo inclusion, it just misses the install).

Thanks !

@terencode
Copy link
Contributor

terencode commented Jun 19, 2018

@je-vv I just made this:

#!/usr/bin/env bash

pkg="$1";

pkg_dir=`find $HOME/.cache/aurutils/sync/ -maxdepth 1 -name "$pkg"`;

if [ -d "$pkg_dir" ]
then
    cd "$pkg_dir";
    aur build -fR -d "aur";
    sudo pacman -S "$pkg";
else
   echo "Error: no already built package found!";
fi

save it under aur-rebuild somewhere in one of your $PATH directories and chmod +x it, then try "aur rebuild grive"

@AladW
Copy link
Member

AladW commented Jun 20, 2018

aur build -f as suggested by @terencode is the way I recommend too (I didn't even think of using -R). I don't really want any pacman -S commands in aur-sync or elsewhere though - if I add it for rebuilding packages, people will ask to add it for installing newly built packages too.

@AladW AladW closed this as completed Jun 20, 2018
@AladW AladW added the question label Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants