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

2020-04-20 Thread Andrei POPESCU
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
Description: PGP signature


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

2020-04-19 Thread Sven Joachim
On 2020-04-19 19:11 +0200, Sven Hartge wrote:

> The Wanderer  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



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

2020-04-19 Thread 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
 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



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

2020-04-19 Thread The Wanderer
On 2020-04-19 at 13:08, Michael Lange wrote:

> Hi,
> 
> On Sun, 19 Apr 2020 12:57:12 -0400 The Wanderer
>  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
Description: OpenPGP digital signature


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

2020-04-19 Thread Sven Hartge
The Wanderer  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.



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

2020-04-19 Thread Michael Lange
Hi,

On Sun, 19 Apr 2020 12:57:12 -0400
The Wanderer  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



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

2020-04-19 Thread 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
Description: OpenPGP digital signature


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

2020-04-19 Thread Michael Howard

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

Hi,

On Sun, 19 Apr 2020 09:25:18 +0200
Sven Hartge  wrote:


Michael Howard  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



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

2020-04-19 Thread Michael Lange
Hi,

On Sun, 19 Apr 2020 09:25:18 +0200
Sven Hartge  wrote:

> Michael Howard  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



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

2020-04-19 Thread Sven Hartge
Michael Howard  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.



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

2020-04-19 Thread Michael Lange
Hi,

On Sat, 18 Apr 2020 21:43:09 +0100
Michael Howard  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



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

2020-04-18 Thread Michael Howard

On 18/04/2020 21:34, Michael Howard wrote:

On 18/04/2020 21:02, Sven Hartge wrote:

Michael Howard  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  ' and then 'apt-mark
showhold' I get ' ' listed.
If I then do 'apt-mark hold ' followed by 'apt-mark showhold'
I get only '' listed. This can't be right, surely?

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



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



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

2020-04-18 Thread Michael Howard

On 18/04/2020 21:02, Sven Hartge wrote:

Michael Howard  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  ' and then 'apt-mark
showhold' I get ' ' listed.
If I then do 'apt-mark hold ' followed by 'apt-mark showhold'
I get only '' 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



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

2020-04-18 Thread Sven Hartge
Michael Howard  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  ' and then 'apt-mark 
> showhold' I get ' ' listed.

> If I then do 'apt-mark hold ' followed by 'apt-mark showhold' 
> I get only '' 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.