[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60053] package: dependency may also be octave
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself. |
Date: |
Mon, 15 Feb 2021 15:47:18 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #7, bug #60053 (project octave):
@Ernst:
Sorry I misunderstood it was about the docs.
BTW I'm not a package developer but package maintainer. Admittedly I did
develop a few functions, perhaps that's where the confusion comes from :-)
As to comment #5, package dependencies are checked in private function
"get_unsatisfied_dependencies.m" and that *does* invoke compare_versions.m
...
function bad_deps = get_unsatisfied_deps (desc, installed_pkgs_lst,
uninstall_flag = false)
bad_deps = {};
## For each dependency.
for i = 1:length (desc.depends)
dep = desc.depends{i};
## Is the current dependency Octave?
if (strcmp (dep.package, "octave"))
if (! compare_versions (OCTAVE_VERSION, dep.version, dep.operator))
bad_deps{end+1} = dep;
endif
## Is the current dependency not Octave?
else
ok = xor (false, uninstall_flag);
for i = 1:length (installed_pkgs_lst)
cur_name = installed_pkgs_lst{i}.name;
cur_version = installed_pkgs_lst{i}.version;
if (strcmp (dep.package, cur_name)
&& compare_versions (cur_version, dep.version, dep.operator))
ok = xor (true, uninstall_flag);
break;
endif
endfor
if (! ok)
bad_deps{end+1} = dep;
endif
endif
endfor
It's rather compare_versions that supports a limited set of comparison
operators. As you can see above, "!=" is supported invoking compare_versions
with an "=" operator and then negating compare_version's output.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60053>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Ernst Reissner, 2021/02/14
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Philip Nienhuis, 2021/02/15
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Ernst Reissner, 2021/02/15
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Markus Mützel, 2021/02/15
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Markus Mützel, 2021/02/15
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Ernst Reissner, 2021/02/15
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Ernst Reissner, 2021/02/15
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself.,
Philip Nienhuis <=
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Ernst Reissner, 2021/02/16
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Markus Mützel, 2021/02/16
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Ernst Reissner, 2021/02/16
- [Octave-bug-tracker] [bug #60053] package: dependency may also be octave itself., Markus Mützel, 2021/02/21