This will allow src_test to trigger issues like bug #381657.
},
}
+ metadata_xml_files = (
+ (
+ "dev-libs/A",
+ {
+ "herd" : "base-system",
+ "flags" : "<flag name='flag'>Description of how USE='flag' affects this package</flag>",
+ },
+ ),
+ (
+ "dev-libs/B",
+ {
+ "herd" : "no-herd",
+ "flags" : "<flag name='flag'>Description of how USE='flag' affects this package</flag>",
+ },
+ ),
+ )
+
portage_python = portage._python_interpreter
emerge_cmd = (portage_python, "-Wd",
os.path.join(PORTAGE_BIN_PATH, "emerge"))
# non-empty system set keeps --depclean quiet
with open(os.path.join(profile_path, "packages"), 'w') as f:
f.write("*dev-libs/token-system-pkg")
+ for cp, xml_data in metadata_xml_files:
+ with open(os.path.join(portdir, cp, "metadata.xml"), 'w') as f:
+ f.write(playground.metadata_xml_template % xml_data)
for args in test_commands:
proc = subprocess.Popen(args,
env=env, stdout=subprocess.PIPE)
licenses = ["GPL-2"]
arch_list = ["x86"]
metadata_dtd = os.path.join(PORTAGE_BASE_PATH, "cnf/metadata.dtd")
- metadata_xml_template = """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<herd>%(herd)s</herd>
-<maintainer>
-<email>maintainer-needed@gentoo.org</email>
-<description>Description of the maintainership</description>
-</maintainer>
-<longdescription>Long description of the package</longdescription>
-<use>
-%(flags)s
-</use>
-</pkgmetadata>
-"""
-
metadata_xml_files = (
(
"dev-libs/A",
{
- "herd" : "no-herd",
+ "herd" : "base-system",
"flags" : "<flag name='flag'>Description of how USE='flag' affects this package</flag>",
},
),
f.write("%s - %s\n" % (k, v))
for cp, xml_data in metadata_xml_files:
with open(os.path.join(portdir, cp, "metadata.xml"), 'w') as f:
- f.write(metadata_xml_template % xml_data)
+ f.write(playground.metadata_xml_template % xml_data)
# repoman checks metadata.dtd for recent CTIME, so copy the file in
# order to ensure that the CTIME is current
shutil.copyfile(metadata_dtd, os.path.join(distdir, "metadata.dtd"))
config_files = frozenset(("package.use", "package.mask", "package.keywords", \
"package.unmask", "package.properties", "package.license", "use.mask", "use.force"))
+ metadata_xml_template = """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>%(herd)s</herd>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+<description>Description of the maintainership</description>
+</maintainer>
+<longdescription>Long description of the package</longdescription>
+<use>
+%(flags)s
+</use>
+</pkgmetadata>
+"""
+
def __init__(self, ebuilds={}, installed={}, profile={}, repo_configs={}, \
user_config={}, sets={}, world=[], debug=False):
"""
os.makedirs(os.path.join(self.eroot, "etc"))
os.symlink(sub_profile_dir, os.path.join(self.eroot, "etc", "make.profile"))
+ #Create minimal herds.xml
+ metadata_dir = os.path.join(repo_dir, "metadata")
+ os.makedirs(metadata_dir)
+ herds_xml = """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE herds SYSTEM "http://www.gentoo.org/dtd/herds.dtd">
+<?xml-stylesheet href="/xsl/herds.xsl" type="text/xsl" ?>
+<?xml-stylesheet href="/xsl/guide.xsl" type="text/xsl" ?>
+<herds>
+<herd>
+ <name>base-system</name>
+ <email>base-system@gentoo.org</email>
+ <description>Core system utilities and libraries.</description>
+ <maintainer>
+ <email>base-system@gentoo.orgg</email>
+ <name>Base System</name>
+ <role>Base System Maintainer</role>
+ </maintainer>
+</herd>
+</herds>
+"""
+ with open(os.path.join(metadata_dir, "metadata.xml"), 'w') as f:
+ f.write(herds_xml)
+
user_config_dir = os.path.join(self.eroot, "etc", "portage")
try: