[aur-general] TU application_R: Metal A-wing (a-wing)

David Runge dave at sleepmap.de
Tue Jan 22 11:30:20 UTC 2019


On 2019-01-22 17:09:35 (+0800), Metal A-wing wrote:
> On Tue Jan 8 20:19:43 UTC 2019, David Runge wrote:
> > * pkgname: avoid composition
> What should I do?
It's more readable and less error-prone to do `pkgname=name` instead of
`pkgname="name${something_else}"`.

> Why is use
> `$(gem env gemdir)`
> 
> Instead of
> 
> `$(ruby -e'puts Gem.default_dir')`
It's shorter and you don't have to spawn a ruby process to print
something, if you can use the gem command directly.

> >  LICENSE.md can be installed using 'install -t'
> 
> Why is use
> `install -t`
The upside is, that you can ommit the specific destination (unless you
want to rename the destination file).
e.g. `install -vDm 644 LICENSE -t
"${pkgdir}/usr/share/licenses/${pkgname}/"` creates the directory
"${pkgdir}/usr/share/licenses/${pkgname}/" for you, if it doesn't exist
and will install the source file to that directory, without you having
to specifically name the destination file.

Whereas the following requires you to specify the destination file as
well: `install -vDm 644 LICENSE
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

Not using the `-t` flag is only useful, if you need to rename the
destination file, e.g.:

`install -vDm 644 WEIRDNAME_FOR_A_LICENSE
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

In short: This is shorter and implies the creation of the destination
directory.

Closing: Please use a mail client, that doesn't break threads (i.e.
replies to the thread that was initially created, instead of creating a
new one.
Mailman is somewhat able to order these threads in the list archive, but
in mail clients this is horrible to follow up on (there are now 4
separate threads [1] [2] [3] [4]). Compare the 'In-Reply-To' header in
the messages with those of others.

Aside from that, happy packaging! :)
David

[1] https://lists.archlinux.org/pipermail/aur-general/2018-December/034744.html
[2] https://lists.archlinux.org/pipermail/aur-general/2018-December/034758.html
[3] https://lists.archlinux.org/pipermail/aur-general/2019-January/034799.html
[4] https://lists.archlinux.org/pipermail/aur-general/2019-January/034848.html

-- 
https://sleepmap.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20190122/48d92533/attachment.asc>


More information about the aur-general mailing list