~ubuntu-branches/ubuntu/natty/pbuilder/natty

« back to all changes in this revision

Viewing changes to pbuilder-modules

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-01-06 08:29:47 UTC
  • mfrom: (1.2.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110106082947-b9989y6vpkywa4qb
Tags: 0.199+nmu1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - pbuilderrc, debian/pbuilder.config, debian/pbuilder.templates: Set
    default archive mirror to "archive.ubuntu.com/ubuntu".
  - pbuilderrc: Set default distribution to "natty" and the default keyring
    to the Ubuntu one.
  - pbuilderrc: change how we pass keyring in DEBOOTSTRAPOPTS
  - debian/rules: install temporary locale so man page tests don't cause
    FTBFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
        log "W: Aborting with an error";
320
320
    fi
321
321
    if [ "${INTERNAL_BUILD_UML}" != "yes" ]; then
322
 
        if [ -d "$BUILDPLACE" ]; then 
323
 
            log "I: cleaning the build env "
324
 
            clean_subdirectories "$BUILDPLACE"
 
322
        if [ -d "$BUILDPLACE" ]; then
 
323
            # A directory on the same partition as $BUILDPLACE, bind-mounted
 
324
            # into $BUILDPLACE, will be cleaned out by clean_subdirectories
 
325
            # (because -xdev doesn't know about bind mounts).  To avoid that
 
326
            # potential disaster (and also to avoid ugly error messages from
 
327
            # rmdir otherwise), we want to make sure that there is *nothing*
 
328
            # mounted under the chroot before we do our bulldozer routine.
 
329
            #
 
330
            # The readlink -f is a simple way to canonicalize the path for
 
331
            # $BUILDPLACE (no dirty double slashes for *us*), so it matches
 
332
            # what will be in the output of mount.
 
333
            if mount |grep -q -F " $(readlink -f $BUILDPLACE)/"; then
 
334
                log "E: Something is still mounted under ${BUILDPLACE}; unmount and remove ${BUILDPLACE} manually"
 
335
            else
 
336
                log "I: cleaning the build env "
 
337
                clean_subdirectories "$BUILDPLACE"
 
338
            fi
325
339
        fi;
326
340
    fi
327
341
}