Fix a long standing bug preventing the chosen MTA to be used and improve

some comments
This commit is contained in:
Pierre Labastie 2015-11-23 14:14:23 +00:00
parent cf8e0607a8
commit 7ac11f0671

View file

@ -64,10 +64,15 @@ generate_dependency_tree() { #
input vars: $1 : file with a list of targets (child nodes) input vars: $1 : file with a list of targets (child nodes)
the first line of the file is the link the first line of the file is the link
$2 : priority (1=req, 2=rec, 3=opt) $2 : priority (1=req, 2=rec, 3=opt)
externals: vars: DEP_LEVEL contains the 1 if we want to build the externals: vars: DEP_LEVEL contains 1 if we want to build the
tree only for required dependencies, tree only for required dependencies,
2 if we want also recommended ones, 2 if we want also recommended ones,
and 3 if we want optional ones too. and 3 if we want optional ones too.
MAIL_SERVER contains the name of the MTA we want to use.
files: ../xsl/dependencies.xsl: stylesheet for creating the
.dep files
../packages.xml: Files containing packages id
and dependencies
returns: 0 if the tree has been successfully created returns: 0 if the tree has been successfully created
1 if we are backing up to the parent of a circular dep 1 if we are backing up to the parent of a circular dep
modifies: vars: exchange_triplet contains the triplet when return is 1 modifies: vars: exchange_triplet contains the triplet when return is 1
@ -149,7 +154,7 @@ esac
return $priority return $priority
fi fi
else # not circular: prune tree (but not .odep, since it may happen that else # not circular: prune tree (but not .odep, since it may happen that
# the tree is destroyed and rebuilt in another order # the tree is destroyed and rebuilt in another order)
lines_to_remove="$lines_to_remove $id_of_dep" lines_to_remove="$lines_to_remove $id_of_dep"
fi # circular or not fi # circular or not
continue # this dependency has already been seen, and the associated continue # this dependency has already been seen, and the associated
@ -164,6 +169,7 @@ esac
if [ ! -f "${id_of_dep}.odep" ]; then if [ ! -f "${id_of_dep}.odep" ]; then
xsltproc --stringparam dependencies ${dep_level} \ xsltproc --stringparam dependencies ${dep_level} \
--stringparam idofdep $id_of_dep \ --stringparam idofdep $id_of_dep \
--stringparam MTA $MAIL_SERVER \
-o ${id_of_dep}.odep \ -o ${id_of_dep}.odep \
../xsl/dependencies.xsl ../packages.xml ../xsl/dependencies.xsl ../packages.xml
fi fi