Commit 77ed84f4 authored by Lucas Moura's avatar Lucas Moura

Use update command instead of both init and train

parent 80af6eb0
Pipeline #3943378 failed with stage
in 55 seconds
// Update the package xapian database from the new index files
APT::Update::Post-Invoke { "[ ! -x /usr/bin/apprecommender ] || runuser -c 'apprec --init > /dev/null; apprec --train > /dev/null' apprec"; };
APT::Update::Post-Invoke { "[ ! -x /usr/bin/apprecommender ] || runuser -c 'apprec --update' apprec"; };
......@@ -15,15 +15,9 @@ if which on_ac_power >/dev/null 2>&1; then
[ "$ON_BATTERY" -eq 1 ] && exit 0
fi
run_apprec_init()
run_apprec_update()
{
runuser -s /bin/sh -c "/usr/bin/apprec --init" apprec
runuser -s /bin/sh -c "/usr/bin/apprec --update" apprec
}
run_apprec_train()
{
runuser -s /bin/sh -c "/usr/bin/apprec --train" apprec
}
run_apprec_init > /dev/null
run_apprec_train > /dev/null
run_apprec_update > /dev/null
debian/99apprecommender etc/apt/apt.conf.d/
99app-recommender etc/apt/apt.conf.d/
......@@ -18,8 +18,7 @@ chown -R apprec /var/lib/apprecommender 2>/dev/null ||
}
update-apt-xapian-index
runuser -c "apprec --init" apprec
runuser -c "apprec --train" apprec
runuser -c "apprec --update" apprec
#DEBHELPER#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment