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

Minor bug fix: on requesting uninstall permission, print each package on a new line #44

Open
robinpaulson opened this issue Jun 25, 2020 · 2 comments

Comments

@robinpaulson
Copy link
Contributor

Currently when i use the "umk -u" option, i'm asked if i want to uninstall a series of packages, listed as below:

linux-headers-5.7.5-050705:amd64 linux-headers-5.7.5-050705:all linux-headers-5.7.5-050705-generic:amd64 linux-headers-5.7.5-050705-generic:all linux-image-5.7.5-050705-generic:amd64 linux-image-unsigned-5.7.5-050705-generic:amd64 linux-modules-5.7.5-050705-generic:amd64

This is not so easy to read, it would be much easier to do so if each package were printed on a new line, like so:
linux-headers-5.7.5-050705:amd64
linux-headers-5.7.5-050705:all
linux-headers-5.7.5-050705-generic:amd64
linux-headers-5.7.5-050705-generic:all
linux-image-5.7.5-050705-generic:amd64
linux-image-unsigned-5.7.5-050705-generic:amd64
linux-modules-5.7.5-050705-generic:amd64

Thanks

@robinpaulson
Copy link
Contributor Author

As an aside, only four of those seven packages are installed. Why does it list the others?

@robinpaulson
Copy link
Contributor Author

I took a look through the script, plus did some Bash learning. From what I gather, when using the "$@" parameter, setting "IFS" to a character will separate the instances of the list (the packages to be uninstalled) with that character. In the script, you set "IFS" to "$'\n'" on line 799, which should thus split the list of packages to be installed, using the newline character. But it doesn't and I'm not sure why.

I think it's related to the form of the "cut" command on line 802, using " " as a delimiter may be removing the newline character

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants