Re: aptitude problem with control file (in stretch)

2020-08-07 Thread Sven Joachim
On 2020-08-07 14:08 +0200, Harald Dunkel wrote:

> On 8/5/20 6:29 PM, Sven Joachim wrote:
>> I am not sure I understand what you actually want to do, though.
>>
>
> I am maintaining a set of meta packages, referencing the packages
> to install on my hosts. To avoid having separate meta packages for
> each new Debian version I have to use conditional dependencies, like
>
> Package: sample-setup
> Architecture: all
> Depends: ${misc:Depends}
>   , sample-setup-chroot
>   :
>   , nvme-cli | base-files ( << 9 )
>   :
>
> Meaning nvme-cli has to be installed for Debian 9 or newer.
>
>
> This package
>
> Package: sample-lxc
> Architecture: all
> Depends: ${misc:Depends}
>   , cgmanager | systemd
>   , debootstrap
>   , lxc
>   , lxc-templates | lxc ( << 3 )
> :
>
> did not work as expected (IMHO), apparently because (1:2 << 3) = false.

That's what I meant to tell you in my first reply, sorry if it was
unclear.  I think changing the dependency to
"lxc-templates | lxc ( << 1:3 )" is what you want here.

See deb-version(7) for how dpkg (and apt) compares versions.

Cheers,
   Sven



Re: aptitude problem with control file (in stretch)

2020-08-07 Thread Harald Dunkel

On 8/5/20 6:29 PM, Sven Joachim wrote:


I am not sure I understand what you actually want to do, though.



I am maintaining a set of meta packages, referencing the packages
to install on my hosts. To avoid having separate meta packages for
each new Debian version I have to use conditional dependencies, like

Package: sample-setup
Architecture: all
Depends: ${misc:Depends}
, sample-setup-chroot
:
, nvme-cli | base-files ( << 9 )
:

Meaning nvme-cli has to be installed for Debian 9 or newer.


This package

Package: sample-lxc
Architecture: all
Depends: ${misc:Depends}
, cgmanager | systemd
, debootstrap
, lxc
, lxc-templates | lxc ( << 3 )
:

did not work as expected (IMHO), apparently because (1:2 << 3) = false.


Regards
Harri



Re: aptitude problem with control file (in stretch)

2020-08-05 Thread didier . gaumet
Hello,

perhaps options described here could help you:
 https://www.debian.org/doc/manuals/aptitude/ch02s05s05.en.html



Re: aptitude problem with control file (in stretch)

2020-08-05 Thread Sven Joachim
On 2020-08-05 12:33 +0200, Harald Dunkel wrote:

> On 8/5/20 11:03 AM, Sven Joachim wrote:
>> I am surprised to read that, considering that your installed lxc
>> version
>> does not actually fulfill the dependency.  Note the epoch.
>> $ dpkg --compare-versions 1:2.0.11-1~xgo90+1 lt 3 || echo 'Got it!'
>> Got it!
>>
>
> Maintaining the sample-lxc package I have no influence upon
> other packages introducing new epoch numbers. Upstream moved
> the templates into a separate github repository for lxc
> version 3, so its unreasonable to consider Debian's epoch
> number for package dependencies in this case.
>
> How can I express this dependency upon lxc's upstream version
> number in my control file, ignoring the epoch number?

You don't, at least as long as there is only an lxc package _with_ the
epoch available, like the one you have currently installed.

I am not sure I understand what you actually want to do, though.

Cheers,
   Sven



Re: aptitude problem with control file (in stretch)

2020-08-05 Thread Harald Dunkel

On 8/5/20 11:03 AM, Sven Joachim wrote:


I am surprised to read that, considering that your installed lxc version
does not actually fulfill the dependency.  Note the epoch.

$ dpkg --compare-versions 1:2.0.11-1~xgo90+1 lt 3 || echo 'Got it!'
Got it!



Maintaining the sample-lxc package I have no influence upon
other packages introducing new epoch numbers. Upstream moved
the templates into a separate github repository for lxc
version 3, so its unreasonable to consider Debian's epoch
number for package dependencies in this case.

How can I express this dependency upon lxc's upstream version
number in my control file, ignoring the epoch number?

This is just out of interest. The workaround for my package
is obvious.


Regards
Harri



Re: aptitude problem with control file (in stretch)

2020-08-05 Thread Sven Joachim
On 2020-08-05 09:42 +0200, Harald Dunkel wrote:

> I've got a problem with upgrading a private package in Stretch. The control
> file says:
>
>   Package: sample-lxc
>   Architecture: all
>   Depends: ${misc:Depends}
>   , cgmanager | systemd
>   , debootstrap
>   , lxc
>   , lxc-templates | lxc ( << 3 )
>   Recommends: cgroup-tools
>   , apparmor
>   , uidmap
>   , yum
>   Conflicts: lxcfs
>   Description: LXC framework
>This package provides LXC for our environment.
>
> lxc-templates is available only for lxc >= 3 (Buster or Bullseye), and
> then its a must-have in my environment.
>
> Trying to install this package on Stretch aptitude complains about a
> missing lxc-templates package, even though the most recent lxc version
> 1:2.0.11-1~xgo90+1 is installed.
>
> apt and apt-get are fine, AFAICS.

I am surprised to read that, considering that your installed lxc version
does not actually fulfill the dependency.  Note the epoch.

$ dpkg --compare-versions 1:2.0.11-1~xgo90+1 lt 3 || echo 'Got it!'
Got it!

Cheers,
   Sven