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

Sort variables by official recommended order and ignore variables defined in function #20

Open
lahwaacz opened this issue Jul 8, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@lahwaacz
Copy link

lahwaacz commented Jul 8, 2024

I'm getting the following on the doxygen PKGBUILD:

E   1 # Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>     ■ Split PKGBUILD needs additional makedepends ['libfmt.so', 'libspdlog.so', 'libsqlite3.so'] to work properly
    2 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
    3 # Contributor: Dan McGee <[email protected]>
    4
    5 pkgbase=doxygen
    6 pkgname=(doxygen doxygen-docs)
W   7 pkgver=1.11.0     ■ pkgver: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
W   8 pkgrel=4     ■ pkgrel: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
W   9 pkgdesc='Documentation system for C++, C, Java, IDL and PHP'     ■ pkgdesc: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
W  10 url='http://www.doxygen.nl'     ■ url: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
   11 arch=(x86_64)
...
  103 package_doxygen-docs() {
W 104   pkgdesc='Developer documentation for doxygen'     ■ pkgdesc: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
  105
  106   mv -v $pkgname/* "$pkgdir"
  107   install -vDm 644 $pkgbase-Release_${pkgver//./_}/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  108 }
  109
  110 # vim: ts=2 sw=2 et:

Why does it warn about unsorted pkgver, pkgrel, pkgdesc and url? Also note that a pkgdesc defined in the package_doxygen-docs function is fine too.

@Freed-Wu
Copy link
Collaborator

Freed-Wu commented Jul 9, 2024

warn about unsorted

Refer #19 (comment)

pkgdesc defined in the package_doxygen-docs function is fine too.

Should be an unexpected behaviour.

@Freed-Wu Freed-Wu added the bug Something isn't working label Jul 9, 2024
@lahwaacz
Copy link
Author

lahwaacz commented Jul 9, 2024

Refer #19 (comment)

But here the order pkgname, pkgver, pkgrel is correct, only they are placed after pkgbase.

@Freed-Wu
Copy link
Collaborator

Freed-Wu commented Jul 9, 2024

I see, the order comes from man 5 PKGBUILD, in the man, pkgbase is placed after them. 😢

@lahwaacz
Copy link
Author

lahwaacz commented Jul 9, 2024

That is because split packages are not that common, so pkgbase is explained near the end of the manual page. But it does not suggest that pkgbase should be at the bottom - typically it is either right before or right after pkgname. See PKGBUILD-split.proto or some PKGBUILDs of official Arch packages.

@Freed-Wu
Copy link
Collaborator

Freed-Wu commented Jul 9, 2024

So the order should be adapted to the official recommended order. Except man, is there any good official information about it?

@lahwaacz
Copy link
Author

lahwaacz commented Jul 9, 2024

I guess only the PKGBUILD-split.proto file or making a sample from the official Arch packages...

@Freed-Wu Freed-Wu changed the title False positive warnings on split packages? Sort variable order by official recommended order and ignore theses variables defined in function Nov 7, 2024
@Freed-Wu Freed-Wu changed the title Sort variable order by official recommended order and ignore theses variables defined in function Sort variables by official recommended order and ignore theses variables defined in function Nov 7, 2024
@Freed-Wu Freed-Wu changed the title Sort variables by official recommended order and ignore theses variables defined in function Sort variables by official recommended order and ignore variables defined in function Nov 7, 2024
@Freed-Wu Freed-Wu added enhancement New feature or request and removed bug Something isn't working labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants