 
         entry = @append(filename, body, dirname:opts.dirname)
         entry.target = opts.target if opts.target?
+        entry.name = opts.name ? "main"
 
         dirname = path.dirname(file)
         for req in required.strings
-            params = {dirname, fromFile:entry.file}
+            params = {dirname, name:entry.name, fromFile:entry.file}
             if opts.target and /^[.\/]/.test(req)
                 params.target = path.resolve(path.dirname(opts.target), req)
             @require(req, params)

            try pkgfile = resolve.sync path.join(mfile, 'package.json'),
                basedir:dirname
            catch err # nothing
        if pkgfile and not @files[pkgfile]
            if path.existsSync(pkgfile)
                pkgbody = "module.exports=" + fs.readFileSync(pkgfile, 'utf-8')
                @append(pkgfile, pkgbody, {dirname})
            else pkgfile = null

        body = opts.body ? @readFile(opts.file)


            @emit('error', "no size for #{file}") unless opts.size?
        stream.props = size:opts.size
        @_push (done) ->
            return done() if @skip[entry.name]
            @emit('append', stream, entry)
            @tarball.append(stream, done)
            content or= fs.createReadStream(file)
            if typeof content is 'string'
