apt-mark hold issue (apt Installed: 1.8.2 armhf)

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

apt-mark hold issue (apt Installed: 1.8.2 armhf)

Michael Howard
I've not used apt-mark much (or it's previous methods) so I'm a bit
confused by what I'm seeing.

If I use 'apt-mark hold <package1> <package2>' and then 'apt-mark
showhold' I get '<package1> <package2>' listed.

If I then do 'apt-mark hold <package3>' followed by 'apt-mark showhold'
I get only '<package3>' listed. This can't be right, surely?

Am I missing something?

--
Michael Howard

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Sven Hartge-5
Michael Howard <[hidden email]> wrote:

> I've not used apt-mark much (or it's previous methods) so I'm a bit
> confused by what I'm seeing.

> If I use 'apt-mark hold <package1> <package2>' and then 'apt-mark
> showhold' I get '<package1> <package2>' listed.

> If I then do 'apt-mark hold <package3>' followed by 'apt-mark showhold'
> I get only '<package3>' listed. This can't be right, surely?

Sorry, I can't reproduce this, here on Debian 10:

,----
| root@server:~ # apt-mark showhold
| root@server:~ # apt-mark hold bash dash
| bash set on hold.
| dash set on hold.
| root@server:~ # apt-mark showhold
| bash
| dash
| root@server:~ # apt-mark hold xterm
| xterm set on hold.
| root@server:~ # apt-mark showhold
| bash
| dash
| xterm
`----

But:

,----
| root@server:~ # apt-mark showhold xterm
| xterm
| root@server:~ # apt-mark showhold gzip
| root@server:~ #
`----

Please show the exact commands and their exact output.

Grüße,
Sven.

--
Sigmentation fault. Core dumped.

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Michael Howard
On 18/04/2020 21:02, Sven Hartge wrote:
Michael Howard [hidden email] wrote:

I've not used apt-mark much (or it's previous methods) so I'm a bit
confused by what I'm seeing.

      
If I use 'apt-mark hold <package1> <package2>' and then 'apt-mark 
showhold' I get '<package1> <package2>' listed.

      
If I then do 'apt-mark hold <package3>' followed by 'apt-mark showhold' 
I get only '<package3>' listed. This can't be right, surely?
Sorry, I can't reproduce this, here on Debian 10:

,----
| root@server:~ # apt-mark showhold
| root@server:~ # apt-mark hold bash dash
| bash set on hold.
| dash set on hold.
| root@server:~ # apt-mark showhold
| bash
| dash
| root@server:~ # apt-mark hold xterm
| xterm set on hold.
| root@server:~ # apt-mark showhold
| bash
| dash
| xterm
`----

But:

,----
| root@server:~ # apt-mark showhold xterm
| xterm
| root@server:~ # apt-mark showhold gzip
| root@server:~ # 
`----

Please show the exact commands and their exact output.

Grüße,
Sven.

Uhm, weird. It might be to do with the packages I was playing with.

root@bamford:/etc# apt-mark showhold
root@bamford:/etc# apt-mark hold bash
bash set on hold.
root@bamford:/etc# apt-mark showhold
bash
root@bamford:/etc# apt-mark hold dash
dash set on hold.
root@bamford:/etc# apt-mark showhold
bash
dash

All good so far.

root@bamford:/etc# apt-mark hold sudo sudo-ldap
sudo set on hold.
sudo-ldap set on hold.
root@bamford:/etc# apt-mark showhold
bash
dash
sudo
sudo-ldap

Still good, but then,

root@bamford:/etc# apt-mark hold xterm
xterm set on hold.
root@bamford:/etc# apt-mark showhold
bash
dash
xterm
root@bamford:/etc#

Is that expected?
-- 
Michael Howard
Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Michael Howard
On 18/04/2020 21:34, Michael Howard wrote:
On 18/04/2020 21:02, Sven Hartge wrote:
Michael Howard [hidden email] wrote:

I've not used apt-mark much (or it's previous methods) so I'm a bit
confused by what I'm seeing.
If I use 'apt-mark hold <package1> <package2>' and then 'apt-mark 
showhold' I get '<package1> <package2>' listed.
If I then do 'apt-mark hold <package3>' followed by 'apt-mark showhold' 
I get only '<package3>' listed. This can't be right, surely?
Sorry, I can't reproduce this, here on Debian 10:
<snip>
Still good, but then,

root@bamford:/etc# apt-mark hold xterm
xterm set on hold.
root@bamford:/etc# apt-mark showhold
bash
dash
xterm
root@bamford:/etc#

Is that expected?

Same on stretch.
-- 
Michael Howard
07788 832584
Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Michael Lange-2
Hi,

On Sat, 18 Apr 2020 21:43:09 +0100
Michael Howard <[hidden email]> wrote:

> On 18/04/2020 21:34, Michael Howard wrote:
> > On 18/04/2020 21:02, Sven Hartge wrote:
(...)

> > Still good, but then,
> >
> > root@bamford:/etc# apt-mark hold xterm
> > xterm set on hold.
> > root@bamford:/etc# apt-mark showhold
> > bash
> > dash
> > xterm
> > root@bamford:/etc#
> >
> > Is that expected?
>
> Same on stretch.

maybe this is the same as:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892632
?

Regards
Michael



.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Four thousand throats may be cut in one night by a running man.
                -- Klingon Soldier, "Day of the Dove", stardate unknown

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Sven Hartge-5
In reply to this post by Michael Howard
Michael Howard <[hidden email]> wrote:

> root@bamford:/etc# apt-mark hold sudo sudo-ldap
> sudo set on hold.
> sudo-ldap set on hold.
> root@bamford:/etc# apt-mark showhold
> bash
> dash
> sudo
> sudo-ldap

> Still good, but then,

> root@bamford:/etc# apt-mark hold xterm
> xterm set on hold.
> root@bamford:/etc# apt-mark showhold
> bash
> dash
> xterm
> root@bamford:/etc#

> Is that expected?

*That* I can reproduce. Interesting.

No, that is not intended.

This looks like https://bugs.debian.org/892632 "apt: "apt-mark hold"
changes state of unrelated packages" to me.

S!

--
Sigmentation fault. Core dumped.

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Michael Lange-2
Hi,

On Sun, 19 Apr 2020 09:25:18 +0200
Sven Hartge <[hidden email]> wrote:

> Michael Howard <[hidden email]> wrote:
>
> > root@bamford:/etc# apt-mark hold sudo sudo-ldap
> > sudo set on hold.
> > sudo-ldap set on hold.
> > root@bamford:/etc# apt-mark showhold
> > bash
> > dash
> > sudo
> > sudo-ldap
>
> > Still good, but then,
>
> > root@bamford:/etc# apt-mark hold xterm
> > xterm set on hold.
> > root@bamford:/etc# apt-mark showhold
> > bash
> > dash
> > xterm
> > root@bamford:/etc#
>
> > Is that expected?
>
> *That* I can reproduce. Interesting.
>
> No, that is not intended.
>
> This looks like https://bugs.debian.org/892632 "apt: "apt-mark hold"
> changes state of unrelated packages" to me.

that's what I thought.

I tried some more, and here the same command sequence leads to a slightly
different result:

# apt-mark showhold
# apt-mark hold bash dash sudo sudo-ldap
bash auf Halten gesetzt.
dash auf Halten gesetzt.
sudo auf Halten gesetzt.
sudo-ldap auf Halten gesetzt.
# apt-mark showhold
bash
dash
sudo
sudo-ldap
# apt-mark hold xterm
xterm auf Halten gesetzt.
# apt-mark showhold
bash
dash
sudo
xterm
#

But then, I noticed that  sudo-ldap is not actually installed here, and in
fact it appears to conflict with sudo so apparently both cannot coexist.

So maybe the basic problem here is that we are trying to make apt do
things that really don't make any sense?

Regards
Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Killing is stupid; useless!
                -- McCoy, "A Private Little War", stardate 4211.8

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Michael Howard
On 19/04/2020 17:34, Michael Lange wrote:

> Hi,
>
> On Sun, 19 Apr 2020 09:25:18 +0200
> Sven Hartge <[hidden email]> wrote:
>
>> Michael Howard <[hidden email]> wrote:
>>
>>> root@bamford:/etc# apt-mark hold sudo sudo-ldap
>>> sudo set on hold.
>>> sudo-ldap set on hold.
>>> root@bamford:/etc# apt-mark showhold
>>> bash
>>> dash
>>> sudo
>>> sudo-ldap
>>> Still good, but then,
>>> root@bamford:/etc# apt-mark hold xterm
>>> xterm set on hold.
>>> root@bamford:/etc# apt-mark showhold
>>> bash
>>> dash
>>> xterm
>>> root@bamford:/etc#
>>> Is that expected?
>> *That* I can reproduce. Interesting.
>>
>> No, that is not intended.
>>
>> This looks like https://bugs.debian.org/892632 "apt: "apt-mark hold"
>> changes state of unrelated packages" to me.
> that's what I thought.
>
> I tried some more, and here the same command sequence leads to a slightly
> different result:
>
> # apt-mark showhold
> # apt-mark hold bash dash sudo sudo-ldap
> bash auf Halten gesetzt.
> dash auf Halten gesetzt.
> sudo auf Halten gesetzt.
> sudo-ldap auf Halten gesetzt.
> # apt-mark showhold
> bash
> dash
> sudo
> sudo-ldap
> # apt-mark hold xterm
> xterm auf Halten gesetzt.
> # apt-mark showhold
> bash
> dash
> sudo
> xterm
> #
>
> But then, I noticed that  sudo-ldap is not actually installed here, and in
> fact it appears to conflict with sudo so apparently both cannot coexist.
>
> So maybe the basic problem here is that we are trying to make apt do
> things that really don't make any sense?
>
But what if I want neither sudo nor sudo-ldap? I hold sudo but then
sudo-ldap gets installed (should something depend it) and vice-versa I
guess.

Personally, I don't think co-existence is relevant.

--
Michael Howard

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

The Wanderer
On 2020-04-19 at 12:46, Michael Howard wrote:

> On 19/04/2020 17:34, Michael Lange wrote:

>> But then, I noticed that  sudo-ldap is not actually installed here,
>> and in fact it appears to conflict with sudo so apparently both
>> cannot coexist.
>>
>> So maybe the basic problem here is that we are trying to make apt
>> do things that really don't make any sense?
>
> But what if I want neither sudo nor sudo-ldap? I hold sudo but then
> sudo-ldap gets installed (should something depend it) and vice-versa
> I guess.
Does holding a package to not-installed even work? I thought I'd tried
that in the past, and had the result be ignored.

--
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Michael Lange-2
Hi,

On Sun, 19 Apr 2020 12:57:12 -0400
The Wanderer <[hidden email]> wrote:

> Does holding a package to not-installed even work? I thought I'd tried
> that in the past, and had the result be ignored.

not sure about that, man apt-mark says

" hold is used to mark a package as held back, which will prevent the
package from being automatically installed, upgraded or removed."

But it might make sense that this will keep only packages that are
recommended from being installed, not those that are dependencies.
Maybe "depends" just takes precedence over "hold" when the user gives
apt instructions that basically are contradictory.

Regards

Michael

.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

On my planet, to rest is to rest -- to cease using energy.  To me, it
is quite illogical to run up and down on green grass, using energy,
instead of saving it.
                -- Spock, "Shore Leave", stardate 3025.2

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Sven Hartge-5
In reply to this post by The Wanderer
The Wanderer <[hidden email]> wrote:
> On 2020-04-19 at 12:46, Michael Howard wrote:
>> On 19/04/2020 17:34, Michael Lange wrote:

>>> But then, I noticed that  sudo-ldap is not actually installed here,
>>> and in fact it appears to conflict with sudo so apparently both
>>> cannot coexist.
>>>
>>> So maybe the basic problem here is that we are trying to make apt do
>>> things that really don't make any sense?
>>
>> But what if I want neither sudo nor sudo-ldap? I hold sudo but then
>> sudo-ldap gets installed (should something depend it) and vice-versa
>> I guess.

> Does holding a package to not-installed even work? I thought I'd tried
> that in the past, and had the result be ignored.

No, it does work. Or at least it should, since you are holding the
package state, which is "uninstalled" at that moment.

S!

--
Sigmentation fault. Core dumped.

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

The Wanderer
In reply to this post by Michael Lange-2
On 2020-04-19 at 13:08, Michael Lange wrote:

> Hi,
>
> On Sun, 19 Apr 2020 12:57:12 -0400 The Wanderer
> <[hidden email]> wrote:
>
>> Does holding a package to not-installed even work? I thought I'd
>> tried that in the past, and had the result be ignored.
>
> not sure about that, man apt-mark says
>
> " hold is used to mark a package as held back, which will prevent
> the package from being automatically installed, upgraded or
> removed."
I think my memory has been jogged now. I think the problem is that this
hold doesn't propagate through the dependency-resolution system, but
only serves to prevent the change from being made, with the result that
if the dependency resolver thinks the change is necessary then an
install / upgrade/ whatever operation will fail with "you have held
broken packages".

IIRC and in my experience, this produces breakages in situations which
would otherwise work often enough that I've just given up on trying it.

And just as I finish that first paragraph, I remember the thing that
didn't work with "not-installed" state: 'dpkg --set-selections'.

--
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Michael Howard
On 19/04/2020 18:27, The Wanderer wrote:
On 2020-04-19 at 13:08, Michael Lange wrote:

Hi,

On Sun, 19 Apr 2020 12:57:12 -0400 The Wanderer
[hidden email] wrote:

Does holding a package to not-installed even work? I thought I'd
tried that in the past, and had the result be ignored.
not sure about that, man apt-mark says

" hold is used to mark a package as held back, which will prevent
the package from being automatically installed, upgraded or
removed."
I think my memory has been jogged now. I think the problem is that this
hold doesn't propagate through the dependency-resolution system, but
only serves to prevent the change from being made, with the result that
if the dependency resolver thinks the change is necessary then an
install / upgrade/ whatever operation will fail with "you have held
broken packages".

IIRC and in my experience, this produces breakages in situations which
would otherwise work often enough that I've just given up on trying it.

And just as I finish that first paragraph, I remember the thing that
didn't work with "not-installed" state: 'dpkg --set-selections'.

I don't think apt and dpkg are linked in this respect, they didn't used to be. i.e. holding through apt had no affect on dpkg.

'apt-mark hold' definately prevents a package being selected for install, say as a depend, but you obviously could end up with broken packages if you forced the matter somehow.

To my mind, it should maintain the status quo and mutually exclusive packages should be suitable for 'marking'.
-- 
Michael Howard
Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Sven Joachim
In reply to this post by Sven Hartge-5
On 2020-04-19 19:11 +0200, Sven Hartge wrote:

> The Wanderer <[hidden email]> wrote:
>
>> Does holding a package to not-installed even work? I thought I'd tried
>> that in the past, and had the result be ignored.
>
> No, it does work. Or at least it should, since you are holding the
> package state, which is "uninstalled" at that moment.

Maybe it should work, but currently it does not.  See
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929102.

Cheers,
       Sven

Reply | Threaded
Open this post in threaded view
|

Re: apt-mark hold issue (apt Installed: 1.8.2 armhf)

Andrei POPESCU-2
In reply to this post by Michael Howard
On Du, 19 apr 20, 18:40:44, Michael Howard wrote:
>
> I don't think apt and dpkg are linked in this respect, they didn't used to
> be. i.e. holding through apt had no affect on dpkg.

More like apt didn't have any interface to set/clear holds.

It seems to me like dpkg is the "keeper" of hold state, apt(-mark) and
aptitude just change that (which makes sense to me).

It would be very confusing if apt/itude and dpkg had different ideas
about what package is (not) on hold.

Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser

signature.asc (849 bytes) Download Attachment