[pacman-dev] updpkgsums deletes more variables than it should
Hi all. It seems to me that updpkgsums destroys variables that it should not, specifically those with a suffix, e.g. "md5sums_extra". This is the regex in question: /^[[:blank:]]*(md|sha)[[:digit:]]+sums(_[^=]+)?=/,/\)[[:blank:]]*(#.*)?$/ I couldn't find anything that would suggest that such variable names are reserved for pacman. -- David Macek
On 02/03/15 at 02:27pm, David Macek wrote:
Hi all.
It seems to me that updpkgsums destroys variables that it should not, specifically those with a suffix, e.g. "md5sums_extra".
This is the regex in question: /^[[:blank:]]*(md|sha)[[:digit:]]+sums(_[^=]+)?=/,/\)[[:blank:]]*(#.*)?$/
I couldn't find anything that would suggest that such variable names are reserved for pacman.
man PKGBUILD: Additional architecture-specific sources can be added by appending an underscore and the architecture name e.g., source_x86_64=(). There must be a corresponding integrity array with checksums, e.g. md5sums_x86_64=(). md5sums_extra looks like an architecture-specific checksum to makepkg/updpkgsums. apg
On 3. 2. 2015 15:48, Andrew Gregory wrote:
md5sums_extra looks like an architecture-specific checksum to makepkg/updpkgsums.
Thank you. Are all suffixes reserved for future use, or is it conceivable to modify the regex to use "(any|x86_64|i686)" instead of "[^=]+"? I already changed the name of my variable, but I'm interested in the answer anyway. -- David Macek
On Tue, Feb 3, 2015 at 8:59 AM, David Macek <david.macek.0@gmail.com> wrote:
On 3. 2. 2015 15:48, Andrew Gregory wrote:
md5sums_extra looks like an architecture-specific checksum to makepkg/updpkgsums.
Thank you.
Are all suffixes reserved for future use, or is it conceivable to modify the regex to use "(any|x86_64|i686)" instead of "[^=]+"? I already changed the name of my variable, but I'm interested in the answer anyway.
"all" is probably a heavy word here, but we can't just use that x86-specific triplet. arm, ppc, armv7, etc. are all in use in other places, and that is probably leaving some out. -Dan
On 04/02/15 01:04, Dan McGee wrote:
On Tue, Feb 3, 2015 at 8:59 AM, David Macek <david.macek.0@gmail.com> wrote:
On 3. 2. 2015 15:48, Andrew Gregory wrote:
md5sums_extra looks like an architecture-specific checksum to makepkg/updpkgsums.
Thank you.
Are all suffixes reserved for future use, or is it conceivable to modify the regex to use "(any|x86_64|i686)" instead of "[^=]+"? I already changed the name of my variable, but I'm interested in the answer anyway.
"all" is probably a heavy word here, but we can't just use that x86-specific triplet. arm, ppc, armv7, etc. are all in use in other places, and that is probably leaving some out.
I sure we document that variables in PKGBUILDs should start with an underscore... and we do! man PKGBUILD: If you need to create any custom variables for use in your build process, it is recommended to prefix their name with an _ (underscore). This will prevent any possible name clashes with internal makepkg variables. For example, to store the base kernel version in a variable, use something similar to $_basekernver.
participants (4)
-
Allan McRae
-
Andrew Gregory
-
Dan McGee
-
David Macek