[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian package non-strict equal dependencies



On Tue, Jan 12, 2016 at 03:34:20PM +0100, Philip Hands wrote:
> Josselin Mouette <joss@debian.org> writes:
> 
> > Dmitrii Kashin <d.kashin@solarsecurity.ru> wrote:
> >> The main thing is we can describe dependency as `pkg (= "2.0")' and yum will
> >> install package `pkg' of version "2.0" with the maximum revision
> >> found. And also we can write dependency specifically with revision,
> >> f.e. `pkg (= "2.0-43")' and yum will install specifically "2.0-43".
> >
> >> Well, now I'm trying to repack one project (my job) from centos to
> >> debian. And I wonder what would be the most correct way for such kind of
> >> dependencies.
> >> 
> >> 1) I could not write dependency operator at all.
> >> 2) I could write >= and version (f.e. "2.0")
> >
> > You can write, for example: 
> >         Depends: pkg (>= 2.0), pkg (<= 2.0.~)
> 
> That (<= 2.0.~) should have been (<< 3.0~)

I thought so too at first, but no, you're wrong :-)

2.1-43 would also satisfy pkg (<< 3.0~), which is not intended. For that
matter, 2.0.1-1 would also satisfy that. Instead, you want to have
something that sorts before that 1. That is the ~. So, the 2.0.~ is
correct.

(Regarding the << rather than the <=, you're right of course)

-- 
It is easy to love a country that is famous for chocolate and beer

  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26


Reply to: