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

Support for multiple versions in the repository?



Hey all,

We currently have setup an apt repository to store our internal 
packages. We have come across a problem where I would like to know if 
this problem is known and if what we want is possible.

In our internal repository we would like to store multiple packages and 
every package will have lots of versions. We will also have version 
constraints between these packages. This is were we discovered the problem.

Lets say we have package A and B in the repository. Both packages A and 
B have versions 1 and 2 in the repository.  Package A version 1 depends 
on B version 1, and A version 2 depends on B version 2.

So we have the following packages in the repository:
- A[1]: depends B=1

- A[2]: depends B=2

- B[1]

- B[2]

If we were to do apt install A B=1, we get the following error:

A : Depends: B (=2) but 1 is to be installed

I would have assumed that the dependency resolver would be able to 
figure out that it should use version 1 of package A instead of version 2.

I discovered that APT first will pick the version and then will do the 
version resolution. I also found out that a new solver(3.0) is being 
implemented which seemed like it would solve this situation. So I tried 
it with the --no-strict-pinning option, but the same problem persisted.

So my question is. Can APT handle dependencies in this way? If so, what 
are we doing wrong? if not, how should we solve this problem. I would 
not like to implement a dependency solver on top of apt.

Thanks,

Robbert-Jan




Reply to: