> If the use of "--allow-change-held-packages" seams dangerous to you (it
> might not as we also set "-s" in the command line, it should be safer to
> juste replace "-y" by "--trivial-only" which will answer yes for all non
> dangerous questions and no on the orthers.

Since -s is used it is not a matter of "safe" vs. "dangerous", nothing
will be actually installed anyway. Otoh, with --trivial-only an available
update that however requires "yes" being answered on a "dangerous"
question might get lost in the process.

> What about replacing the whole complicated line by something more simple
> based on apt like this:
> 
> apt list --upgradable 2>/dev/null | sed -ne 's#^\(.*\)/.*$#\1#p'

Sounds reasonable, however I believe there are two problems with this:

1. if the maintainers wish to keep apticron's behavior intact, it is not
possible this way, since NOTIFY_NEW="1" would no longer have any effect
(although most likely the majority of users could live with that).

2. more seriously: the following part from man apt

> The apt(8) commandline is designed as a end-user tool and it may change
> the output between versions. While it tries to not break backward
> compatibility there is no guarantee for it either. All features of apt
> (8) are available in apt-cache(8) and apt-get(8) via APT options.
> Please prefer using these commands in your scripts.  

does not sound like the apt command is the preferred tool for a script
like apticron. Maybe if apticron's developers contacted the apt
development team, they could reassure them that this part of the cli is
no subject for changes, though.

Reply via email to