Opened 4 hours ago
#1855 new defect
Egg spec's version format is stricter than release-info's
Reported by: | Moritz Heidkamp | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | someday |
Component: | unknown | Version: | 5.4.0 |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
Problem
chicken-install
strictly validates the version
property of egg specs (i.e. what goes into .egg
files) according to the documented format:
Specifies version string for this egg.
STRING
should have the format<MAJOR>.<MINOR>.<PATCHLEVEL>
, where only the<MAJOR>
part is mandatory.
However, the same validation does not apply to eggs released through the central egg repository. Here, the version specified in the .release-info
file is taken verbatim. This means it's not possible to install an egg from a local source directory when its version doesn't match the stricter egg spec format.
Proposed solution
Since there are already a lot of egg releases in existence which don't match the egg spec (e.g. fmt
version 0.8.11.3
), enforcing the same strict format for .release-info
appears too disruptive a change. Instead, we should make the egg spec's format less strict, effectively allowing any string as version.
CHICKEN 6
For C6, we could still consider enforcing the strict format everywhere.
Reproduction
svn checkout https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/fmt/tags/0.8.11.3 cd 0.8.11.3 csi -e "(write (cons '(version "0.8.11.3") (read)))" < fmt.egg > fmt.egg.new mv fmt.egg.new fmt.egg chicken-install
Output:
Error: egg information item has invalid structure: (version 0.8.11.3)