You are not logged in.

#1 2021-08-31 18:43:18

xmkx
Member
Registered: 2021-06-08
Posts: 19

Fuzzy search of pacman repository and/or AUR repository at terminal

I often have a hard time to find package name just because I don't remember all words in package. Is it possible to find it by fuzzy search?
I thought about to list all packages and filter it using  | fzf
How to do that?

Offline

#2 2021-08-31 19:06:34

obap74
Member
Registered: 2021-03-18
Posts: 80

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

Offline

#3 2021-08-31 19:18:31

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,414
Website

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

Don't use the last one, it does a partial upgrade whenever you "reload" (press Ctrl+R).

https://github.com/joehillen/paruz/blob … uz#L58-L61


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#4 2021-08-31 19:33:14

xmkx
Member
Registered: 2021-06-08
Posts: 19

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

Wow. Thanks guys.
fuzzy-pkg-finder works great.

Offline

#5 2021-09-02 15:58:01

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

@Alad

You'd think an Arch "Wiki Admin" would know how to use pacman.

-Syy

doesn't upgrade.

-Su

upgrades.

RTFM

$ man pacman
...
         -y, --refresh
             Download a fresh copy of the master package database from the
             server(s) defined in pacman.conf(5). This should typically be used
             each time you use --sysupgrade or -u. Passing two --refresh or -y
             flags will force a refresh of all package databases, even if they
             appear to be up-to-date.

https://github.com/joehillen/paruz/issu … -911829656

Last edited by joehillen (2021-09-02 15:59:55)

Offline

#6 2021-09-02 16:12:38

seth
Member
Registered: 2012-09-03
Posts: 52,276

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

Yes he does and "-Syy" is not only retarded because of the second "y" which allows downgrade syncs and must never be used unconditionally and w/o explicit cause because it can invalidate your database, but it also syncs the database and thus any subsequent "pacman -S foo" will cause a partial upgrade.

It's the single biggest cause for partial upgrades to occur and, if implictly and silently caused by a script, borderline malign.

Offline

#7 2021-09-02 16:18:28

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

I assure you there is no malice. I knew that `-Syy` was not recommended because it overloads the repo servers. I didn't know about the downgrade issue. I'll change it to `-Sy`.

Offline

#8 2021-09-02 16:19:38

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

@seth

retarded

Is name-calling really necessary?

Offline

#9 2021-09-02 16:34:30

seth
Member
Registered: 2012-09-03
Posts: 52,276

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

I didn't call anybody ("you") names but qualified a parameter ("-Syy", rest assured, you're not the first or only source of that - the internet is full w/ this BS advice)
Also you could have gotten a less blunt comment but for your own post.

More importantly however, moving from -Syy to -Sy doesn't heal the fact that every subsequent package installation will be tainted. You want to use a secondary database.

Offline

#10 2021-09-02 16:41:48

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,414
Website

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

You'd think an Arch "Wiki Admin" would know how to use pacman.

The irony of calling someone out for not knowing pacman, when you're unaware of the danger of partial upgrades after 6 years (edit: 8!) of using Arch, must be lost on you. There's been plenty of cases where people doing this ended up with a hosed system, e.g. on openssl/pacman upgrades.

https://wiki.archlinux.org/title/System … nsupported

Look at what checkupdates does instead.

Last edited by Alad (2021-09-02 16:44:17)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#11 2021-09-02 16:42:12

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

seth wrote:

More importantly however, moving from -Syy to -Sy doesn't heal the fact that every subsequent package installation will be tainted. You want to use a secondary database.

How does one use a secondary database? Is that a common practice? I regularly do `-Sys`, so why not here?

I feel like your fear of `-Syy` is disproportionate to the risk. 8 years of Arch and I've never hit this problem even though I used `-Syy` for every upgrade for the first 4 (because everyone said to do that).

At any rate, I feel like these issues should be pointed out in the manpage rather than documented in forum posts.

Offline

#12 2021-09-02 16:48:23

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

Ok, I now see the confusion. paruz doesn't run `paru -Syy pkgname` it just runs `paru -Syy` (which is not a partial upgrade) and then reruns `paru -Ss pkgname`. This is exactly what is recommended (expect for the -Syy part, obviously)

Offline

#13 2021-09-02 16:50:24

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

And why isn't this in the manpage as well? Should `man pacman` just be a link the wiki?

Offline

#14 2021-09-02 17:19:02

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,414
Website

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

The problem with pacman -Sy(y) is exactly the same, because the user could run pacman -S pkgname afterwards. In this case, likely without knowing something in the background ran pacman -Sy.

And why isn't this in the manpage as well? Should `man pacman` just be a link the wiki?

Pacman supports versioned dependencies, but Arch doesn't include them for most of its packages. Therefore no partial upgrades is an Arch policy, not a pacman one.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#15 2021-09-02 17:20:05

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

Running Arch without consulting the wiki is unsupported?

I think pacman supports partial upgrades, but Arch doesn't. Arch doesn't have a man page (anymore?) and the policy is to ship vanilla packages, so the pacman man page doesn't get patched for Arch packaging policy. Systemd man pages also don't discuss the way Arch uses systemd, just the various possible ways to use it.

joehillen wrote:

Ok, I now see the confusion. paruz doesn't run `paru -Syy pkgname` it just runs `paru -Syy` (which is not a partial upgrade) and then reruns `paru -Ss pkgname`. This is exactly what is recommended (expect for the -Syy part, obviously)

What confusion? Saying "it's exactly what's recommended, except it's not" seems confusing to me.

Offline

#16 2021-09-02 17:35:35

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

@Alad Ok, so `-Sy` should only ever be run with `-u`, correct?

@Alad What I really want is to refresh the package list without leaving paruz, if for example there is a package missing that you think should be there. Is there no way to do that?

Therefore no partial upgrades is an Arch policy, not a pacman one.

It doesn't hurt to inform users of best practices. It's not like there is some other distro that uses pacman yet recommends partial upgrades.

Offline

#17 2021-09-02 17:38:47

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

@Raynman

What confusion? Saying "it's exactly what's recommended, except it's not" seems confusing to me.

I meant `-Syy` is not recommended, and `-Sy` is.

Offline

#18 2021-09-02 17:59:15

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

Wow, I completely misread this. https://wiki.archlinux.org/title/System … nsupported Sorry, everybody. This is what I get for having this conversation while in a meeting.

Alright, it's a pointless feature anyway. I'll just remove it.

@Alad I'd like to change the formatting to make it a little more clear. Is there a way to propose changes to the wiki page without actually making the change?

Offline

#19 2021-09-02 19:03:26

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,414
Website

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

@Alad I'd like to change the formatting to make it a little more clear. Is there a way to propose changes to the wiki page without actually making the change?

Yes, you can use the discussion page:

https://wiki.archlinux.org/title/Talk:S … aintenance


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#20 2021-09-02 19:06:39

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

Thanks. Kynikos's draft looks a lot like what I was going to suggest. I'm just going to submit and someone can reject it if they don't like it.

Offline

#21 2021-09-02 21:55:38

joehillen
Member
Registered: 2015-01-08
Posts: 20

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

I've removed `Ctrl-r`. https://github.com/joehillen/paruz/comm … 19409050de

Thank you everyone for you help. I learned a lot today.

Offline

#22 2021-09-02 23:04:56

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Fuzzy search of pacman repository and/or AUR repository at terminal

joehillen wrote:

And why isn't this in the manpage as well? Should `man pacman` just be a link the wiki?

Because pacman isn't only used on Arch or Arch-based systems. There are distros that use pacman where the partial upgrade issue doesn't exist because of the different configuration that they use for their repositories.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB