def _generate_contents(self, tar):
uci = self.render(files=False)<EOL>packages = packages_pattern.split(uci)<EOL>if '<STR_LIT>' in packages:<EOL><INDENT>packages.remove('<STR_LIT>')<EOL><DEDENT>for package in packages:<EOL><INDENT>lines = package.split('<STR_LIT:\n>')<EOL>package_name = lines[<NUM_LIT:0>]<EOL>text_contents = '<STR_LIT:\n>'.join(lines[<NUM_LIT:2>:])<EOL>self._add_file(tar=tar,<EOL>name='<STR_LIT>'.format(config_path, package_name),<EOL>contents=text_contents)<EOL><DEDENT>
Adds configuration files to tarfile instance.

:param tar: tarfile instance
:returns: None