backupninja performs incorrect version tests on duplicity
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
backupninja (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The program /usr/share/
First, the code for parsing (lines 99-102) and comparing versions (lines 120, 126, 161, 187, 244, 264) only work
together correctly if the version number has the form x.y.z where x, y, and z are numbers. The version of duplicity
in lucid, however, is 0.6.08b. The "b" in the subversion causes all of the tests to fail.
Second, the version comparisons do not correctly compare the major/minor/sub parts of versions correctly. For, example, the comparison on line 244 is supposed to test whether the version is at least 0.4.4. It does this
with:
"if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -ge 4 ]; then"
That comparison would be false for version 0.5.02, because 2 is not greater than or equal to 4. The same problem occurs on line 264. The comparisons 120, 161, 187 have the same incorrect logic, but since they're are less-than comparisons, they actually can't fail for any actual versions of duplicity.
Changed in backupninja (Ubuntu): | |
status: | New → Fix Released |
The same problem appears in the 0.9.6-4 package in Lucid and still exists in the version found in the trunk branch at https:/ /code.launchpad .net/~vcs- imports/ backupninja/ trunk.