#1425 CVS tag fails if package name begins with digits then hyphen e.g. 389-
Closed: Fixed None Opened 14 years ago by rmeggins.

If a package name begins with digits followed by a hyphen e.g. 389-ds-base, cvs tag fails:[[BR]]

make tag[[BR]]
cvs tag -c -ds-base-1_2_1-1_fc12[[BR]]
tag: invalid option -- s[[BR]]

CVS tags must begin with a letter, so Makefile.common attempts to fix "bad" names:[[BR]]

CVS-safe version/release -- a package name like 4Suite screws things[[BR]]

up, so we have to remove the leaving digits from the name[[BR]]

TAG_NAME := $(shell echo $(NAME) | sed -e s/\./_/g -e s/^[0-9]\+//g)[[BR]]

But this does not work for digits followed by a hyphen.


This is due to a convention in Fedora Makefile.common and tag-check that strips numbers off the front of package names, due to CVS requiring that tags start with a letter. So packages like 389-ds-base get reduced to just -ds-base which fails.

What we should do, instead of substituting the numbers with nothing, is pick a suitable string that is rather unlikely to show up as a package name itself, something such as 'zZzZ' or similar. In this package case, we'd get 'zZzZ-ds-base-1_2_1-1_fc12'. While not pretty, as long as Makefile.common and tag-check agree upon what to replace the numbers with, and the result starts with a letter, everything should be fine.

This will need to be done inside of Red Hat as well, so I'm bringing this ticket to their attention.

I'm not crazy about actually modifying the package name to make the tag name. It removes information and makes it harder to go from a tag name to a package name, and it also leads to the possibility of collisions (two people submit packages named 123 and 456). Would it be possible to prepend a string to such packages instead? In this case, the regexes that would end up being applied to package names look something like
{{{
s/^([^0-9_-])/alphasub_\1/
s/[^0-9a-zA-Z_-]/_/g
}}}

prepend is better - if name matches ^[0-9] just stick a letter on there e.g. 389-ds-base becomes f389-ds-base

that way you don't have to worry about collisions, and you can still go from the tag name to the package name easily

The latest suggestion in IRC (and my favorite) is prepending the branch name to tags:
{{{
00:25:33 < f13> you could inforporate the branch into it devel-name_ver_release
00:25:39 < f13> F11-name_ver_release
}}}

Prepend always or only for packages starting with number-hyphen?

Any progress on this issue?

Sorry for the delay, I think this fell between the cracks a bit since it happened right before the release. We're going to discuss the situation with this with notting later today.

After discussion on IRC, we decided to do a simple one-off for 389, since CVS's days are numbered and git won't have this problem. When a package name is found that starts with "389" we'll translate it to "three89". Please update your common/ directory and try making your tag again.

Login to comment on this ticket.

Metadata