Kaydet (Commit) f394699f authored tarafından Fatih Aşıcı's avatar Fatih Aşıcı

Add target attribute to Archive tag. It can be used to extract the archive into a sub-directory.

üst 4996e645
......@@ -50,6 +50,7 @@
<!ATTLIST Archive sha1sum CDATA #REQUIRED>
<!-- NOTE: we can limit possible types here to the ones that pisi know -->
<!ATTLIST Archive type CDATA #REQUIRED>
<!ATTLIST Archive target CDATA #IMPLIED>
<!ELEMENT BuildDependencies (Dependency*)>
......
......@@ -1309,6 +1309,9 @@
<value>binary</value>
</choice>
</attribute>
<optional>
<attribute name="target"/>
</optional>
</group>
</define>
......
......@@ -120,4 +120,5 @@ class SourceArchive:
raise Error, _("unpack: check_file_hash failed")
archive = pisi.archive.Archive(self.archiveFile, self.archive.type)
archive.unpack(self.pkg_work_dir, clean_dir)
target_dir = os.path.join(self.pkg_work_dir, self.archive.target or "")
archive.unpack(target_dir, clean_dir)
......@@ -151,6 +151,7 @@ class Archive:
s_uri = [ autoxml.String, autoxml.mandatory ]
a_type = [ autoxml.String, autoxml.mandatory ]
a_sha1sum =[ autoxml.String, autoxml.mandatory ]
a_target =[ autoxml.String, autoxml.optional ]
def decode_hook(self, node, errs, where):
self.name = os.path.basename(self.uri)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment