Browse code

Bug fixes

Nat! authored on 01-06-2017 11:08:56
Showing 16 changed files
... ...
@@ -1,3 +1,8 @@
1
+## 3.6.1
2
+
3
+* bug fixes
4
+
5
+
1 6
 ## 3.6
2 7
 
3 8
 * Improved the dependencies copying routing. Now also copies `share` `sbin`
... ...
@@ -5,6 +10,9 @@
5 10
 will me merged into `dependencies/bin`.
6 11
 * Improve path construction, omitting empty components
7 12
 * Don't output superflous linefeed with paths
13
+* removed -fb flag, because it's just the same as clean before build.
14
+* Added a --from flag to build, so you can rebuild from a starting point.
15
+
8 16
 
9 17
 ### 3.5.4
10 18
 
... ...
@@ -1,3 +1,5 @@
1 1
 * Write "doctor" command to find common problems.
2 2
 * Make -u option to append .darwin and .linux to settings. In raw mode,
3
-list non-OS settings ?
4 3
\ No newline at end of file
4
+list non-OS settings ?
5
+* Create a scripts command to list and install scripts
6
+* Moving a repository from embedded to regular doesn't work w/o dist cleaning
5 7
\ No newline at end of file
... ...
@@ -31,7 +31,7 @@
31 31
 #
32 32
 MULLE_EXECUTABLE_VERSION_MAJOR=3
33 33
 MULLE_EXECUTABLE_VERSION_MINOR=6
34
-MULLE_EXECUTABLE_VERSION_PATCH=0
34
+MULLE_EXECUTABLE_VERSION_PATCH=1
35 35
 
36 36
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
37 37
 
... ...
@@ -282,6 +282,31 @@ bootstrap_init()
282 282
    # source_environment
283 283
 }
284 284
 
285
+bootstrap_cd_projectpath()
286
+{
287
+   local  orgpwd
288
+
289
+   orgpwd="$PWD"
290
+
291
+   while ! is_bootstrap_project
292
+   do
293
+      local old
294
+
295
+      old="$PWD"
296
+      cd ..
297
+
298
+      if [ "$PWD" = "${old}" ]
299
+      then
300
+         if [ "${command}" = "seting" ]
301
+         then
302
+            cd "${orgpwd}"
303
+         else
304
+            return 1
305
+         fi
306
+      fi
307
+   done
308
+}
309
+
285 310
 
286 311
 bootstrap_main()
287 312
 {
... ...
@@ -339,10 +364,6 @@ bootstrap_main()
339 364
             MULLE_FLAG_FOLLOW_SYMLINKS="YES"
340 365
          ;;
341 366
 
342
-         -fb|--force-build)
343
-            MULLE_FLAG_MAGNUM_FORCE="BUILD-ONLY"
344
-         ;;
345
-
346 367
          -f|--force)
347 368
             MULLE_FLAG_MAGNUM_FORCE="BOTH"
348 369
          ;;
... ...
@@ -395,36 +416,21 @@ bootstrap_main()
395 416
       help|init|uname)
396 417
       ;;
397 418
 
398
-      *)
399
-         local  orgpwd
400
-
401
-         orgpwd="$PWD"
402
-
403
-         while ! is_bootstrap_project
404
-         do
405
-            local old
406
-
407
-            old="$PWD"
408
-            cd ..
409
-
410
-            if [ "$PWD" = "${old}" ]
411
-            then
412
-               if [ "${command}" = "seting" ]
413
-               then
414
-                  cd "${orgpwd}"
415
-               else
416
-                  fail "There is no ${BOOTSTRAP_DIR} or ${BOOTSTRAP_DIR}.local folder here ($orgpwd), can't continue"
417
-               fi
418
-            fi
419
-         done
420
-      ;;
421
-   esac
422
-
423
-   case "${command}" in
424 419
       project-path)
420
+         if ! bootstrap_cd_projectpath
421
+         then
422
+            exit 1
423
+         fi
425 424
          echo "`pwd -P`"
426 425
          exit 0
427 426
       ;;
427
+
428
+      *)
429
+         if ! bootstrap_cd_projectpath
430
+         then
431
+            fail "There is no ${BOOTSTRAP_DIR} or ${BOOTSTRAP_DIR}.local folder here ($orgpwd), can't continue"
432
+         fi
433
+      ;;
428 434
    esac
429 435
 
430 436
    if bootstrap_should_defer_to_master "$@"
... ...
@@ -442,10 +448,6 @@ bootstrap_main()
442 448
          set_build_needed
443 449
       ;;
444 450
 
445
-      "BUILD-ONLY")
446
-         set_build_needed
447
-      ;;
448
-
449 451
       "NONE")
450 452
          case "${command}" in
451 453
             bootstrap|build|systeminstall|tag|update|upgrade)
... ...
@@ -65,11 +65,15 @@ EOF
65 65
       echo "${repositories}" | sed 's/^/   /'
66 66
    fi
67 67
 
68
+# to is experimental and maybe useless
69
+#   --to <name>    :  force rebuild up to and including this project
70
+
68 71
    cat <<EOF >&2
69 72
 Options:
73
+   -c <name>      :  configurations to build ($defc), separate with comma
74
+   --from <name>  :  force rebuild from this project
70 75
    -k             :  don't clean before building $defk
71 76
    -K             :  always clean before building $defkk
72
-   -c <name>      :  configurations to build ($defc), separate with comma
73 77
    --prefix <dir> :  use <dir> instead of /usr/local
74 78
 EOF
75 79
 
... ...
@@ -118,9 +122,7 @@ find_make()
118 122
 
119 123
 find_xcodebuild()
120 124
 {
121
-   local name
122
-
123
-   name="$1"
125
+   local name="$1"
124 126
 
125 127
    local toolname
126 128
 
... ...
@@ -137,6 +139,7 @@ find_compiler()
137 139
 
138 140
    local compiler
139 141
    local filename
142
+   local path
140 143
 
141 144
    compiler="`read_build_setting "${name}" "${compiler_name}"`"
142 145
    if [ -z "${compiler}" -a "${OPTION_USE_CC_CXX}" = "YES" ]
... ...
@@ -160,11 +163,12 @@ find_compiler()
160 163
 
161 164
    if [ ! -z "${compiler}" ]
162 165
    then
163
-      compiler=`which_binary "${compiler}"`
164
-      if [ -z "${compiler}" ]
166
+      path=`which_binary "${compiler}"`
167
+      if [ -z "${path}" ]
165 168
       then
166
-         suggest_binary_install "${compiler}"
167
-         exit 1
169
+         fail "Compiler \"${compiler}\" not found.
170
+Suggested fix:
171
+   ${C_RESET}${C_BOLD}`suggest_binary_install "${compiler}"`"
168 172
       fi
169 173
       echo "${compiler}"
170 174
    fi
... ...
@@ -342,17 +346,11 @@ dispense_libexec()
342 346
 
343 347
 _dispense_binaries()
344 348
 {
345
-   local name
346
-   local src
347
-   local findtype
348
-   local depend_subdir
349
-   local subpath
350
-
351
-   src="$1"
352
-   name="$2"
353
-   findtype="$3"
354
-   depend_subdir="$4"
355
-   subpath="$5"
349
+   local src="$1"
350
+   local name="$2"
351
+   local findtype="$3"
352
+   local depend_subdir="$4"
353
+   local subpath="$5"
356 354
 
357 355
    local dst
358 356
    local findtype2
... ...
@@ -2186,6 +2184,42 @@ build_wrapper()
2186 2184
 }
2187 2185
 
2188 2186
 
2187
+# keep until "to" but excluding it
2188
+# cut stuff until "to"
2189
+# keep "to" and keep rest
2190
+
2191
+force_rebuild()
2192
+{
2193
+   local from="$1"
2194
+   local to="$2"
2195
+
2196
+   remove_file_if_present "${REPOS_DIR}/.build_started"
2197
+
2198
+   # if nothing's build yet, fine with us
2199
+   if [ ! -f "${REPOS_DIR}/.build_done" ]
2200
+   then
2201
+      log_fluff "Nothing has been built yet"
2202
+      return
2203
+   fi
2204
+
2205
+   #
2206
+   # keep entries above parameter
2207
+   # os x doesn't have 'Q'
2208
+   # also q and i doesn't work on OS X <sigh>
2209
+   #
2210
+   local tmpfile
2211
+
2212
+   [ -z "${MULLE_BOOTSTRAP_SNIP_SH}" ] && . mulle-bootstrap-snip.sh
2213
+
2214
+   tmpfile="`exekutor mktemp "mulle-bootstrap.XXXXXXXX"`" || exit 1
2215
+
2216
+   redirect_exekutor "${tmpfile}" snip_from_to_file "${from}" "${to}" "${REPOS_DIR}/.build_done"
2217
+   exekutor mv "${tmpfile}" "${REPOS_DIR}/.build_done"
2218
+
2219
+   log_debug ".build_done=`cat "${REPOS_DIR}/.build_done"`"
2220
+}
2221
+
2222
+
2189 2223
 build_if_alive()
2190 2224
 {
2191 2225
    local name
... ...
@@ -2369,6 +2403,8 @@ build_main()
2369 2403
    local OPTION_CONFIGURATIONS
2370 2404
    local OPTION_ADD_USR_LOCAL
2371 2405
    local OPTION_USE_CC_CXX
2406
+   local OPTION_FROM
2407
+   local OPTION_TO
2372 2408
 
2373 2409
    OPTION_CHECK_USR_LOCAL_INCLUDE="`read_config_setting "check_usr_local_include" "NO"`"
2374 2410
    OPTION_USE_CC_CXX="`read_config_setting "use_cc_cxx" "YES"`"
... ...
@@ -2396,16 +2432,22 @@ build_main()
2396 2432
             OPTION_CONFIGURATIONS="Debug"
2397 2433
          ;;
2398 2434
 
2435
+         --from)
2436
+            [ $# -eq 1 ] && fail "argument for $1 is missing"
2437
+            shift
2438
+            OPTION_FROM="$1"
2439
+         ;;
2440
+
2399 2441
          -j|--cores)
2442
+            [ $# -eq 1 ] && fail "argument for $1 is missing"
2443
+            shift
2444
+
2400 2445
             case "${UNAME}" in
2401 2446
                mingw)
2402 2447
                   build_usage
2403 2448
                ;;
2404 2449
             esac
2405 2450
 
2406
-            shift
2407
-            [ $# -ne 0 ] || fail "core count missing"
2408
-
2409 2451
             CORES="$1"
2410 2452
          ;;
2411 2453
 
... ...
@@ -2425,11 +2467,16 @@ build_main()
2425 2467
             USR_LOCAL_LIB="$1/lib"
2426 2468
          ;;
2427 2469
 
2428
-
2429 2470
          --release)
2430 2471
             OPTION_CONFIGURATIONS="Release"
2431 2472
          ;;
2432 2473
 
2474
+         --to)
2475
+            [ $# -eq 1 ] && fail "argument for $1 is missing"
2476
+            shift
2477
+            OPTION_TO="$1"
2478
+         ;;
2479
+
2433 2480
          --use-prefix-libraries)
2434 2481
             OPTION_ADD_USR_LOCAL=YES
2435 2482
          ;;
... ...
@@ -2474,13 +2521,18 @@ build_main()
2474 2521
    #
2475 2522
    #
2476 2523
    #
2477
-
2478 2524
    if [ ! -f "${REPOS_DIR}/.build_done" ]
2479 2525
    then
2526
+      remove_file_if_present "${REPOS_DIR}/.build_done.orig"
2480 2527
       _create_file_if_missing "${REPOS_DIR}/.build_done"
2481 2528
 
2482 2529
       log_fluff "Cleaning dependencies directory as \"${DEPENDENCIES_DIR}\""
2483 2530
       rmdir_safer "${DEPENDENCIES_DIR}"
2531
+   else
2532
+      if [ ! -z "${OPTION_FROM}" -o ! -z "${OPTION_TO}" ]
2533
+      then
2534
+         force_rebuild "${OPTION_FROM}" "${OPTION_TO}"
2535
+      fi
2484 2536
    fi
2485 2537
 
2486 2538
    # parameter ? partial build!
... ...
@@ -2505,6 +2557,7 @@ build_main()
2505 2557
    else
2506 2558
       log_fluff "No dependencies have been generated"
2507 2559
 
2560
+      remove_file_if_present "${REPOS_DIR}/.build_done.orig"
2508 2561
       remove_file_if_present "${REPOS_DIR}/.build_done"
2509 2562
    fi
2510 2563
 
... ...
@@ -34,19 +34,17 @@ MULLE_BOOTSTRAP_COMMAND_SH="included"
34 34
 
35 35
 suggest_binary_install()
36 36
 {
37
-   toolname="$1"
38
-
39
-   log_warning "Suggested fix:"
37
+   local toolname="$1"
40 38
 
41 39
    case "${toolname}" in
42 40
       mulle-cl*)
43 41
          case "${UNAME}" in
44 42
             darwin)
45
-               log_info "brew install mulle-xcode-developer"
43
+               echo "brew install mulle-xcode-developer"
46 44
             ;;
47 45
 
48 46
             *)
49
-               log_info "Visit https://mulle-objc.github.io/ for instructions how to install ${toolname}"
47
+               echo "Visit https://mulle-objc.github.io/ for instructions how to install ${toolname}"
50 48
             ;;
51 49
          esac
52 50
       ;;
... ...
@@ -54,19 +52,19 @@ suggest_binary_install()
54 52
       *)
55 53
          case "${UNAME}" in
56 54
             darwin)
57
-               log_info "brew install $1"
55
+               echo "brew install ${toolname}"
58 56
             ;;
59 57
 
60 58
             linux)
61 59
                if command -v "apt-get" > /dev/null 2>&1
62 60
                then
63
-                  log_info "apt-get install $1"
61
+                  echo "apt-get install ${toolname}"
64 62
                else
65 63
                   if command -v "yum" > /dev/null 2>&1
66 64
                   then
67
-                     log_info "yum install $1"
65
+                     echo "yum install ${toolname}"
68 66
                   else
69
-                     fail "You need to install $1 manually"
67
+                     echo "You need to install \"${toolname}\" manually"
70 68
                   fi
71 69
                fi
72 70
             ;;
... ...
@@ -74,19 +72,19 @@ suggest_binary_install()
74 72
             FreeBSD)
75 73
                if command -v "pkg" > /dev/null 2>&1
76 74
                then
77
-                  log_info pkg install "$1"
75
+                  echo "pkg install ${toolname}"
78 76
                else
79 77
                   if command -v "pkg_add" > /dev/null 2>&1
80 78
                   then
81
-                     log_info pkg_add -r "$1"
79
+                     echo "pkg_add -r ${toolname}"
82 80
                   else
83
-                     log_info "You need to install $1 manually"
81
+                     echo "You need to install \"${toolname}\" manually"
84 82
                   fi
85 83
                fi
86 84
             ;;
87 85
 
88 86
             *)
89
-               log_info "You need to install $1 manually"
87
+               echo "You need to install \"${toolname}\" manually"
90 88
             ;;
91 89
          esac
92 90
       ;;
... ...
@@ -209,7 +207,7 @@ which_binary()
209 207
       ;;
210 208
    esac
211 209
 
212
-   which "${toolname}" 2> /dev/null
210
+   command -v "${toolname}" 2> /dev/null
213 211
 }
214 212
 
215 213
 
... ...
@@ -226,10 +224,8 @@ assert_binary()
226 224
 
227 225
    local path
228 226
 
229
-   path=`which_binary "${toolname}"`
230
-   if [ -z "${path}" ]
227
+   if ! which_binary "${toolname}"
231 228
    then
232
-      which_binary "${toolname}"
233 229
       fail "${toolname} is an unknown build tool (PATH=$PATH)"
234 230
    fi
235 231
    # echo "$path"
... ...
@@ -268,9 +264,9 @@ verify_binary()
268 264
 
269 265
    if [ "${toolname}" != "${tooldefaultname}" ]
270 266
    then
271
-      log_fail "${toolfamily} named \"${toolname}\" not found in PATH"
272
-      suggest_binary_install "${toolname}"
273
-      _bail
267
+      fail "${toolfamily} named \"${toolname}\" not found in PATH.
268
+Suggested fix:
269
+${C_RESET}${C_BOLD}   `suggest_binary_install "${toolname}"`"
274 270
    else
275 271
       log_fluff "${toolfamily} named \"${toolname}\" not found in PATH"
276 272
    fi
... ...
@@ -301,6 +301,8 @@ _search_for_git_repository_in_cache()
301 301
 
302 302
 search_for_git_repository_in_caches()
303 303
 {
304
+   log_debug "search_for_git_repository_in_caches" "$@" "(${CACHES_PATH})"
305
+
304 306
    local found
305 307
    local directory
306 308
    local realdir
... ...
@@ -347,6 +349,8 @@ search_for_git_repository_in_caches()
347 349
 
348 350
 _search_for_archive_in_caches()
349 351
 {
352
+   log_debug "_search_for_archive_in_caches" "$@"
353
+
350 354
    local directory="$1"
351 355
    local name="$2"
352 356
    local filename="$3"
... ...
@@ -379,6 +383,8 @@ _search_for_archive_in_caches()
379 383
 
380 384
 search_for_archive_in_caches()
381 385
 {
386
+   log_debug "search_for_archive_in_caches" "$@" "(${CACHES_PATH})"
387
+
382 388
    local name="$1"
383 389
    local filename="$2"
384 390
 
... ...
@@ -1829,6 +1835,7 @@ _common_main()
1829 1835
       ;;
1830 1836
    esac
1831 1837
 
1838
+   remove_file_if_present "${REPOS_DIR}/.build_done.orig"
1832 1839
    remove_file_if_present "${REPOS_DIR}/.build_done"
1833 1840
    remove_file_if_present "${REPOS_DIR}/.fetch_done"
1834 1841
    create_file_if_missing "${REPOS_DIR}/.fetch_started"
... ...
@@ -299,7 +299,10 @@ unescape_linefeeds()
299 299
    echo "$@" | tr '|' '\012' | sed -e 's/\\$/|/g' -e '/^$/d'
300 300
 }
301 301
 
302
-
302
+escaped_sed_pattern()
303
+{
304
+   sed -e 's/[]\/$*.^|[]/\\&/g' <<< "${1}"
305
+}
303 306
 
304 307
 
305 308
 #
... ...
@@ -678,15 +678,6 @@ set_fetch_needed()
678 678
 }
679 679
 
680 680
 
681
-set_build_needed()
682
-{
683
-   [ -z "${MULLE_BOOTSTRAP_FUNCTIONS_SH}" ] && . mulle-bootstrap-functions.sh
684
-
685
-   remove_file_if_present "${REPOS_DIR}/.build_started"
686
-   remove_file_if_present "${REPOS_DIR}/.build_done"
687
-}
688
-
689
-
690 681
 assert_mulle_bootstrap_version()
691 682
 {
692 683
    local version
... ...
@@ -174,7 +174,10 @@ _bail()
174 174
 
175 175
 fail()
176 176
 {
177
-   log_fail "$*"
177
+   if [ ! -z "$*" ]
178
+   then
179
+      log_fail "$*"
180
+   fi
178 181
    _bail
179 182
 }
180 183
 
... ...
@@ -178,7 +178,7 @@ master_remove_minion_bootstrap_project()
178 178
 
179 179
    if [ -f "${filepath}" ]
180 180
    then
181
-      exekutor sed -i "" -e "/^${unregex}$/d" "${filepath}"
181
+      exekutor sed -i"" -e "/^${unregex}$/d" "${filepath}"
182 182
 
183 183
       if [ -z "`read_setting "${filepath}"`" ]
184 184
       then
... ...
@@ -784,7 +784,7 @@ tar_unpack()
784 784
    esac
785 785
 
786 786
    rmdir_safer "${name}.tmp"
787
-   tmpdir="`exekutor mktemp -d "${name}.XXXX.tmp"`" || return 1
787
+   tmpdir="`exekutor mktemp -d "${name}.XXXXXXXX"`" || return 1
788 788
    (
789 789
       exekutor cd "${tmpdir}" || return 1
790 790
 
... ...
@@ -849,7 +849,7 @@ zip_unpack()
849 849
    archivename="`extension_less_basename "${download}"`"
850 850
 
851 851
    rmdir_safer "${name}.tmp"
852
-   tmpdir="`exekutor mktemp -d "${name}.XXXX.tmp"`" || exit 1
852
+   tmpdir="`exekutor mktemp -d "${name}.XXXXXXXX"`" || exit 1
853 853
    (
854 854
       exekutor cd "${tmpdir}" || return 1
855 855
 
... ...
@@ -130,8 +130,8 @@ setup
130 130
 [ "`cat a/.bootstrap.auto/c.build/override`" = "# b : .bootstrap/c.build/override" ] || fail "override failed"
131 131
 
132 132
 
133
-expect="`mktemp -t foo.XXXX`"
134
-result="`mktemp -t foo.XXXX`"
133
+expect="`mktemp -t foo.XXXXXXXX`"
134
+result="`mktemp -t foo.XXXXXXXX`"
135 135
 ls -R1a a | sed '/^$/d' | sed '/^[.]*$/d' | sed '/^a:$/d' | sort  > "${result}"
136 136
 cat <<EOF | sort > "${expect}"
137 137
 .bootstrap
138 138
similarity index 100%
139 139
rename from tests/12-move-clone/run-test.sh
140 140
rename to tests/12-move_clone/run-test.sh
141 141
similarity index 100%
142 142
rename from tests/15-local-repositories/run-test.sh
143 143
rename to tests/15-local_repositories/run-test.sh
144 144
similarity index 100%
145 145
rename from tests/16-expanded-merge/run-test.sh
146 146
rename to tests/16-expanded_merge/run-test.sh
147 147
new file mode 100755
... ...
@@ -0,0 +1,181 @@
1
+#! /bin/sh
2
+
3
+
4
+clear_test_dirs()
5
+{
6
+   local i
7
+
8
+   for i in "$@"
9
+   do
10
+      if [ -d "$i" ]
11
+      then
12
+         rm -rf "$i"
13
+      fi
14
+   done
15
+}
16
+
17
+
18
+fail()
19
+{
20
+   echo "failed:" "$@" >&2
21
+   exit 1
22
+}
23
+
24
+
25
+run_mulle_bootstrap()
26
+{
27
+   echo "####################################" >&2
28
+   echo mulle-bootstrap "$@"  >&2
29
+   echo "####################################" >&2
30
+
31
+   mulle-bootstrap "$@"  || fail "mulle-bootstrap failed"
32
+}
33
+
34
+
35
+#
36
+#
37
+#
38
+
39
+setup_test_case()
40
+{
41
+   clear_test_dirs a b
42
+
43
+   mkdir -p a/.bootstrap
44
+   mkdir -p b
45
+
46
+   (
47
+      cd b ;
48
+      git init ;
49
+      echo "# VfL Bochum 1848" > README.md ;
50
+      git add README.md ;
51
+      git commit -m "bla bla"
52
+   ) || exit 1
53
+
54
+   echo "b" > a/.bootstrap/repositories
55
+}
56
+
57
+
58
+
59
+transform_test_case_1()
60
+{
61
+   mv a/.bootstrap/repositories a/.bootstrap/embedded_repositories
62
+}
63
+
64
+
65
+transform_test_case_2()
66
+{
67
+   mv a/.bootstrap/embedded_repositories a/.bootstrap/repositories
68
+}
69
+
70
+
71
+assert_a_1()
72
+{
73
+   [ -e ".bootstrap.auto/embedded_repositories" ] && fail "auto embedded_repositories not deleted"
74
+
75
+   [ -e ".bootstrap.repos/.embedded/b" ] && fail ".bootstrap.repos/.embedded/b not deleted"
76
+
77
+   result="`cat .bootstrap.auto/repositories`"
78
+   [ "b;stashes/b;master;git" != "${result}" ] &&  fail ".bootstrap.auto/repositories ($result)"
79
+
80
+   [ ! -e "stashes/b" ] && fail "stashes not created"
81
+
82
+   result="`head -1 .bootstrap.repos/b`"
83
+   [ "b;stashes/b;master;git" != "${result}" ] && fail "($result)"
84
+
85
+   result="`cat stashes/b/README.md`"
86
+   [ "${result}" != "# VfL Bochum 1848" ] && fail "stashes/b/README.md not created ($result)"
87
+   :
88
+}
89
+
90
+
91
+assert_a_2()
92
+{
93
+   [ -e "stashes/b" ] && fail "stashes not deleted"
94
+
95
+   [ -e ".bootstrap.auto/repositories" ] && fail "auto repositories not deleted"
96
+
97
+   result="`cat .bootstrap.auto/embedded_repositories`"
98
+   [ "b;b;master;git" != "${result}" ] &&  fail ".bootstrap.auto/embedded_repositories ($result)"
99
+
100
+   [ ! -e "b" ] && fail "b not created ($result)"
101
+
102
+   result="`head -1 .bootstrap.repos/.embedded/b`"
103
+   [ "b;b;master;git" != "${result}" ] && fail "($result)"
104
+
105
+   result="`cat b/README.md`"
106
+   [ "${result}" != "# VfL Bochum 1848" ] && fail "stashes not created ($result)"
107
+   :
108
+}
109
+
110
+
111
+assert_a_3()
112
+{
113
+   assert_a_1
114
+}
115
+
116
+
117
+_test_a_1()
118
+{
119
+   run_mulle_bootstrap "$@" -y fetch  --no-symlink-creation
120
+   assert_a_1
121
+}
122
+
123
+
124
+_test_a_2()
125
+{
126
+   run_mulle_bootstrap "$@" -y fetch  --no-symlink-creation
127
+   assert_a_2
128
+}
129
+
130
+
131
+_test_a_3()
132
+{
133
+   run_mulle_bootstrap "$@" -y fetch  --no-symlink-creation
134
+   assert_a_3
135
+}
136
+
137
+
138
+
139
+test_a()
140
+{
141
+   (
142
+      cd a ;
143
+      _test_a_1 "$@"
144
+   ) || exit 1
145
+
146
+   #
147
+   #  move b to embedded
148
+   #
149
+   transform_test_case_1
150
+
151
+   (
152
+      cd a ;
153
+      _test_a_2 "$@"
154
+   ) || exit 1
155
+
156
+   #
157
+   #  move b back
158
+   #
159
+   transform_test_case_2
160
+
161
+   (
162
+      cd a ;
163
+      _test_a_3 "$@"
164
+   ) || exit 1
165
+}
166
+
167
+
168
+#
169
+# not that much of a test
170
+#
171
+echo "mulle-bootstrap: `mulle-bootstrap version`(`mulle-bootstrap library-path`)" >&2
172
+
173
+MULLE_BOOTSTRAP_CACHES_PATH="`pwd -P`"
174
+export MULLE_BOOTSTRAP_CACHES_PATH
175
+
176
+setup_test_case
177
+test_a "$@"
178
+clear_test_dirs a b
179
+
180
+echo "succeeded" >&2
181
+