You are not logged in.

#1 2022-08-04 12:29:53

yangbc
Member
Registered: 2022-08-04
Posts: 3

How to update a package from the repo it installed from?

I installed the package vim-youcompleteme-git from AUR, but the unofficial repo archlinuxcn also has the package. I use yay to update system, I think when the package needs update, where will it get updated from? For me, I want the package update from AUR because it install from AUR.

 
➜  ~ yay -Ss vim-youcompleteme-git
aur/vim-youcompleteme-git r2935.4237c464-1 (+165 1.07) (Installed: r2937.d35df613-1)
    A code-completion engine for Vim
archlinuxcn/vim-youcompleteme-git r2937.d35df613-2 (700.3 KiB 9.1 MiB) (Installed: r2937.d35df613-1)
    A code-completion engine for Vim

Now package from archlinuxcn is even newer, and i yay to update my system,  it says i need update the package from archlinuxcn. BUT i want to update it only from AUR.

Can pacman or other pacman wrapper track where the package install from and update only from it?
Or is it possible to ignore certain package from certain repo? (In this case is ignore vim-youcompleteme-git in archlinuxcn)

I think of this trick
https://wiki.archlinux.org/title/Arch_B … d_packages
I don't know if I ignore the package in pacman.conf, then run yay, will the package get updated from AUR?

Offline

#2 2022-08-04 12:38:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,305
Website

Re: How to update a package from the repo it installed from?

Why are you using archlinuxcn if you don't want prebuilt packages?  Pacman doesn't track where packages came from but will just check every enabled repo for updates to installed packages.

yangbc wrote:

I want the package update from AUR because it install from AUR.

What does this mean?  Is there a problem with the package in archlinuxcn?  What is the problem?

yangbc wrote:

Now package from archlinuxcn is even newer

No it isn't.  This is a VCS package, so everytime you build it from the AUR you get the most up-to-date version.  The moment you (re)build and install this package from the AUR the version from archlinux-cn will be the same or an older version.

yangbc wrote:

... and i yay to update my system,  it says i need update the package from archlinuxcn. BUT i want to update it only from AUR.

1) don't use yay.
2) Then update it from the AUR if that's what you want.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-08-04 13:04:01

yangbc
Member
Registered: 2022-08-04
Posts: 3

Re: How to update a package from the repo it installed from?

@Trilby thank you for your reply

Trilby wrote:

Why are you using archlinuxcn if you don't want prebuilt packages?  Pacman doesn't track where packages came from but will just check every enabled repo for updates to installed packages.

I haven't thought about it before, but now I think you are right, and I will throw away archlinuxcn soon.

Trilby wrote:

What does this mean?  Is there a problem with the package in archlinuxcn?  What is the problem?

I don't mean any fault with archlinuxcn, I just want to talk about the possibility of my idea.

Offline

#4 2022-08-04 13:45:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,305
Website

Re: How to update a package from the repo it installed from?

yangbc wrote:

I don't mean any fault with archlinuxcn, I just want to talk about the possibility of my idea.

But it's not clear what your "idea" is.  You enabled archlinuxcn presuambly because you wanted prebuilt AUR packages.   If there is nothing wrong with archlinuxcn's vim-youcompleteme-git package, then just use that as that's what you wanted.  Your seem to be searching for a solution to something while also saying there is nothing wrong.

If you wanted, you could change the name of vim-youcompleteme-git in the PKGBUILD and then install that and updates will no longer be pulled from archlinuxcn ... but again, if you don't want archlinuxcn packages, just remove it from your pacman.conf.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-08-04 13:56:00

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,277

Re: How to update a package from the repo it installed from?

You could setup a personal repo and put the packages you do not want to get from archlinuxcn into that repo. In your pacman.conf your personal repo needs to appear before the archlinuxcn repo. Or install with pacman -S <your-repo>/<packagename>.

Last edited by Stefan Husmann (2022-08-04 13:58:55)

Offline

#6 2022-08-04 15:03:17

yangbc
Member
Registered: 2022-08-04
Posts: 3

Re: How to update a package from the repo it installed from?

Trilby wrote:

But it's not clear what your "idea" is.  You enabled archlinuxcn presuambly because you wanted prebuilt AUR packages.   If there is nothing wrong with archlinuxcn's vim-youcompleteme-git package, then just use that as that's what you wanted.  Your seem to be searching for a solution to something while also saying there is nothing wrong.

My idea is  when I run yay, then vim-youcompleteme-git will be update from AUR instead of archlinuxcn. I just kind of curious about if this is possible, because it rational to me that package update from the repo it installed from.

I have abandoned archlinuxcn, for that generally AUR packages are newer than archlinuxcn.
And now for me there are only official repos and AUR, packages perfectly update from where they installed.

Stefan Husmann wrote:

You could setup a personal repo and put the packages you do not want to get from archlinuxcn into that repo. In your pacman.conf your personal repo needs to appear before the archlinuxcn repo. Or install with pacman -S <your-repo>/<packagename>.

Thanks, I have no knowledge of personal repo, but I will try it soon.

Offline

#7 2022-08-04 15:28:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,305
Website

Re: How to update a package from the repo it installed from?

yangbc wrote:

And now for me there are only official repos and AUR, packages perfectly update from where they installed.

That's by coincidence, not by design.  This will not be the case if an AUR package you use gets picked up into the main repos, or a repo package you use is dropped to the AUR.  Again, no data is tracked to indicate where a package was installed from (some indirect inference can be made from the "Packager" field, but not reliably nor trivially).

But even if you kept archlinuxcn enabled, you could still build and install the newer version of the package from the AUR.  There is absolutely nothing stopping you.  And once you do this, neither pacman nor yay would try to downgrade to the older version in archlinuxcn.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB