Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #210517 > unrolled thread
| Started by | Fabian peter Hammerle <Fabianpeter.Hammerle@catalysts.cc> |
|---|---|
| First post | 2019-07-01 09:40 +0200 |
| Last post | 2019-07-01 17:00 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.debian.user
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
apt-get install refuses to installs older versions of dependencies Fabian peter Hammerle <Fabianpeter.Hammerle@catalysts.cc> - 2019-07-01 09:40 +0200
Re: apt-get install refuses to installs older versions of dependencies <tomas@tuxteam.de> - 2019-07-01 11:00 +0200
AW: apt-get install refuses to installs older versions of dependencies Fabian peter Hammerle <Fabianpeter.Hammerle@catalysts.cc> - 2019-07-01 12:20 +0200
Re: apt-get install refuses to installs older versions of dependencies David Wright <deblis@lionunicorn.co.uk> - 2019-07-01 15:30 +0200
AW: apt-get install refuses to installs older versions of dependencies Fabian peter Hammerle <Fabianpeter.Hammerle@catalysts.cc> - 2019-07-01 15:50 +0200
Re: apt-get install refuses to installs older versions of dependencies David Wright <deblis@lionunicorn.co.uk> - 2019-07-01 17:00 +0200
| From | Fabian peter Hammerle <Fabianpeter.Hammerle@catalysts.cc> |
|---|---|
| Date | 2019-07-01 09:40 +0200 |
| Subject | apt-get install refuses to installs older versions of dependencies |
| Message-ID | <yeZ4S-Rd-7@gated-at.bofh.it> |
Dear Debian Users,
I set up an APT repository containing 2 packages: foo and bar
The repository contains 2 versions of foo: 1.0.0 and 2.0.0
and 2 versions of bar: 3.0.0 and 4.0.0
foo 1.0.0 depends on bar 3.0.0
foo 2.0.0 depends on bar 4.0.0
I can easily install the latest version of foo via
```
$ sudo apt-get install foo
[...]
The following NEW packages will be installed:
foo bar
[...]
Setting up bar (4.0.0) ...
Setting up foo (2.0.0) ... ```
I get the same result when running `sudo apt-get install foo=2.0.0`
However, apt-get fails to install foo 1.0.0
```
$ sudo apt-get install foo=1.0.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
foo : Depends: bar (= 3.0.0) but 4.0.0 is to be installed
E: Unable to correct problems, you have held broken packages. ```
Currently, I workaround this issue by running `sudo apt-get install foo=1.0.0 bar=3.0.0`.
How can I instruct apt-get to automatically install an older version of bar as required by foo?
Or in other words: How can I make `apt-get install foo=1.0.0` install both foo 1.0.0 and bar 3.0.0 (dependency of foo 1.0.0).
Thanks,
Fabian
[toc] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2019-07-01 11:00 +0200 |
| Subject | Re: apt-get install refuses to installs older versions of dependencies |
| Message-ID | <yf0kh-1wE-1@gated-at.bofh.it> |
| In reply to | #210517 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Jul 01, 2019 at 07:32:20AM +0000, Fabian peter Hammerle wrote:
> Dear Debian Users,
>
> I set up an APT repository containing 2 packages: foo and bar
>
> The repository contains 2 versions of foo: 1.0.0 and 2.0.0
> and 2 versions of bar: 3.0.0 and 4.0.0
[...]
> I get the same result when running `sudo apt-get install foo=2.0.0`
>
> However, apt-get fails to install foo 1.0.0
> ```
> $ sudo apt-get install foo=1.0.0
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
> The following information may help to resolve the situation:
> The following packages have unmet dependencies:
> foo : Depends: bar (= 3.0.0) but 4.0.0 is to be installed
> E: Unable to correct problems, you have held broken packages. ```
>
> Currently, I workaround this issue by running `sudo apt-get install foo=1.0.0 bar=3.0.0`.
That is most probably the only "clean" option there is...
[...]
> Or in other words: How can I make `apt-get install foo=1.0.0` install both foo 1.0.0 and bar 3.0.0 (dependency of foo 1.0.0).
That said, there is an option (heh) to apt-get you might want to
try. From the man page:
--allow-downgrades
This is a dangerous option that will cause apt to continue
without prompting if it is doing downgrades. It should not
be used except in very special situations. Using it can
potentially destroy your system! Configuration Item:
APT::Get::allow-downgrades. Introduced in APT 1.1.
The problem is that other packages might depend on your bar=4.0.0
package. Downgrading that might either break that other packages
or worse, send your Debian into a downgrade landslide (imagine
for a moment your 'bar' is, e.g. libc6...). This can get particularly
ugly, because downgrade paths aren't as well-tested as upgrade
paths (think config files, data files in new formats not understood
by older versions of your program, yadda, yadda).
So it makes a hell of a lot of sense to not do it by default.
Me, at least, having had my own share of "upgrade landslides" (yeah,
I asked for it: playing with FrankenDebians is the only way to
really learn things, at least for stubborn folks like me ;-)
I do understand the stern warning in the man page above.
Let us know how it went :-D
Cheers
-- tomás
[toc] | [prev] | [next] | [standalone]
| From | Fabian peter Hammerle <Fabianpeter.Hammerle@catalysts.cc> |
|---|---|
| Date | 2019-07-01 12:20 +0200 |
| Subject | AW: apt-get install refuses to installs older versions of dependencies |
| Message-ID | <yf1zH-2re-7@gated-at.bofh.it> |
| In reply to | #210521 |
Hi Tomás, Thank you very much for suggesting `--allow-downgrades` and your additional explanations. Unfortunately, I get the same error as before: ``` $ sudo apt-get install --allow-downgrades foo=1.0.0 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: foo : Depends: bar (= 3.0.0) but 4.0.0 is to be installed E: Unable to correct problems, you have held broken packages. ``` The package `bar` is not pre-installed. Fabian
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2019-07-01 15:30 +0200 |
| Message-ID | <yf4xz-4dJ-5@gated-at.bofh.it> |
| In reply to | #210517 |
On Mon 01 Jul 2019 at 07:32:20 (+0000), Fabian peter Hammerle wrote: > I set up an APT repository containing 2 packages: foo and bar > > The repository contains 2 versions of foo: 1.0.0 and 2.0.0 > and 2 versions of bar: 3.0.0 and 4.0.0 > > foo 1.0.0 depends on bar 3.0.0 > foo 2.0.0 depends on bar 4.0.0 > > I can easily install the latest version of foo via > ``` > $ sudo apt-get install foo > [...] > The following NEW packages will be installed: > foo bar > [...] > Setting up bar (4.0.0) ... > Setting up foo (2.0.0) ... ``` > > I get the same result when running `sudo apt-get install foo=2.0.0` > > However, apt-get fails to install foo 1.0.0 > ``` > $ sudo apt-get install foo=1.0.0 > Reading package lists... Done > Building dependency tree > Reading state information... Done > Some packages could not be installed. This may mean that you have > requested an impossible situation or if you are using the unstable > distribution that some required packages have not yet been created > or been moved out of Incoming. > The following information may help to resolve the situation: > The following packages have unmet dependencies: > foo : Depends: bar (= 3.0.0) but 4.0.0 is to be installed > E: Unable to correct problems, you have held broken packages. ``` > > Currently, I workaround this issue by running `sudo apt-get install foo=1.0.0 bar=3.0.0`. > > How can I instruct apt-get to automatically install an older version of bar as required by foo? Presumably by employing the same method that linux-image uses: by moving/copying the version number into the packages' names, foo-1 and foo-2. > Or in other words: How can I make `apt-get install foo=1.0.0` install both foo 1.0.0 and bar 3.0.0 (dependency of foo 1.0.0). Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Fabian peter Hammerle <Fabianpeter.Hammerle@catalysts.cc> |
|---|---|
| Date | 2019-07-01 15:50 +0200 |
| Subject | AW: apt-get install refuses to installs older versions of dependencies |
| Message-ID | <yf4QW-4lP-15@gated-at.bofh.it> |
| In reply to | #210534 |
Hi David, > Presumably by employing the same method that linux-image uses: > by moving/copying the version number into the packages' names, > foo-1 and foo-2. Thanks for your suggestion We are using CI/CD pipelines that deploy multiple versions / debian packages per day. So appending version suffixes to packages names would make our package lists hard to read. ``` $ apt search ^foo foo-1.0.0 foo-1.0.1 foo-1.0.2 foo-1.1.0 ... foo-1.999.0 ``` Fabian
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2019-07-01 17:00 +0200 |
| Message-ID | <yf5WF-4Zq-1@gated-at.bofh.it> |
| In reply to | #210539 |
On Mon 01 Jul 2019 at 13:45:30 (+0000), Fabian peter Hammerle wrote: > > Presumably by employing the same method that linux-image uses: > > by moving/copying the version number into the packages' names, > > foo-1 and foo-2. > > Thanks for your suggestion > > We are using CI/CD pipelines that deploy multiple versions / debian packages per day. > > So appending version suffixes to packages names would make our package lists hard to read. > > ``` > $ apt search ^foo > foo-1.0.0 > foo-1.0.1 > foo-1.0.2 > foo-1.1.0 > ... > foo-1.999.0 If these versions of foo have to be paired up with corresponding versions of bar, then I think you have to delve into the business of Breaks:, Conflicts: and Replaces: as well as just Depends:, so that you get the correct one installed, upgraded, or removed under the appropriate circumstances. Cheers, David.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web