Control: notfound -1 unattended-upgrades

Hi Francesco,

<fmn...@fmneto.com.br> ezt írta (időpont: 2019. aug. 9., P, 3:01):
>
> Greetings!
>
> On 2019-08-08 17:47, Bálint Réczey wrote:
> > Control: tags -1 moreinfo
> >
> > Hi Francisco,
>
> <...>
>
> > Unattended-upgrades is expected to run only for a few seconds per day
> > and should not block installation of packages when it is not running.
> > Could you please check if it was stuck?
> > You can use pstree and check the logs in /var/log/unattended-upgrades/
> > .
> >
> > Thanks,
> > Balint
>
>
>    I checked the log files for it. Two things:
>
> 1) Ironically, unattended-upgrades.log reports an error because it could
> not get the lock at /var/lib/dpkg/lock
>
> 2) unattended-upgrades-dpkg.lost shows nothing out of the ordinary,
> except it suddenly stops (most likely when I manually killed the
> process).
>
> These files do not contain logs for other times, though. However, it may
> be supposed to run only for a few seconds, but these logs span several
> minutes (which, come to think of it, make _some_ sense since the logs
> report several packages to be installed).
>
> Thinking back, and considering this installation as well as others (my
> computer at work and my desktop at home), the impression that I get is
> that it seems to check for updates right after I log in to the system,
> which is usually the moment I decide to do the same (check for upgrades
> or installing new packages).
>
> I have no idea if that is the expected behavior for it or not, but I
> have encountered dpkg locked more often than not, and that can become
> really annoying after some time.
>
> Perhaps, instead of simply complaining about an unobtainable lock, apt
> could give the user a message like "hang on, there are upgrades being
> installed, these are the packages that are being upgraded" - or
> something along those lines. That way at least I'd know to wait for a
> bit until the upgrade is complete.
>
> With hopes of making this whole issue a bit clearer, I'm gonna try and
> summarize:
>
> 1- I log in to the system
> 2a- The first thing I do is run apt update
> 2b- Alternatively, I search for something with apt search then try to
> install it with apt install
> 3- In either case, I get a message about the locks not being available
>
> I hope this is more illuminating (the log files I mentioned are
> attached).

So APT is being improved to report who is holding the lock:
https://salsa.debian.org/apt-team/apt/merge_requests/68

APT runs update every morning or after the system is started if it is
later than morning. Downloading all the metadata can easily take
longer than the package upgrades themselves.
If you try to do the same, you can expect colliding with the automated task.

If you would like to keep the habit of upgrading packages in the
morning manually then I suggest configuring unattended-upgrades to
perform upgrades in the evening or on shutdown.
Please note that you can also configure u-u to apply all updates not
just security updates.

Cheers,
Balint

Reply via email to