Mal richtig schnell ein kleines Python-Script geschrieben, welches die Paket-Datenban...
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Thu, 14 Jun 2007 23:48:13 +0000 (23:48 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Thu, 14 Jun 2007 23:48:13 +0000 (23:48 +0000)
(Fuer den Einsatz auf dem Server.)

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@632 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

.svnignore [deleted file]
doc/.svnignore [new file with mode: 0644]
tools/make_pkg_list.py [new file with mode: 0644]

diff --git a/.svnignore b/.svnignore
deleted file mode 100644 (file)
index 40a1b37..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-## svn propset svn:ignore -F .svnignore .
-*.iso
-*.md5
-*.tgz
-.config
-.svnignore
-build
-cache
-ccache
-packages
-svn_status
-log
diff --git a/doc/.svnignore b/doc/.svnignore
new file mode 100644 (file)
index 0000000..8035f59
--- /dev/null
@@ -0,0 +1,16 @@
+## svn propset svn:ignore -F doc/.svnignore .
+*.iso
+*.md5
+*.tgz
+*.img.gz
+.config
+.svnignore
+build
+cache
+ccache
+packages
+svn_status
+log
+ipfire-source-*
+tmp
+ipfire-diff-*
diff --git a/tools/make_pkg_list.py b/tools/make_pkg_list.py
new file mode 100644 (file)
index 0000000..70553f1
--- /dev/null
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+import sys
+import os
+
+def usage():
+       print '''Usage:
+       $0 <dir>
+       Where <dir> is the path to the metas.'''
+
+if len(sys.argv) < 2:
+       usage()
+       sys.exit()
+       
+dir = sys.argv[1]
+       
+if not os.path.exists(dir):
+       print dir, "doesn't exist."
+       usage()
+       sys.exit()
+       
+dst = file(dir+"/packages_list.db", "w")
+       
+for i in os.listdir(dir):
+       if not os.path.isfile(dir+"/"+i):
+               print "Is a directory", i
+               continue
+       
+       if not i.startswith('meta-'):
+               print "Is no meta file", i
+               continue
+       
+       src = file(dir+"/"+i)
+       for i in src.readlines():
+               i = i.rstrip("\n")
+               if i.startswith("Name:"):
+                       trash,name = i.split(": ")
+               elif i.startswith("Version:"):
+                       trash,ver = i.split(": ")
+               elif i.startswith("Release:"):
+                       trash,rel = i.split(": ")
+               elif i.startswith("Size:"):
+                       trash,size = i.split(": ")
+               
+       src.close()
+       
+       dst.write(name+";"+ ver +";"+ rel +";"+ size +";\n")
+
+dst.close()