🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
10 messages
10 total messages Started by Steinar H. Gunderson Fri, 06 Nov 2026 18:30
Bug#1153245: plocate database not generated in chroots
#3523
Author: Steinar H. Gunderson
Date: Fri, 06 Nov 2026 18:30
16 lines
2613 bytes
On Fri, Nov 06, 2026 at 06:40:26PM +0100, Benjamin Drung wrote:
> When installing plocate in a container, the plocate database is not
> generated.
> 
> In Ubuntu we have been carrying the attached patch to create the plocate
> database in postinst since several years.

Hi,

Thanks for the patch. However, this means installing plocate can make apt
block further installation for unbounded amounts of time, even days on
certain systems, and I doubt that is acceptable.

/* Steinar */
-- 
Homepage: https://www.sesse.net/
Bug#1153245: plocate database not generated in chroots
#3524
Author: Benjamin Drung
Date: Fri, 06 Nov 2026 18:50
26 lines
2954 bytes
On Fri, 2026-11-06 at 18:50 +0100, Steinar H. Gunderson wrote:
> On Fri, Nov 06, 2026 at 06:40:26PM +0100, Benjamin Drung wrote:
> > When installing plocate in a container, the plocate database is not
> > generated.
> > 
> > In Ubuntu we have been carrying the attached patch to create the plocate
> > database in postinst since several years.
> 
> Hi,
> 
> Thanks for the patch. However, this means installing plocate can make apt
> block further installation for unbounded amounts of time, even days on
> certain systems, and I doubt that is acceptable.

I searched the bug reports and found
https://bugs.launchpad.net/ubuntu/+source/plocate/+bug/1968388

So blocking for the update is not a good idea. But how can we solve the
initial problem (installation in containers)? How about detecting if
running in a container and only then update the db in postinst?
containers are normally smaller than full desktop installations.

-- 
Benjamin Drung
Debian & Ubuntu Developer
Bug#1153245: plocate database not generated in chroots
#3526
Author: Benjamin Drung
Date: Fri, 06 Nov 2026 19:00
15 lines
2835 bytes
On Fri, 2026-11-06 at 19:54 +0100, Steinar H. Gunderson wrote:
> On Fri, Nov 06, 2026 at 07:41:47PM +0100, Benjamin Drung wrote:
> > So blocking for the update is not a good idea. But how can we solve the
> > initial problem (installation in containers)?
> 
> Can you elaborate what the problem is? Why does running background jobs not
> work correctly in the container system you are using?

Some containers (e.g. schroot) do not have an init system running. So
the systemd service is never started.

-- 
Benjamin Drung
Debian & Ubuntu Developer
Bug#1153245: plocate database not generated in chroots
#3527
Author: Steinar H. Gunderson
Date: Fri, 06 Nov 2026 19:00
10 lines
2539 bytes
On Fri, Nov 06, 2026 at 07:41:47PM +0100, Benjamin Drung wrote:
> So blocking for the update is not a good idea. But how can we solve the
> initial problem (installation in containers)?

Can you elaborate what the problem is? Why does running background jobs not
work correctly in the container system you are using?

/* Steinar */
-- 
Homepage: https://www.sesse.net/
Bug#1153245: plocate database not generated in chroots
#3528
Author: Steinar H. Gunderson
Date: Fri, 06 Nov 2026 19:10
13 lines
3010 bytes
On Fri, Nov 06, 2026 at 08:04:10PM +0100, Steinar H. Gunderson wrote:
> This sounds like something that is outside what each individual package
> should be dealing with? How do they deal with other packages that want
> to run timers?

Also: How would you ever update the database if there are changes, if you
care about plocate inside the container -- why is it acceptable to run
updatedb once on postinst, and then never again? There's something about the
use case here that eludes me.

/* Steinar */
-- 
Homepage: https://www.sesse.net/
Bug#1153245: plocate database not generated in chroots
#3529
Author: Steinar H. Gunderson
Date: Fri, 06 Nov 2026 19:10
13 lines
2835 bytes
On Fri, Nov 06, 2026 at 07:56:31PM +0100, Benjamin Drung wrote:
>> Can you elaborate what the problem is? Why does running background jobs not
>> work correctly in the container system you are using?
> Some containers (e.g. schroot) do not have an init system running. So
> the systemd service is never started.

This sounds like something that is outside what each individual package
should be dealing with? How do they deal with other packages that want
to run timers?

/* Steinar */
-- 
Homepage: https://www.sesse.net/
Bug#1153245: plocate database not generated in chroots
#3530
Author: Benjamin Drung
Date: Fri, 06 Nov 2026 19:20
22 lines
3427 bytes
On Fri, 2026-11-06 at 20:07 +0100, Steinar H. Gunderson wrote:
> On Fri, Nov 06, 2026 at 08:04:10PM +0100, Steinar H. Gunderson wrote:
> > This sounds like something that is outside what each individual package
> > should be dealing with? How do they deal with other packages that want
> > to run timers?
> 
> Also: How would you ever update the database if there are changes, if you
> care about plocate inside the container -- why is it acceptable to run
> updatedb once on postinst, and then never again? There's something about the
> use case here that eludes me.

I haven't found a bug report for this Ubuntu delta. So I don't know what
the initial use case was.

For me: I have a schroot wrapper where I can specify what I want to have
installed. I often use this as throw-away environment. So a one-time
setup is good enough for me.

-- 
Benjamin Drung
Debian & Ubuntu Developer
Bug#1153245: plocate database not generated in chroots
#3540
Author: Benjamin Drung
Date: Fri, 06 Nov 2026 19:20
23 lines
3244 bytes
On Fri, 2026-11-06 at 20:04 +0100, Steinar H. Gunderson wrote:
> On Fri, Nov 06, 2026 at 07:56:31PM +0100, Benjamin Drung wrote:
> > > Can you elaborate what the problem is? Why does running background jobs not
> > > work correctly in the container system you are using?
> > Some containers (e.g. schroot) do not have an init system running. So
> > the systemd service is never started.
> 
> This sounds like something that is outside what each individual package
> should be dealing with? How do they deal with other packages that want
> to run timers?

Timers are not run. Some other package update their DB in postinst or
work without a db, but plocate complains:

$ schroot -c unstable -u root
$ apt install -y plocate
$ plocate man
/var/lib/plocate/plocate.db: No such file or directory

-- 
Benjamin Drung
Debian & Ubuntu Developer
Bug#1153245: plocate database not generated in chroots
#3543
Author: Benjamin Drung
Date: Fri, 06 Nov 2026 19:30
24 lines
3689 bytes
On Fri, 2026-11-06 at 20:23 +0100, Steinar H. Gunderson wrote:
> On Fri, Nov 06, 2026 at 08:11:06PM +0100, Benjamin Drung wrote:
> > For me: I have a schroot wrapper where I can specify what I want to have
> > installed. I often use this as throw-away environment. So a one-time
> > setup is good enough for me.
> 
> But this depends on when plocate was unpacked and configured relative to
> other packages? Depending on completely uncontrollable factors, you could
> have basically zero packages in your database, which then is never updated?

That's a good point. So we would need an apt hook (that is run at the
end) instead of a postinst.

> Shouldn't you just run updatedb explicitly after apt in your setup script,
> in such a case?

That would be an alternative.

-- 
Benjamin Drung
Debian & Ubuntu Developer
Bug#1153245: plocate database not generated in chroots
#3544
Author: Steinar H. Gunderson
Date: Fri, 06 Nov 2026 19:30
15 lines
3224 bytes
On Fri, Nov 06, 2026 at 08:11:06PM +0100, Benjamin Drung wrote:
> For me: I have a schroot wrapper where I can specify what I want to have
> installed. I often use this as throw-away environment. So a one-time
> setup is good enough for me.

But this depends on when plocate was unpacked and configured relative to
other packages? Depending on completely uncontrollable factors, you could
have basically zero packages in your database, which then is never updated?

Shouldn't you just run updatedb explicitly after apt in your setup script,
in such a case?

/* Steinar */
-- 
Homepage: https://www.sesse.net/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads