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

Lack of important features #25

Closed
polygamma opened this issue Mar 8, 2018 · 53 comments

Comments

Projects
None yet
8 participants
@polygamma
Copy link
Owner

commented Mar 8, 2018

I am currently quite satisfied with aurman's development status, I can't think of any important missing features.

Can anyone else think of something I haven't thought of that really should be supported?

@rmarquis

This comment has been minimized.

Copy link

commented Mar 8, 2018

Powerful search. Cower/auracle regex feature is currently unequaled, and this is the single reason I can't do without these.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 8, 2018

I bet that's not too hard to implement with python, since it's python ;)
Thanks! I think I would not use that, but since people are actually using regex and pacman itself is supporting regex, aurman should support that, too. So: Going to implement!

@rmarquis

This comment has been minimized.

Copy link

commented Mar 8, 2018

Yes, python is just the right tool for this feature.

Also, take note that the AUR has a limitation of minimum 2 characters when sending request, so you'll need to take this into account (see cower code).

I think I would not use that

I'm a weird guy. I heavily dislike the popular yaourt-like search list feature that many helpers seem to implement, and a high percentage of my search involve regex. I might actually not be the right person to ask feature requests :)

@ChuckDaniels87

This comment has been minimized.

Copy link

commented Mar 8, 2018

Just two come to my mind right now:

  • ZSH Completion. 😃
  • aurman cache clean-up using a command-line argument. (maybe two non-installed aur packages and full clean-up)

Great work @polygamma!

polygamma added a commit that referenced this issue Mar 8, 2018

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 8, 2018

See: 2991666...0a1dfe8

Let me know if it works as expected, since you are the regexer, @rmarquis ;)

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 8, 2018

@ChuckDaniels87, I have looked into zsh completion, but that seems like hardcoding very much stuff... e.g. pacaur zsh completion is about ~600 lines of code. Compare that to my nice python bash-completion...

Maybe there is a nicer way of doing it, but currently I am unaware of it. I am going to look into it, for sure, but currently it's very disappointing to think about implementing that.

Edit: I am going to implement -c and --clean.

@ChuckDaniels87

This comment has been minimized.

Copy link

commented Mar 8, 2018

I will take a look to ZSH completion but I can't promise anything. 😉

polygamma added a commit that referenced this issue Mar 8, 2018

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 8, 2018

@ChuckDaniels87

This comment has been minimized.

Copy link

commented Mar 9, 2018

aurman -Sc --aur removed everything in $HOME/.cache/aurman, even currently installed packages.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

Cannot reproduce, works as expected here.

Edit: Have you been asked the following question: "Do you want to remove all uninstalled clones from cache?"?

Edit Edit: May it be that you also have answered the second questions with "yes" and hence you are wondering why the .pkg.tar files are gone, too?

Edit Edit Edit: 1b1d3f8

@AladW

This comment has been minimized.

Copy link

commented Mar 9, 2018

and a high percentage of my search involve regex.

I guess you mean regex for name-desc? Regex support for name searches is trivial since you can just use packages.gz.

polygamma added a commit that referenced this issue Mar 9, 2018

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

@ChuckDaniels87 was able to reproduce it: 915ccdc

@craftyguy

This comment has been minimized.

Copy link

commented Mar 9, 2018

I would like an option to always show the PKGBUILD for a package and not prompt. Or, at the very least, change the prompt to default to 'yes' and not 'no'. Reviewing PKGBUILDs is absolutely necessary, IMHO, since anyone can upload anything to AUR, and it's not a good idea to make it harder for folks to do that by making them perform an additional step.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

So something like --edit as opposite of --noedit ?

@craftyguy

This comment has been minimized.

Copy link

commented Mar 9, 2018

Yea that would work for me, since I can just alias aurman=aurman --edit

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

Okay, I see your point. I am going to implement that, but one more question: Just showing the differences by default, or also open the editor to edit the file afterwards?

@craftyguy

This comment has been minimized.

Copy link

commented Mar 9, 2018

If just showing differences by default, then an option called --edit doesn't make much sense.

What would you think about changing the default behavior of aurman to always show differences (unless --noedit), then prompt after showing the differences to edit.

This would not require the addition of a new command, but you could add an --edit that opens the PKGBUILD in the editor instead of showing the differences (I don't feel strongly about having this though).

Basically, I don't want to go through extra steps to see PKGBUILD diffs (or in the case of a new install, to see the full PKGBUILD + .install files) when updating apps from AUR since it makes it too easy to ignore potentially scary stuff in PKGBUILDs 😄

polygamma added a commit that referenced this issue Mar 9, 2018

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

See: 2816197

I called the new flag --show_changes instead of --edit, since that is what it does.
You will be shown the changes without being asked, that's it.

@craftyguy

This comment has been minimized.

Copy link

commented Mar 9, 2018

Just tested and it works great. Thanks!

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

You're very welcome :)

@AladW

This comment has been minimized.

Copy link

commented Mar 9, 2018

What if some other relevant file changes that's not the PKGBUILD or .install (e.g. a .patch file)?

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

Then that changes are being shown

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2018

Sorry, I read that wrong. That will not be shown, as it was not shown before.
How would one even differentiate between files worth being shown and files not worth being shown?

@AladW

This comment has been minimized.

Copy link

commented Mar 10, 2018

If it's included in the AUR repository it should be worth being shown, apart from SRCINFO perhaps which has no effect on anything client side.

Additional prompts for different files when you already have 3 million is really annoying though. Ideally you could show all files in a single window + header à la git show but for every object in the repository. I'm sure git has some native way to do this...

That's assuming you don't care about user modifications to PKGBUILDs et al. (not sure why you would in an automated approach)

@craftyguy

This comment has been minimized.

Copy link

commented Mar 10, 2018

Could you omit .SRCINFO? That has no impact on the client side and showing it just creates noise.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 10, 2018

@craftyguy : cdb3023 - I removed the file from git diff

Edit: The following notice was meant for @AladW, regarding the number of prompts being shown to edit files

I think the current behavior with the question "Do you want to edit any of those files?" in the beginning is fine

@craftyguy

This comment has been minimized.

Copy link

commented Mar 10, 2018

well, not really. if I run this with the shiny new --show_changes you added, then I would see the .SRCINFO (which, again, is useless to display to users).

I haven't tried it yet so maybe I am misunderstanding if that is not the case.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 10, 2018

The commit I quoted in my last message, excludes the .SRCINFO from the git diff.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 10, 2018

Since this blew up quite a bit:

@rmarquis - regarding the regex search, have you tried it? And if so, working as expected?
@ChuckDaniels87 - has the bug with the deletion of folders of still installed packages during aurman -Sc --aur been fixed for you?

@ChuckDaniels87

This comment has been minimized.

Copy link

commented Mar 10, 2018

@polygamma aurman -Sc --aur is working as expected now. Thanks!

@AladW

This comment has been minimized.

Copy link

commented Mar 10, 2018

So do I get it right that besides three prompts for each package, when confirming to "any" you get... a prompt for every file? o_O

Besides the imo rather excessive amount of prompts, this also means you have no state during editing, i.e. you can't go back to previously edited files if you forgot something. Any modern console editor should support buffers and editing of multiple files in a single session, at least.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 10, 2018

Well, how would you do it then? I, personally, am not a fan of doing that via console. If I see a PKGBUILD or whatever, which I want to change, I CTRL+C, edit those files and start again, hence I do not really care about that...

@AladW

This comment has been minimized.

Copy link

commented Mar 10, 2018

So say you have ros-lunar-desktop (I don't think I'm being unfair with such extreme examples since they are explicitely supported by aurman) and you want to change PKGBUILD 249 of 250, you bail out, edit, then restart with --noedit or go through 249*3 (747!) prompts again? IDK.

Note that I don't insist on you using some different mechanism, I just try to find the appeal behind all this promptage, especially with how poorly it scales. I use vifm, though that has other drawbacks such as it being literally the only file manager that is suitable for these purposes.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 10, 2018

Well, that is actually not a problem, since directly after answering "yes" to the question "are you fine with using .. ?" that is being saved. hence finding a problem in 249/250 is great, aurman would only show 249 and 250 again

@AladW

This comment has been minimized.

Copy link

commented Mar 10, 2018

Hm, I see. So it saves it to some configuration file (is that documented somewhere?). Even then, you still have the initial 700+ prompts but I guess it's better than redoing them all the time.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 10, 2018

For every package the SHA1 hash of the last seen and approved commit is being saved. see: https://github.com/polygamma/aurman/blob/master/src/aurman/classes.py#L889

And the fetching of the files: https://github.com/polygamma/aurman/blob/master/src/aurman/classes.py#L814

polygamma added a commit that referenced this issue Mar 11, 2018

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 11, 2018

@AladW - see: 5d625e8

You may choose by yourself, which files you want to edit. Hence you are able to edit files twice etc.

@rmarquis

This comment has been minimized.

Copy link

commented Mar 12, 2018

@polygamma Sorry, I haven't had time to have a closer look yet.

@leosanvieira

This comment has been minimized.

Copy link

commented Mar 12, 2018

After reading the docs, i'm still not sure how i'm supposed to check updates for aur packages, i used to issue pacaur -Qqum --devel --needed with pacaur, did i miss something or is it not implemented yet?

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 12, 2018

All pacman operations are supported, but calling aurman with an operation besides --sync or -S will just pass the arguments to pacman.

So: aurman does not support --devel and --needed for -Q, and tbh I do not really see a reason for supporting that. What is wrong with aurman -Su --aur --devel --needed ? It will show the packages to be updated, you can just exit with entering n if you do not want to install those.

@leosanvieira

This comment has been minimized.

Copy link

commented Mar 12, 2018

Nothing wrong with aurman -Su --aur --devel --needed, my question is a just a matter of workflow as i use an extension that checks updates from time to time from both, official repos and aur, and lists the updates available. Pacaur has -Qqum and aurutils has aurcheck, both together with checkupdates achieve that , that's why i asked. After reading your answer, i understand you're not interested in this workflow and that's ok as this is your tool, after all.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 12, 2018

@leosanvieira You may use aurmansolver for your purpose. see: aurman as dep solver

you would simply call aurmansolver -Su --devel --aur --needed
but update aurman to the latest version first, since I included --devel a few minutes ago.

when using --devel with the solver, it will not fetch new pkgbuilds, and thus only use what`s already in the cache folder of aurman, but that is exactly what you want, i guess?

the output of the solver is json, as being described in the wiki. you may just strip the info you do not need and hence put the output in a form you want it to be.

Edit: You may just use aurmansolver -Su --devel --needed, hence you get all packages which require updating with one query. You could just filter by the type_of field of the packages to differentiate between repo and aur packages.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 13, 2018

I am closing this issue since it really blew up and discusses many things at the same time. The features being discussed here, are fine right now. For new requests, just open a new issue.

@polygamma polygamma closed this Mar 13, 2018

@AladW

This comment has been minimized.

Copy link

commented Mar 13, 2018

Thanks, #25 (comment) is definitely an improvement.

@ChuckDaniels87

This comment has been minimized.

Copy link

commented Mar 17, 2018

Uhm, I've taken a look at Bash and ZSH completion. However, aurman Bash completion is not working on my system for some reason. What is it supposed to complete? I've tried the following commands and returns nothing:

aurman -<TAB>
aurman -S<TAB>
aurman -Ss <TAB>
aurman -Q<TAB>

Not sure if it is a problem with my system or with completion file.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Mar 17, 2018

Dumb question: Have you bash-completion installed on your system? e.g.

[jonny@jonny-arch-pc ~]$ aurman -<TAB>
-D          --files     -Q          --remove    -U          --version
--database  -h          --query     -S          --upgrade   
-F          --help      -R          --sync      -V
@ChuckDaniels87

This comment has been minimized.

Copy link

commented Mar 17, 2018

I deleted that package in the past for some stupid reason that I can't recall right now. I'll try to make Zsh completion based on bash completion, and sorry for the noise!

@MadFatVlad

This comment has been minimized.

Copy link

commented Apr 25, 2018

Hello! I too have a problem with bash completion
It is installed in my system

[vlad@ArchVM ~]$ pacman -Q bash-completion
bash-completion 2.8-1

But when i try

[vlad@ArchVM ~]$ aurman -<TAB>

I get

[vlad@ArchVM ~]$ aurman -2018-04-25 22:12:55,743 - parse_args - parse_pacman_args - ERROR -  is too short
2018-04-25 22:12:56,164 - parse_args - parse_pacman_args - ERROR -  is too short

I also can't autocomplete package names

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Apr 26, 2018

This is not the right place for your issue, I wont be answering here

@iboyperson

This comment has been minimized.

Copy link

commented Jun 24, 2018

A nice feature would be displaying of aur packages installed that have been flagged as out of date. This is not a super important feature but none the less it would be great to have.

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Jun 24, 2018

that feature is already implemented for "-Ss"

@polygamma

This comment has been minimized.

Copy link
Owner Author

commented Jun 24, 2018

also please stop using this issue for feature requests. it is closed for a reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.