Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126843 - baselayout-1.11.x depscan.sh incorrectly checks for changed scripts
Summary: baselayout-1.11.x depscan.sh incorrectly checks for changed scripts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 127419 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-19 11:27 UTC by John Waymouth
Modified: 2006-04-18 16:46 UTC (History)
1 user (show)

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 John Waymouth 2006-03-19 11:27:53 UTC
I've found that changing the depend statement in a hand-rolled init script and then running depscan.sh doesn't seem to pick up the change.  Depscan.sh seems not to check for changed scripts correctly.  Here's the relavent section from the script:

# Only update if files have actually changed
if ! ${update} ; then
        for config in /etc/conf.d /etc/init.d /etc/rc.conf ; do
                if [[ ${config} -nt "${mysvcdir}/depcache" ]] ; then
                        update=true     
                        break
                fi
        done
fi

This checks if the directory init.d itself is newer than the depcache file.  The directory's modified time will only update when a new script is added to /etc/init.d, not when an existing one is changed.  I don't think this was the intent when this was written, or if it is, it's rather stupid.

The fix is simple, just change the for line to this:

        for config in /etc/conf.d/* /etc/init.d/* /etc/rc.conf ; do

My installed baselayout version is 1.11.14-r6.

Also of note, before I fixed this bug on my system, whenever I ran my initscript with the "ineed" parameter to test my dependency changes, I got this message:

 * Re-caching dependency info (mtimes differ)...

but it didn't actually seem to recache.
Comment 1 SpanKY gentoo-dev 2006-03-19 19:18:18 UTC
this has been fixed in 1.12 and newer already
Comment 2 John Waymouth 2006-03-19 19:21:53 UTC
Neato.  I didn't check, it's masked.  Incidentally, I think we went to the same college.
Comment 3 SpanKY gentoo-dev 2006-03-21 19:33:37 UTC
back ported the current code from trunk to the 1.11.x branch
Comment 4 SpanKY gentoo-dev 2006-04-18 16:46:20 UTC
*** Bug 127419 has been marked as a duplicate of this bug. ***