Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Koch
dune-common
Commits
90146ed9
Commit
90146ed9
authored
14 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
ignore installed module, if a locally built version exists
[[Imported from SVN: r6057]]
parent
39883479
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/dunemodules.inc
+42
-13
42 additions, 13 deletions
bin/dunemodules.inc
with
42 additions
and
13 deletions
bin/dunemodules.inc
+
42
−
13
View file @
90146ed9
...
...
@@ -64,7 +64,7 @@ parse_control() {
exit
1
fi
# create and check variable name from module name
export
module_inst
=
""
export
module_inst
=
"
no
"
export
module
=
$
(
fix_variable_name
$name
)
# read dune.module file
local
deps
=
"$(echo $(
$GREP
"
^
[
$BLANK
]
*
Depends
:
" "
$
1
" | cut -d ':' -f2))"
...
...
@@ -79,10 +79,7 @@ parse_control() {
local
path
=
"$(canonicalpath "
$
1
")"
if
test
-
f
$path
/../../../
lib
/
dunecontrol
/
$
{
name
}
/
dune
.
module
;
then
path
=
$
(
canonicalname
"
$path
/../../../"
)
export
module_inst
=
"true"
export
INST_
$
{
module
}
=
yes
else
export
INST_
$
{
module
}
=
no
export
module_inst
=
"yes"
fi
if
!
check_modname
"
$module
"
;
then
echo
"ERROR:
$CONTROL
files $1 contains an invalid Module entry"
>&
2
...
...
@@ -90,12 +87,43 @@ parse_control() {
fi
# avoid multiple definition of the same module
if
test
"x$(eval echo
\$
HAVE_
$module
)"
!=
"x"
;
then
echo
"ERROR: multiple definition of module
$name
"
>&
2
echo
"previous defined in:"
>&
2
echo
" $(eval echo
\$
PATH_
$module
)/
$CONTROL
"
>&
2
echo
"redefined in:"
>&
2
echo
"
$path
/
$CONTROL
"
>&
2
exit
1
case
"$(eval echo
\$
INST_
$module
)
$module_inst
"
in
# multiple local modules are an error
# multiple installed modules are an error
nono
|
yesyes
)
echo
"ERROR: multiple definition of module
$name
"
>&
2
echo
"previous defined in:"
>&
2
if
test
"$(eval echo
\$
INST_
$module
)"
=
"yes"
;
then
echo
" $(eval echo
\$
PATH_
$module
)/lib/dunecontrol/${name}/
$CONTROL
"
>&
2
else
echo
" $(eval echo
\$
PATH_
$module
)/
$CONTROL
"
>&
2
fi
echo
"redefined in:"
>&
2
if
test
"
$module_inst
"
=
"yes"
;
then
echo
"
$path
/lib/dunecontrol/${name}/
$CONTROL
"
>&
2
else
echo
"
$path
/
$CONTROL
"
>&
2
fi
exit
1
;;
# installed modules are super seeded by locally built modules
noyes
)
echo
"WARNING: ignoring installed module file"
>&
2
echo
"
$path
/lib/dunecontrol/${name}/
$CONTROL
"
>&
2
echo
"using previously found locally built module"
>&
2
echo
" $(eval echo
\$
PATH_
$module
)/
$CONTROL
"
>&
2
export
module_inst
=
"no"
return
;;
# local modules super seed installed modules
yesno
)
echo
"WARNING: not using installed module file"
>&
2
echo
" $(eval echo
\$
PATH_
$module
)/lib/dunecontrol/${name}/
$CONTROL
"
>&
2
echo
"using locally built module"
>&
2
echo
"
$path
/
$CONTROL
"
>&
2
true
# do nothing, ignore the previously found module
;;
esac
fi
# set status variables
export
HAVE_
$
{
module
}
=
yes
...
...
@@ -104,6 +132,7 @@ parse_control() {
export
NAME_
$
{
module
}
=
"
$name
"
export
MAIN_
$
{
module
}
=
"
$main
"
export
DEPS_
$
{
module
}
=
"
$deps
"
export
INST_
$
{
module
}
=
"
$module_inst
"
for
name
in
$deps
;
do
mod
=
$
(
fix_variable_name
$name
)
export
NAME_
$
{
mod
}
=
"
$name
"
...
...
@@ -148,9 +177,9 @@ find_modules() {
if
test
-
f
"$1"
&&
test
"$(basename $1)"
=
"
$CONTROL
"
;
then
export
module
=
""
export
module_inst
=
""
export
module_inst
=
"
no
"
parse_control
"$1"
if
test
-
n
"
$module_inst
"
;
then
if
test
"
$module_inst
"
=
"yes"
;
then
export
INSTMODULES
=
"
$MODULES$module
"
else
export
MODULES
=
"
$MODULES$module
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment