Hello Guillem, On Sat, Oct 08, 2022 at 07:38:21PM +0200, Guillem Jover wrote: > On Sat, 2022-10-08 at 19:05:01 +0200, Helge Kreutzmann wrote: > > On Sat, Oct 08, 2022 at 06:42:46PM +0200, Guillem Jover wrote: > > > This means that the code will try the following combinations, after > > > having remapped the non-alphanum chars: > > > > > > lower-cased: aA-bB%Some OS → aa-bb-some-os > > > as-is: aA-bB%Some OS → aA-bB-Some-OS > > > lower-cased and capitalized: aA-bB%Some OS → Aa-bb-some-os > > > capitalized: aA-bB%Some OS → AA-bB-Some-OS > > > > Ok, so I understand the 2nd sentence as follows (I write it verbose): > > Namely, the following variations are accepted as well: > > a) non-alphanumeric characters (‘B<[^A-Za-z0-9]>’) in the vendor name > > are mapped to dashes (‘B<->’) and all letters are lower-cased > > b) the vendor name is kept as it is > > Non-alphanumeric mapped to dashes, then b) > > > c) all letters in the vendor name are lower cased and then first letter > > is capitalized > > Non-alphanumeric mapped to dashes, then c) > > > d) all letters (?) in the vendor name are capitalized > > (since dpkg 1.21.10). > > Non-alphanumeric mapped to dashes, then only the first letter is > upper-cased (which I understand to be synonymous with capitalizing).
I'm not a native speaker either, but capitalizing seems fine. > > > > In addition, for " > > > > "historical and backwards compatibility, the above casing attempts will > > > > be " > > > > "tried first as-is with no remapping, and then by remapping spaces to > > > > dashes " > > > > "(‘B<->’). But these will be removed during the dpkg 1.22.x release > > > > cycle." > > > > > > This means they will be tried then first w/o remapping as follows: > > > > > > lower-cased: aA-bB%Some OS → aa-bb%some os > > > as-is: aA-bB%Some OS → aA-bB%Some OS > > > lower-cased and capitalized: aA-bB%Some OS → Aa-bb%some os > > > capitalized: aA-bB%Some OS → AA-bB%Some OS > > > > > > And subsequently by only remapping spaces to dashes: > > > > > > lower-cased: aA-bB%Some OS → aa-bb%some-os > > > as-is: aA-bB%Some OS → aA-bB%Some-OS > > > lower-cased and capitalized: aA-bB%Some OS → Aa-bb%some-os > > > capitalized: aA-bB%Some OS → AA-bB%Some-OS > > > > > > Was the problem with just the "as-is" or how the formulation of casing > > > is listed? > > > > Your wording is sometims very terse and assigning the virtual () (i.e. > > which ands and ors belong to each other) is sometime tricky, > > Sorry! :) I guess I tend to try to avoid what I perceive as > unnecessary repetition, and expressing lists seems sometimes > complicated. > > > and yes, > > the "as is" made me wonder about "remapping". But of course, a 1:1 > > mapping is a mapping as well'. (and the case c) I could not see from > > your text alone at all). > > > And the third sentence thus reads (verbosely): > > In addition, for historical and backwards compatibility, the above casing > > attempts will be tried in the following order: > > a) First no remapping (keeping the name as is) > > b) Remapping spaces to dashes (‘B<->’). > > These would be, instead of the first phase of remapping > non-alphanumeric to dashes, the a) and b) here would be applied, then > the a/b/c/d from above would be repeated (for each of these two > iterations. > > > But this does not match your examples, so I guess I still haven't > > understood the third sentence. > > Ok, I've tried to reword the man page, how about the following, which > introduced some repetition (which will eventually go away), and should > hopefully be more clear? Otherwise we can iterate until it does. :) > > ,--- > The file should be named according to the vendor name. > The usual convention is to name the vendor file using the vendor name > in all lowercase, but some variation is permitted. > Namely (since dpkg 1.21.10), first, non-alphanumeric characters > (‘B<[^A-Za-z0-9]>’) are mapped to dashes (‘B<->’), then the resulting > name will be tried in sequence by lower-casing it, as-is, lower-casing as → keeping it as-is > then capitalizing (that is upper-casing the first character), and only > capitalizing. capitalizing. → capitalizing it // If you want to optimize, then you can remove the bracketed term > In addition, for historical and backwards compatibility, the name will > be tried as-is without non-alphanumeric characters remapping, then > the resulting name be tried in sequence by lower-casing it, as-is, name be → name will be as-is → keeping it as-is > lower-casing then capitalizing, and only capitalizing. capitalizing. → capitalizing it. > And finally the name will be tried by remapping spaces to dashes (‘B<->’), > then the resulting name will be tried in sequence by lower-casing it, > as-is, lower-casing then capitalizing, and only capitalizing. as-is → keeping it as-is capitalizing. → capitalizing it. > But these will be removed during the dpkg 1.22.x release cycle. these → these mappings With these (editorial) additions I can translate it fine and hopefully I understand it as well. It really helps, and bits in documentation are cheap, so being a little more verbose in man pages is really helpful. (And I know, some man page writers go quite the opposite direction by repeating and extend quite a bit, but I think we are far from this here). Thanks for clarifying! Greetings Helge -- Dr. Helge Kreutzmann deb...@helgefjell.de Dipl.-Phys. http://www.helgefjell.de/debian.php 64bit GNU powered gpg signed mail preferred Help keep free software "libre": http://www.ffii.de/
signature.asc
Description: PGP signature