Public bug reported:

Binary package hint: scons

"6.1.4. Writing Your Own Custom Decider Function" reads:

        Program('hello.c')
        def decide_if_changed(dependency, target, prev_ni):
            if self.get_timestamp() != prev_ni.timestamp:  # <======== self???
                dep = str(dependency)
                tgt = str(target)
                if specific_part_of_file_has_changed(dep, tgt):
                    return True
            return False
        Decider(decide_if_changed)
 
where on Earth does "self" come from?

What is the object whose method the decider function becomes?
What functions will the decider likely invoke? (Don't write "any Python", name 
some useful ones.)

When does the MD5 signature get calculated? Will it be calculated if
it's not used?

If I want to program CRC32 checking, where do I store it?

If my file is consists of several section and I want to track MD5 hashes of 
these sections
separately, where and how do I store these MD5 hashes?

Expected: an example that works.
Actual: the example is out of context and cannot work.

(In fact, some suggestions may be derived from
http://codesearch.google.com/codesearch/p?hl=en#hfE6470xZHk/third_party/scons/scons-local/SCons/Node/FS.py&q=changed_timestamp_match%20lang:python&sa=N&cd=1&ct=rc&l=2833
but explanation should be the docs).

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: scons 2.0.0-1
ProcVersionSignature: Ubuntu 2.6.35-27.48-generic 2.6.35.11
Uname: Linux 2.6.35-27-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Thu Mar 10 19:18:49 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: scons

** Affects: scons (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug maverick

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/732695

Title:
  docs inconsistent in 6.1.4. Writing Your Own Custom Decider Function

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to