[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] 2 commits: Allow a tasks file to clean the stages dir of any leftover marker.



Title: GitLab

Joerg Jaspert pushed to branch master at Debian FTP Team / dak

Commits:

2 changed files:

Changes:

  • config/debian/cronscript
    1 1
     #!/bin/bash
    
    2 2
     # No way I try to deal with a crippled sh just for POSIX foo.
    
    3 3
     
    
    4
    -# Copyright (C) 2009-2016 Joerg Jaspert <joerg@debian.org>
    
    4
    +# Copyright (C) 2009-2016, 2018 Joerg Jaspert <joerg@debian.org>
    
    5 5
     #
    
    6 6
     # This program is free software; you can redistribute it and/or
    
    7 7
     # modify it under the terms of the GNU General Public License as
    
    ... ... @@ -155,11 +155,16 @@ esac
    155 155
         #
    
    156 156
         # ATTENTION: Spaces in arguments or timestamp names need to be escaped by \
    
    157 157
         #
    
    158
    -    # NOTE 1: There are two special values for the first column (FUNC).
    
    158
    +    # NOTE 1: There are special values for the first column (FUNC).
    
    159 159
         #         STATE   - do not call stage function, call the state
    
    160 160
         #                   function to update the public statefile "where is dinstall"
    
    161 161
         #         NOSTAGE - do not call stage function, call the command directly.
    
    162
    -    #
    
    162
    +    #         RMSTAGE - clean out the stages directory, and as such
    
    163
    +    #                   the recording what already ran in an earlier cronscript.
    
    164
    +    #                   Note: Only really makes sense at beginning of a tasks file,
    
    165
    +    #                   the stages directory gets cleared at successful exit anyways.
    
    166
    +    #                   RMSTAGE simply ensures that ALL of the crons tasks ALWAYS run.
    
    167
    +
    
    163 168
         # Note 2: If you want to hand an empty value to the stage function,
    
    164 169
         #         use the word "none" in the list below.
    
    165 170
         while read FUNC ARGS TIME ERR BACKGROUND; do
    
    ... ... @@ -188,6 +193,11 @@ esac
    188 193
                 NOSTAGE)
    
    189 194
                     ${ARGS}
    
    190 195
                     ;;
    
    196
    +            RMSTAGE)
    
    197
    +                # Make sure we remove our stage files, so all the
    
    198
    +                # actions will be done again.
    
    199
    +                rm -f ${stagedir}/*
    
    200
    +                ;;
    
    191 201
                 *)
    
    192 202
                     GO=(
    
    193 203
                         FUNC=${FUNC}
    

  • config/deploy/deploy.tasks
    1 1
     # FUNC                 ARGS                       TIME           ERR     BG
    
    2
    +RMSTAGE                none                       none           true    false
    
    2 3
     fetch_updates          none                       none           true    false
    
    3 4
     NOSTAGE                find_commitids             none           true    false
    
    4 5
     check_commit_signature none                       none           true    false
    


  • Reply to: