Implement duplicate queue list deletion.

This patch makes sure that the loaded queue list gets
delete before beginning the loading operations.
Without this patch, the sequence:
- load queue 'foo'
- clear the queue
- load queue 'foo' again
results in an empty queue, since on the second load 'foo'
gets skipped since it's listed as already loaded.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
This commit is contained in:
mauro.giachero 2009-06-10 07:39:24 +00:00
parent acc41bec1c
commit 0d7e600ae9

View file

@ -1735,8 +1735,12 @@ parse_queue() {
local DUPEQUEUE=$SBOPKGTMP/sbopkg-duplicate-queue
local MISSING_LIST_FILE=$SBOPKGTMP/sbopkg_addall_missing
local FILE=$1
local NODELETE=$2
local PICK
if [[ $NODELETE != "NODELETE" ]]; then
rm -f $DUPEQUEUE
fi
if [[ ! -e $DUPEQUEUE ]]; then
> $DUPEQUEUE
fi
@ -1798,7 +1802,7 @@ add_item_to_queue() {
FILE="$QUEUEDIR/$APP"
fi
if [[ -r $FILE ]]; then
parse_queue $FILE
parse_queue $FILE NODELETE
else
return 1
fi