Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mantis 0001645: Removed output of mkpatidx from APT::Update conf #10

Merged
merged 1 commit into from Dec 21, 2016

Conversation

lucagiove
Copy link
Contributor

Because of mkaptidx the /etc/cron.daily/apt script has standard output
that cause a daily mail notification.

Related issues:
http://bugtracker.openmediavault.org/view.php?id=1645
http://bugtracker.openmediavault.org/view.php?id=1334

Because of mkaptidx the /etc/cron.daily/apt script has standard output
that cause a daily mail notification.
@lucagiove
Copy link
Contributor Author

I left stderr so that error can be reported via mail instead

@votdev
Copy link
Member

votdev commented Dec 20, 2016

The cron-apt job is executed daily, so you should always get an email notification, regardless if omv-mkaptidx prints output or not.

@lucagiove
Copy link
Contributor Author

Yes but this mail is not generated by cron-apt but from /etc/cron.daily/apt
At line 439:
if eval apt-get $XAPTOPT -y update $XSTDERR; then
Executes apt-get update that executes mkaptidx in APT::Update::Post-Invoke-Success

@votdev
Copy link
Member

votdev commented Dec 21, 2016

With your patch no output is done in any case, e.g. when you do a 'apt-get update' in the console. This is not wanted, omv-mkaptidx should tell the user what he is doing.

@votdev votdev merged commit 08a0209 into openmediavault:master Dec 21, 2016
@votdev
Copy link
Member

votdev commented Dec 21, 2016

Due the fact that there is no other option to prevent this output i have accepted this PR. But i think this is a bug in apt-get because it should take care that, if option -q is set, the output of all child processes (e.g. Post-Invoke scripts) is suppressed.

@lucagiove
Copy link
Contributor Author

Maybe we could read the verbosity and set accordingly the redirection like in the /etc/cron.d/apt script itself but not sure whether it's worth...

# Set VERBOSE mode from  apt-config (or inherit from environment)
VERBOSE=0
eval $(apt-config shell VERBOSE APT::Periodic::Verbose)
debug_echo "verbose level $VERBOSE"
if [ "$VERBOSE" -le 2 ]; then
    # quiet for 0,1,2
    XSTDOUT=">/dev/null"
    XSTDERR="2>/dev/null"
    XAPTOPT="-qq"
    XUUPOPT=""
else
    XSTDOUT=""
    XSTDERR=""
    XAPTOPT=""
    XUUPOPT="-d"
fi
if [ "$VERBOSE" -ge 3 ]; then
    # trace output
    set -x
fi

@votdev
Copy link
Member

votdev commented Dec 21, 2016

Too much hassle for such a simple issue. And APT::Periodic::Verbose does not have anything to do with omv-mkaptidx.

@andocromn andocromn mentioned this pull request Aug 1, 2018
@Soliver84 Soliver84 mentioned this pull request Nov 22, 2020
@votdev votdev mentioned this pull request Nov 26, 2020
@qinfeiyang qinfeiyang mentioned this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants