FS#26265 - [devtools] add support for multiple -I flags to archbuild
Attached to Project:
Arch Linux
Opened by Thomas Dziedzic (tomd123) - Wednesday, 05 October 2011, 04:38 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 02 November 2013, 22:05 GMT
Opened by Thomas Dziedzic (tomd123) - Wednesday, 05 October 2011, 04:38 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 02 November 2013, 22:05 GMT
|
Details
This patch adds a -I flag which does the same thing as
makechrootpkg's -I flag.
It supports multiple -I flags so that you can install multiple packages. I have tested this patch and it does work for installing multiple packages at once. I have been wanting this flag for a long time, and finally decided to implement it last night. I hope you find this as useful as I have. Special thanks to falconindy for making it purty. |
This task depends upon
Closed by Pierre Schmitz (Pierre)
Saturday, 02 November 2013, 22:05 GMT
Reason for closing: Implemented
Saturday, 02 November 2013, 22:05 GMT
Reason for closing: Implemented
Some comments on your patch:
* I'd rather prefer patching makechrootpkg to accept more than one package first and adding this feature in a separate patch. Having to invoke makechrootpkg a couple of times is a bad idea and bad style.
* Please use `git format-patch` to create patches with meaningful commit messages and author information. Also, arch-dev-projects might be a good (better?) place for such a patch.
Yay :)
"Some comments on your patch:
* I'd rather prefer patching makechrootpkg to accept more than one package first and adding this feature in a separate patch. Having to invoke makechrootpkg a couple of times is a bad idea and bad style."
Agreed.
Patch to makechrootpkg to add multiple -I flag support attached.
Also attached the patch to archbuild to add multiple -I flag support which takes into account the patch to makechrootpkg.
"* Please use `git format-patch` to create patches with meaningful commit messages and author information. Also, arch-dev-projects might be a good (better?) place for such a patch."
Attached the proper patches using git format-patch. I like posting these feature requests since they aren't as easily forgotten about imho. I've posted a couple of other patches to devtools the same way in the past and I haven't gotten called out on it.
0002-add-multiple-I-flag-supp... (1.4 KiB)
* Use double brackets ("[["/"]]") instead of the "[" builtin. We use these almost everywhere in devtools - makechrootpkg is one of the scripts that doesn't. heftig has a patch for this in his working branch iirc. You might need to rebase your patch on that, also.
* Use "${foo##*/}" instead of invoking basename(1).
* 'IFS=" " mkarchroot -r "pacman -U ${pkgnames[*]} --noconfirm" "$copydir"' might break if any of the package file names contain a whitespace. We will probably need to patch mkarchroot in order to being able to fix that.
Couldn't have possibly known this especially since his branch is on github.
If I rebase it, it will mean that I will have to wait for his changes to get merged.
If that's what you want, then I will just wait until his patches get pulled into devtools since they might not be final.
"* Use "${foo##*/}" instead of invoking basename(1)."
Again, I was just sticking to what was there originally and I do find that using basename is a lot easier to read and figure out what it's doing imo.
I will switch it like you suggested.
* 'IFS=" " mkarchroot -r "pacman -U ${pkgnames[*]} --noconfirm" "$copydir"' might break if any of the package file names contain a whitespace. We will probably need to patch mkarchroot in order to being able to fix that."
Why not just include quotes around each of the pkgnames?
pkgnames=("'pkgname1'" "'pkgname2'")
Can we please make a decision?
I still find it beneficial to have this patch.
But I would like to have a decision made within a reasonable amount of time.