Need a better validator for uploaded_version

Bug #922737 reported by Danny Tamez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Confirmed
Low
Unassigned

Bug Description

For now the current validator being used for version is too restrictive for uploaded_version. We don't ever want to prevent the reviewer from entering the actual uploaded version number because of our validator. At the same time we want to have the validator in place so as to catch potential typos/mistakes in the version number.

The validator should support numbers, tildes, letters etc. Some discussion needs to be had as to what other rules need to be in place.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 922737] [NEW] Need a better validator for uploaded_version

On Fri, 27 Jan 2012 17:54:45 -0000, Danny Tamez <email address hidden> wrote:
> Public bug reported:
>
> For now the current validator being used for version is too restrictive
> for uploaded_version. We don't ever want to prevent the reviewer from
> entering the actual uploaded version number because of our validator. At
> the same time we want to have the validator in place so as to catch
> potential typos/mistakes in the version number.
>
> The validator should support numbers, tildes, letters etc. Some
> discussion needs to be had as to what other rules need to be in place.

The rules for what is valid are set out at

  http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version

python-debian has debian.debian_support.BaseVersion that could be of
use. That defines

      re_valid_version = re.compile(
            r"^((?P<epoch>\d+):)?"
             "(?P<upstream_version>[A-Za-z0-9.+:~-]+?)"
             "(-(?P<debian_revision>[A-Za-z0-9+.~]+))?$")

Rules for how version numbers are allowed to evolved are a different
matter.

Thanks,

James

Dave Morley (davmor2)
Changed in software-center-agent:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.