| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | # A complex script that creates a repository of deltas, that can be |
| 6 | # used by debdelta-upgrade for upgrading packages. |
| 7 | # See also --help below. |
| 8 | |
| 9 | # Copyright (C) 2006-11 Andrea Mennucci. |
| 10 | # License: GNU Library General Public License, version 2 or later |
| 11 | |
| 12 | #since the output is automatically parsed, do it in English |
| 13 | unset LANG |
| 14 | unset LC_ALL |
| 15 | unset LC_NUMERIC |
| 16 | |
| 17 | startgpgagentscip-shell shell debdelta 0.70+nmu2 startgpgagent(). () { |
| 18 | gpg-agentscip-shell system . . gpg-agent. --homedir "${GNUPGHOME}" --daemon --write-env-file "$GNUPGAGENTINFO" ; |
| 19 | } |
| 20 | |
| 21 | |
| 22 | DEBUG='' |
| 23 | VERBOSE='' |
| 24 | RM='rm' |
| 25 | MV='mv' |
| 26 | DO_MIRROR=true |
| 27 | DO_CLEAN_DELTAS='' |
| 28 | DO_CLEAN_DEBS='' |
| 29 | CONF='' |
| 30 | STARTAGENT='' |
| 31 | while [scip-shell system . . `[`. "$1" ] ; do |
| 32 | case "$1" in |
| 33 | -h|--help) |
| 34 | catscip-shell system . . cat. <<EOF |
| 35 | Usage: debmirror-marshal-deltas [options] -c CONFFILE |
| 36 | |
| 37 | This script keeps a full mirror of the Debian repository (using |
| 38 | 'debmirror'), and it uses it to build a repository of deltas (using |
| 39 | 'debdeltas'). |
| 40 | |
| 41 | Note that this script assumes that the current Debian |
| 42 | distributions are $DISTc . |
| 43 | It will generate deltas for the upgrades in those, |
| 44 | on arches $ARCHc , and sections $SECTIONc . |
| 45 | |
| 46 | Options: |
| 47 | |
| 48 | -v verbose (passed to debmirror and debdeltas) |
| 49 | -d debug (passed to debmirror and debdeltas), |
| 50 | also, do not 'rm' stuff, just tell |
| 51 | -c CONF configuration file |
| 52 | --no-mirror do not download debs to the local mirror |
| 53 | --clean-deltas clean useless deltas (see debdeltas man page) |
| 54 | --clean-debs clean older snapshots in deb mirror |
| 55 | --start-gpg-agent start gpg agent, feed the |
| 56 | passwd for the secret gpg key in it, then exit |
| 57 | EOF |
| 58 | exit ;; |
| 59 | -v) VERBOSE="$VERBOSE -v" ;; |
| 60 | -d) DEBUG=--debug ; RM='echo -- would rm ' ; MV='echo -- would mv ' ;; |
| 61 | -c) shift; CONF="$1" ;; |
| 62 | --no-mirror) DO_MIRROR='' ;; |
| 63 | --clean-deltas) DO_CLEAN_DELTAS=true ;; |
| 64 | --clean-debs) DO_CLEAN_DEBS=true ;; |
| 65 | --snapshot) echoscip-shell system . . echo. $0 does not use its own snapshots any more ; exit ;; |
| 66 | --start-gpg-agent) STARTAGENT=true ;; |
| 67 | *) echoscip-shell system . . echo. "$0: Unknown option $1 , try --help" ; exit 1 ;; |
| 68 | esac |
| 69 | shift |
| 70 | done |
| 71 | |
| 72 | ################## read configuration |
| 73 | |
| 74 | if testscip-shell system . . test. "$CONF" = "" ; then |
| 75 | echoscip-shell system . . echo. "please specify a configuration file" |
| 76 | exit 1 |
| 77 | fi |
| 78 | if testscip-shell system . . test. ! -r "$CONF" ; then |
| 79 | echoscip-shell system . . echo. "cannot read configuration file: $CONF" |
| 80 | exit 1 |
| 81 | fi |
| 82 | |
| 83 | . "$CONF" |
| 84 | |
| 85 | ################# |
| 86 | |
| 87 | if testscip-shell system . . test. "$STARTAGENT" ; then |
| 88 | echoscip-shell system . . echo. ------ start agent |
| 89 | startgpgagentscip-shell shell debdelta 0.70+nmu2 startgpgagent(). |
| 90 | . "$GNUPGAGENTINFO" |
| 91 | export GPG_AGENT_INFO |
| 92 | #force loading of the private key (I know no better way) |
| 93 | echoscip-shell system . . echo. ------ sign dummy file, to load the key |
| 94 | t=`tempfilescip-shell system . . tempfile.` |
| 95 | echoscip-shell system . . echo. pippo > $t |
| 96 | gpg2 --quiet --homedir "${GNUPGHOME}" -o /dev/nullscip-shell filesystem . . `/dev/null`. --sign $t |
| 97 | rmscip-shell system . . rm. $t |
| 98 | exit 0 |
| 99 | fi |
| 100 | |
| 101 | #################### set gpg stuff, test it |
| 102 | |
| 103 | |
| 104 | |
| 105 | gpgagentcmd="$0 -c $CONF --start-gpg-agent" |
| 106 | |
| 107 | # set gpg-agent variables, test it |
| 108 | if testscip-shell system . . test. "$GNUPGAGENTINFO" ; then |
| 109 | if testscip-shell system . . test. ! -r "$GNUPGAGENTINFO" ; then |
| 110 | echoscip-shell system . . echo. ERROR no agent info, please start the agent with |
| 111 | echoscip-shell system . . echo. $gpgagentcmd |
| 112 | exit 1 |
| 113 | else |
| 114 | . "$GNUPGAGENTINFO" |
| 115 | export GPG_AGENT_INFO |
| 116 | if testscip-shell system . . test. ! "${GPG_AGENT_INFO}" -o ! -e "${GPG_AGENT_INFO/:*/}" -o ! -O "${GPG_AGENT_INFO/:*/}" ; then |
| 117 | echoscip-shell system . . echo. ERROR agent info is not OK, please run the command |
| 118 | echoscip-shell system . . echo. $gpgagentcmd |
| 119 | exit 1 |
| 120 | elif ! echoscip-shell system . . echo. | gpg-connect-agentscip-shell system . . gpg-connect-agent. --homedir ${GNUPGHOME} ; then |
| 121 | echoscip-shell system . . echo. ERROR agent is not responding, please run the command |
| 122 | echoscip-shell system . . echo. $gpgagentcmd |
| 123 | exit 1 |
| 124 | fi |
| 125 | fi |
| 126 | fi |
| 127 | |
| 128 | |
| 129 | #test that we can sign, possibly loading the password in the agent |
| 130 | if testscip-shell system . . test. "$GNUPGSEC" ; then |
| 131 | t=`tempfilescip-shell system . . tempfile.` |
| 132 | echoscip-shell system . . echo. pippo > $t |
| 133 | if ! gpg2 --quiet --batch --homedir "${GNUPGHOME}" -o /dev/nullscip-shell filesystem . . `/dev/null`. --default-key $GNUPGSEC --sign $t ; |
| 134 | then |
| 135 | echoscip-shell system . . echo. signature test FAILED |
| 136 | rmscip-shell system . . rm. $t |
| 137 | exit 1 |
| 138 | fi |
| 139 | rmscip-shell system . . rm. $t |
| 140 | fi |
| 141 | |
| 142 | ###################### some useful variables |
| 143 | |
| 144 | #the lock used by debmirror |
| 145 | debmirlock=$debmir/Archive-Update-in-Progress-`hostnamescip-shell system . . hostname. -f` |
| 146 | |
| 147 | b=`basenamescip-shell system . . basename. $0` |
| 148 | |
| 149 | mylockfile=${TMPDIR:-/tmp}/$b.lock |
| 150 | lockfile -r 10 $mylockfile || exit 1 |
| 151 | trap "rm $VERBOSE -f $mylockfile" 0 |
| 152 | |
| 153 | log=/nonexistantscip-shell filesystem . . `/nonexistant`. |
| 154 | |
| 155 | ## profile debdeltas |
| 156 | #debdeltas="python -m cProfile -o /tmp/debdelta-profile-$(dirname $p | tr / _ ) $debdeltas" |
| 157 | |
| 158 | today=`datescip-shell system . . date. +'%F'` |
| 159 | yyyymm=`datescip-shell system . . date. +'%Y-%m'` |
| 160 | |
| 161 | ################## routines |
| 162 | |
| 163 | |
| 164 | |
| 165 | clean_old_deltasscip-shell shell debdelta 0.70+nmu2 clean_old_deltas(). () { |
| 166 | findscip-shell system . . find. $deltamir/pool \ |
| 167 | \( -name '*debdelta-fails' -or -name '*debdelta-too-big' \ |
| 168 | -or -name '*debdelta' \) -mtime +${old_delete_days} -type f |\ |
| 169 | xargs -r $RM $VERBOSE || truescip-shell system . . true. |
| 170 | |
| 171 | findscip-shell system . . find. $deltamir/pool/ -type d -empty | xargsscip-shell system . . xargs. -r rmdir $VERBOSE || truescip-shell system . . true. |
| 172 | } |
| 173 | |
| 174 | |
| 175 | |
| 176 | run_debmirrorscip-shell shell debdelta 0.70+nmu2 run_debmirror(). () { |
| 177 | if testscip-shell system . . test. -e $debmirlock ; then |
| 178 | echoscip-shell system . . echo. Archive $debmir is locked |
| 179 | exit 1 |
| 180 | fi |
| 181 | |
| 182 | echoscip-shell system . . echo. -n "---start mirroring at " >> $log ; datescip-shell system . . date. --utc >> $log |
| 183 | |
| 184 | tm=`tempfilescip-shell system . . tempfile.` |
| 185 | tme=`tempfilescip-shell system . . tempfile.` |
| 186 | |
| 187 | $debmirror $debmir --nosource \ |
| 188 | $debmirror_opt --arch=$ARCHc \ |
| 189 | --section=$SECTIONc \ |
| 190 | -v $DEBUG -h $host -d $DISTc \ |
| 191 | > $tm 2> $tme ; dme=$? |
| 192 | |
| 193 | if testscip-shell system . . test. "$dme" != 0 ; then |
| 194 | echoscip-shell system . . echo. debmirror failed , exit code $dme , stdout $tm |
| 195 | awkscip-shell system . . awk. '{ print "> " $0 }' $tm |
| 196 | echoscip-shell system . . echo. debmirror failed stderr $tme |
| 197 | awkscip-shell system . . awk. '{ print "> " $0 }' $tme |
| 198 | $RM -f $debmirlock || truescip-shell system . . true. |
| 199 | #sometimes the temporary directory of debmirror is messed up |
| 200 | #rm -r $debmir/.temp |
| 201 | clean_old_deltasscip-shell shell debdelta 0.70+nmu2 clean_old_deltas(). |
| 202 | rmscip-shell system . . rm. $log |
| 203 | exit 1 |
| 204 | else |
| 205 | $RM $VERBOSE $tm $tme |
| 206 | fi |
| 207 | echoscip-shell system . . echo. -n "---end mirroring at " >> $log ; datescip-shell system . . date. --utc >> $log |
| 208 | } |
| 209 | |
| 210 | |
| 211 | |
| 212 | findmelogscip-shell shell debdelta 0.70+nmu2 findmelog(). () { |
| 213 | date=`datescip-shell system . . date. +'%F-%H'` |
| 214 | log=$deltamir/log/$yyyymm/${date}.log |
| 215 | if testscip-shell system . . test. -r $log -o -r $log.gz ; then |
| 216 | for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z ; do |
| 217 | if testscip-shell system . . test. -r $log -o -r $log.gz ; then |
| 218 | log=$deltamir/log/$yyyymm/${date}.$i.log |
| 219 | fi |
| 220 | done |
| 221 | fi |
| 222 | } |
| 223 | |
| 224 | created_deltas=0 |
| 225 | |
| 226 | run_debdeltasscip-shell shell debdelta 0.70+nmu2 run_debdeltas(). () { |
| 227 | debdeltas_errors=0 |
| 228 | echoscip-shell system . . echo. -n "--------- running debdeltas ------" >> $log ; datescip-shell system . . date. --utc >> $log ; |
| 229 | echoscip-shell system . . echo. "---- options ---- $debdelta_opt " >> $log |
| 230 | for dist in $DISTs ; do |
| 231 | dist_created_deltas=0 |
| 232 | distlog=`tempfilescip-shell system . . tempfile.` |
| 233 | #find latest |
| 234 | pushd $debmir/dists/$dist/ > /dev/nullscip-shell filesystem . . `/dev/null`. |
| 235 | latest=$(echoscip-shell system . . echo. [0-9] [0-9][0-9] [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] \ |
| 236 | | tr ' ' '\n' | sort -n | tail -n 1) |
| 237 | let prev=latest || truescip-shell system . . true. |
| 238 | while testscip-shell system . . test. "$prev" -gt 1 && cmpscip-shell system . . cmp. -s Release $prev/Release ; do |
| 239 | let prev=prev-1 || truescip-shell system . . true. |
| 240 | done |
| 241 | popd > /dev/nullscip-shell filesystem . . `/dev/null`. |
| 242 | echoscip-shell system . . echo. -------------- $dist ---- >> $distlog |
| 243 | echoscip-shell system . . echo. -n "---Release " >> $distlog ; grepscip-shell system . . grep. ^Date $debmir/dists/$dist/Release >> $distlog |
| 244 | echoscip-shell system . . echo. -n "---Start at " >> $distlog ; datescip-shell system . . date. --utc >> $distlog |
| 245 | #lenny contains debdelta 0.27, that does not understand lzma |
| 246 | if testscip-shell system . . test. "$dist" = lenny ; then x="--disable-feature lzma,xz" ; |
| 247 | #squeeze contains debdelta 0.39trl, that does not understand xz |
| 248 | elif testscip-shell system . . test. "$dist" = squeeze ; then x="--disable-feature xz" ; else x="" ; fi |
| 249 | for sec in $SECTIONs ; do for arch in $ARCHs ; do |
| 250 | sec_arch_dist_log=`tempfilescip-shell system . . tempfile.` |
| 251 | sec_arch_dist_err=`tempfilescip-shell system . . tempfile.` |
| 252 | wo="--old $debmir/dists/$dist/$prev/$sec/binary-$arch/Packages.gz" |
| 253 | if testscip-shell system . . test. "$dist" = squeeze-updates ; then |
| 254 | wo="$wo --old $debmir/dists/squeeze/$sec/binary-$arch/Packages.gz" |
| 255 | fi |
| 256 | OV=0 ; while testscip-shell system . . test. $OV -lt $prev ; do |
| 257 | if testscip-shell system . . test. -r $debmir/dists/$dist/$OV/$sec/binary-$arch/Packages.gz ; then |
| 258 | wo="$wo --old $debmir/dists/$dist/$OV/$sec/binary-$arch/Packages.gz" |
| 259 | fi |
| 260 | let OV=OV+10 |
| 261 | done |
| 262 | echoscip-shell system . . echo. "------ $sec $arch -- (debdelta options += $x $wo )" >> $sec_arch_dist_log |
| 263 | if $debdeltas $VERBOSE $debdelta_opt $x $wo --dir $deltamir// \ |
| 264 | $debmir/dists/$dist/$sec/binary-$arch/Packages.gz >> $sec_arch_dist_log 2>> $sec_arch_dist_err ; then |
| 265 | #todo, only write if something happened |
| 266 | catscip-shell system . . cat. $sec_arch_dist_log >> $distlog |
| 267 | else |
| 268 | debdeltas_errors=$? |
| 269 | catscip-shell system . . cat. $sec_arch_dist_log >> $distlog |
| 270 | echoscip-shell system . . echo. "--- debdeltas failed above, ret = ${debdeltas_errors}" >> $distlog |
| 271 | echoscip-shell system . . echo. "--- debdeltas failed on $dist $sec $arch" |
| 272 | fi |
| 273 | if testscip-shell system . . test. -s "$sec_arch_dist_err" ; then |
| 274 | debdeltas_errors=11111 #make sure we keep this log |
| 275 | echoscip-shell system . . echo. "--- debdeltas stderr " >> $distlog |
| 276 | catscip-shell system . . cat. $sec_arch_dist_err >> $distlog |
| 277 | echoscip-shell system . . echo. "--- end of debdeltas stderr " >> $distlog |
| 278 | echoscip-shell system . . echo. "--- debdeltas produced stderr on $dist $sec $arch" |
| 279 | fi |
| 280 | rmscip-shell system . . rm. $sec_arch_dist_log $sec_arch_dist_err |
| 281 | done ; done |
| 282 | |
| 283 | if grepscip-shell system . . grep. -v '^ Total running time' $distlog | grepscip-shell system . . grep. -v '^---' | grepscip-shell system . . grep. -q '.' ; then |
| 284 | let created_deltas=created_deltas+1 |
| 285 | dist_created_deltas=1 |
| 286 | fi |
| 287 | if testscip-shell system . . test. "${debdeltas_errors}" -gt 0 -o "${dist_created_deltas}" -gt 0 ; then |
| 288 | #only log distributions stanzas when some deltas were generated, or errors occourred |
| 289 | catscip-shell system . . cat. $distlog >> $log |
| 290 | if testscip-shell system . . test. "${publish_deltas}" ; then |
| 291 | echoscip-shell system . . echo. -n "--- publishing starts at " >> $log ; datescip-shell system . . date. --utc >> $log |
| 292 | if ${publish_deltas} ; then |
| 293 | echoscip-shell system . . echo. -n "--- publishing ends at " >> $log ; datescip-shell system . . date. --utc >> $log |
| 294 | else |
| 295 | echoscip-shell system . . echo. -n "--- publishing FAILS, at " >> $log ; datescip-shell system . . date. --utc >> $log |
| 296 | echoscip-shell system . . echo. "--- publishing FAILS" |
| 297 | fi |
| 298 | fi |
| 299 | #else |
| 300 | # echo SKIPPED THIS STANZA ; cat $distlog |
| 301 | fi |
| 302 | rmscip-shell system . . rm. $distlog |
| 303 | done |
| 304 | gzipscip-shell system . . gzip. -9 $log |
| 305 | if testscip-shell system . . test. "$debdeltas_errors" -gt 0 ; then |
| 306 | #some error occurred |
| 307 | echoscip-shell system . . echo. "-----ERRORS--- full log is in $log.gz " |
| 308 | else |
| 309 | #no error occurred, clean up |
| 310 | if testscip-shell system . . test. "$created_deltas" = 0 ; then |
| 311 | $RM $log.gz |
| 312 | fi |
| 313 | fi |
| 314 | } |
| 315 | |
| 316 | |
| 317 | run_debdeltas_cleanscip-shell shell debdelta 0.70+nmu2 run_debdeltas_clean(). () { |
| 318 | echoscip-shell system . . echo. -------------- cleanup delta pool |
| 319 | $debdeltas --clean-deltas -n 0 \ |
| 320 | --dir $deltamir// \ |
| 321 | $( for arch in $ARCHs ; do |
| 322 | for sec in $SECTIONs ; do |
| 323 | for discip-shell system . . echo.st in $DISTs ; do |
| 324 | echo $debmir/dists/$dist/$sec/binary-$arch/Packages.gz |
| 325 | done ; done ; done ) |
| 326 | } |
| 327 | |
| 328 | |
| 329 | debmarshal_trim_snapshotsscip-shell shell debdelta 0.70+nmu2 debmarshal_trim_snapshots(). () |
| 330 | { |
| 331 | rectcode=1 |
| 332 | for dist in $DISTs ; do |
| 333 | pushd $debmir/dists/$dist/ > /dev/nullscip-shell filesystem . . `/dev/null`. |
| 334 | #act only if there are at least 3 snapshots |
| 335 | if testscip-shell system . . test. -d 0 -a -d 1 -a -d 3 ; then |
| 336 | latest=$(echoscip-shell system . . echo. [0-9] [0-9][0-9] [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] \ |
| 337 | | tr ' ' '\n' | sort -n | tail -n 1) |
| 338 | #check sanity |
| 339 | sane=1 ; t=0 ; f=1 ; |
| 340 | while testscip-shell system . . test. "$f" -le "$latest" ; do |
| 341 | if testscip-shell system . . test. ! -d "$f" ; then |
| 342 | echoscip-shell system . . echo. "Warning, ignoring $debmir/dists/$dist , the snapshot $f does not exist" |
| 343 | sane=0 |
| 344 | elif testscip-shell system . . test. $t -nt $f ; then |
| 345 | echoscip-shell system . . echo. "Warning, ignoring $debmir/dists/$dist , the snapshot $f is older than the $t " |
| 346 | sane=0 |
| 347 | fi |
| 348 | let f++ ; let t++ ; |
| 349 | done |
| 350 | # if sane and too many snapshots, move all down a step |
| 351 | if testscip-shell system . . test. "$sane" = 1 -a "$keep_marshal_snapshots" -a "$latest" -gt "$keep_marshal_snapshots" ; then |
| 352 | retcode=0 |
| 353 | let d=latest-keep_marshal_snapshots |
| 354 | t=0 |
| 355 | #remove older |
| 356 | while testscip-shell system . . test. "$t" -le "$d" -a -d "$d" ; do $RM -r $t ; let t++ ; done |
| 357 | #move down others |
| 358 | t=0 |
| 359 | let f=d+1 |
| 360 | while testscip-shell system . . test. "$f" -le "$latest" ; do |
| 361 | $MV $f $t |
| 362 | let t++ |
| 363 | let f++ |
| 364 | done |
| 365 | let t-- |
| 366 | rmscip-shell system . . rm. latest |
| 367 | lnscip-shell system . . ln. -s $t latest |
| 368 | echoscip-shell system . . echo. "------------ deleted revisions from 0 to $d in $dist (latest now points to $t)" |
| 369 | fi # end of " if sane and too many snapshots" |
| 370 | fi #end of "if at least 3 snapshots" |
| 371 | popd > /dev/nullscip-shell filesystem . . `/dev/null`. |
| 372 | done |
| 373 | return $retcode |
| 374 | } |
| 375 | |
| 376 | clean_old_debsscip-shell shell debdelta 0.70+nmu2 clean_old_debs(). () { |
| 377 | if testscip-shell system . . test. -e $debmirlock ; then |
| 378 | echoscip-shell system . . echo. Archive $debmir is locked |
| 379 | exit 1 |
| 380 | fi |
| 381 | echoscip-shell system . . echo. -------------- cleanup mirror |
| 382 | if debmarshal_trim_snapshotsscip-shell shell debdelta 0.70+nmu2 debmarshal_trim_snapshots(). ; then |
| 383 | z=`tempfilescip-shell system . . tempfile.` |
| 384 | ${debmarshal_list_useless_debs} $debmir > $z |
| 385 | ! grepscip-shell system . . grep. -vx '.*\.deb' $z #(just in case) |
| 386 | n=$(wcscip-shell system . . wc. -l < $z) |
| 387 | if testscip-shell system . . test. $n -lt $max_delete ; then |
| 388 | echoscip-shell system . . echo. "--- delete $n debs" |
| 389 | trscip-shell system . . tr. '\n' '\000' < $z | xargsscip-shell system . . xargs. -r0 $RM |
| 390 | rmscip-shell system . . rm. $z |
| 391 | else |
| 392 | echoscip-shell system . . echo. "--- will not delete $n debs (too many!), the list is in $z" |
| 393 | fi |
| 394 | fi |
| 395 | } |
| 396 | |
| 397 | |
| 398 | ########################################### code |
| 399 | |
| 400 | |
| 401 | if testscip-shell system . . test. `statscip-shell system . . stat. -f -c "%a" "$deltamir"` -le 512 ; then |
| 402 | echoscip-shell system . . echo. "------- emergency delta pool cleanup , very low disk space in delta mirror" |
| 403 | run_debdeltas_cleanscip-shell shell debdelta 0.70+nmu2 run_debdeltas_clean(). |
| 404 | clean_old_deltasscip-shell shell debdelta 0.70+nmu2 clean_old_deltas(). |
| 405 | elif testscip-shell system . . test. "${DO_CLEAN_DELTAS}" ; then |
| 406 | run_debdeltas_cleanscip-shell shell debdelta 0.70+nmu2 run_debdeltas_clean(). |
| 407 | clean_old_deltasscip-shell shell debdelta 0.70+nmu2 clean_old_deltas(). |
| 408 | fi |
| 409 | |
| 410 | if testscip-shell system . . test. `statscip-shell system . . stat. -f -c "%a" "$debmir"` -le 512 ; then |
| 411 | echoscip-shell system . . echo. "------- emergency debs pool cleanup , very low disk space in debs mirror" |
| 412 | clean_old_debsscip-shell shell debdelta 0.70+nmu2 clean_old_debs(). |
| 413 | elif testscip-shell system . . test. "${DO_CLEAN_DEBS}" ; then |
| 414 | clean_old_debsscip-shell shell debdelta 0.70+nmu2 clean_old_debs(). |
| 415 | fi |
| 416 | |
| 417 | |
| 418 | testscip-shell system . . test. -d $deltamir/log/$yyyymm || mkdirscip-shell system . . mkdir. $deltamir/log/$yyyymm |
| 419 | |
| 420 | findmelogscip-shell shell debdelta 0.70+nmu2 findmelog(). |
| 421 | |
| 422 | if [scip-shell system . . `[`. "${DO_MIRROR}" ] ; then |
| 423 | run_debmirrorscip-shell shell debdelta 0.70+nmu2 run_debmirror(). |
| 424 | else |
| 425 | echoscip-shell system . . echo. ---------- skipped mirror step |
| 426 | fi |
| 427 | |
| 428 | #the mirror was updated, so we check the difference |
| 429 | run_debdeltasscip-shell shell debdelta 0.70+nmu2 run_debdeltas(). |