- Değişen UpdateInfo'ya göre düzenle.

- metadata.xml için oluşturulan gerçek dosyayı kullan.
This commit is contained in:
Barış Metin
2005-06-22 14:08:46 +00:00
parent 6eaa839791
commit 61e2d15337
4 changed files with 14 additions and 31 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class MetaData(XmlFile):
self.license = getNodeText("License")
historyElts = self.getAllNodes("History/Update")
self.history = [HistoryInfo(x) for x in historyElts]
self.history = [UpdateInfo(x) for x in historyElts]
self.version = self.history[0].version
self.release = self.history[0].release
+1
View File
@@ -43,6 +43,7 @@ class UpdateInfo:
self.version = getNodeText(getNode(node, "Version"))
self.release = getNodeText(getNode(node, "Release"))
class HistoryInfo:
def elt(self, xml):
node = xml.newNode("Update")
xml.addTextNodeUnder(node, "Date", self.date)
+2 -2
View File
@@ -16,9 +16,9 @@ class MetaDataTestCase(unittest.TestCase):
self.assertEqual(md.license, "As-Is")
self.assertEqual(md.version, "0.1")
self.assertEqual(md.version, "1.7")
self.assertEqual(md.installedSize, 40500)
self.assertEqual(md.installedSize, 546542)
def testWrite(self):
pass
+10 -28
View File
@@ -1,29 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml version="1.0" ?>
<METADATA><Name>popt</Name><Summary>Command line option parsing library</Summary><Description>Command line option parsing library.
While it is similiar to getopt(3), it contains a number of enhancements, including:
<METADATA>
<Name>sandbox</Name>
<Summary lang="tr">Bla</Summary>
<Homepage>http://cekirdek.uludag.org.tr/~meren/</Homepage>
<License>As-Is</License>
<Distribution>Pardus</Distribution>
<DistributionRelease>0.1</DistributionRelease>
<Category>temprorary:zip</Category>
<Architecture>x86</Architecture>
<InstalledSize>40500</InstalledSize>
<Packager>
<Name>Meral</Name>
<Email>meren@uludag.org.tr</Email>
</Packager>
<History>
<Update>
<Date>06/15/2005</Date>
<Version>0.1</Version>
<Release>1</Release>
</Update>
</History>
</METADATA>
1) popt is fully reentrant
2) popt can parse arbitrary argv[] style arrays while
getopt(2) makes this quite difficult
3) popt allows users to alias command line arguments
4) popt provides convience functions for parsing strings
into argv[] style arrays
</Description><Category>devel:library</Category><InstallDependencies/><RuntimeDependencies><Depencency>gettext</Depencency></RuntimeDependencies><License>As-Is</License><Distribution>Pardus</Distribution><DistributionRelease>0.1</DistributionRelease><Architecture>Any</Architecture><InstalledSize>546542</InstalledSize><History><Update><Date>06/14/2005</Date><Version>1.7</Version><Release>3</Release></Update><Update><Date>06/10/2005</Date><Version>1.7</Version><Release>2</Release></Update><Update><Date>05/05/2005</Date><Version>1.7</Version><Release>1</Release></Update></History></METADATA>