[Piuparts-devel] Updated pull request - five-holger

Dave Steele dsteele at gmail.com
Thu May 23 00:45:20 UTC 2013


On Wed, May 22, 2013 at 8:23 PM, Andreas Beckmann <anbe at debian.org> wrote:
> On 2013-05-23 01:53, Dave Steele wrote:
>> 2dea977 dwke - Create the Section dir if not present.
>
>> -    [os.mkdir(x) for x in workdirs if not os.path.exists(x)]
>> +    [os.mkdir(x) for x in [sectiondir] + workdirs if not os.path.exists(x)]
>
> NACK!
>
> There is no guarantee that sectiondir is one-level, we explicitly
> support sections like "sid/main".
>
> Use
>
>   [os.makedirs(x) for x in workdirs if not os.path.exists(x)]
>
> but better: skip section if sectiondir does not exist - there are no
> logs, so nothing to do anyway.
>
>

Ok, updated

558efaa dwke - Skip section if Section dir is inaccessible.


commit 558efaad778069bf5cfec05e84c8a28b2b33e387
Author: David Steele <dsteele at gmail.com>
Date:   Wed May 22 20:36:43 2013 -0400

    dwke - Skip section if Section dir is inaccessible.

    detect_well_known_errors() was crashing during the daily run on days
    when a section was added (due to a return with the wrong number of
    arguments).

diff --git a/master-bin/detect_well_known_errors.py
b/master-bin/detect_well_known_erro
index bc91540..3dc0264 100755
--- a/master-bin/detect_well_known_errors.py
+++ b/master-bin/detect_well_known_errors.py
@@ -466,7 +466,7 @@ def process_section( section, config, problem_list,
     workdirs = [ os.path.join(sectiondir,x) for x in KPR_DIRS ]

     if not os.access( sectiondir, os.F_OK ):
-        return
+        raise MissingSection( "", section )

     [os.mkdir(x) for x in workdirs if not os.path.exists(x)]



More information about the Piuparts-devel mailing list