Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172543 - sys-devel/prelink - cronjob deletes manually-prelinked cache
Summary: sys-devel/prelink - cronjob deletes manually-prelinked cache
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 10:33 UTC by Antti Mäkelä
Modified: 2007-03-30 05:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Mäkelä 2007-03-28 10:33:04 UTC
I hadn't even noticed that prelink, after an update, installed a cronjob. My updating procedure has usually consisted, after emerge -uvDaN world && emerge --depclean && revdep-rebuild of prelinking with prelink -avmR.

I was wondering, why after every world-run, even if only a few packages got updated my prelink went through the entire system. Then I found this cronjob:

----
if [ "$PRELINKING" != yes ]; then
  if [ -f /etc/prelink.cache ]; then
    echo /usr/sbin/prelink -uav > /var/log/prelink.log
    /usr/sbin/prelink -uav >> /var/log/prelink.log 2>&1 \
      || echo Prelink failed with return value $? >> /var/log/prelink.log
    rm -f /etc/prelink.cache
    # Restart init if needed
    [ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
  fi
  exit 0
fi
----

 and then read description at conf.d/prelink

----
# Set this to no to disable prelinking altogether
# (if you change this from yes to no prelink -ua
# will be run next night to undo prelinking)
PRELINKING=no
---

 Checked documentation at http://www.gentoo.org/doc/en/prelink-howto.xml

----
sys-devel/prelink-20060213 and later install a cron job in /etc/cron.daily/prelink. To enable it, edit the configuration file /etc/conf.d/prelink. This will run prelink daily in the background, as needed, saving you running the command manually.
-----

Now, the way I'm understanding the docs, the *intended* functionality is that you can still run prelink manually instead of cron un-prelinking everything at next cron-run. Why is there the "prelink -uav"?

Right now I deleted the entire cronscript, but maybe the conf.d/prelink should contain a third value "manual", which would be the default - so it wouldn't automatically prelink or un-prelink..I don't want to remember to remove the cronscript everytime prelink gets updated.
Comment 1 Boney McCracker 2007-03-28 17:35:41 UTC
A second user's perspective.  I like this scrpt!  But I do concur.  I initially went through the same thought process (although for me it was right after install, when I read the elog notice in my email).  

One of these two things should be:

either (a) 3 branches in the script: off, manual, and automatic;
or (b) the script should be initially installed commented out

Also, many thanks for fixing the kde lines already! :)
Comment 2 SpanKY gentoo-dev 2007-03-30 05:57:36 UTC
added to cvs, thanks for the idea !

# Control prelinking behavior in the cronjob.
#  yes - automatically prelink the system
#  no  - automatically un-prelink the system
#  ""  - do nothing at all (user manages)
# (if you change this from yes to no prelink -ua
# will be run next night to undo prelinking)
PRELINKING=""