From 72377ebf0b84cd4498fe11cd806de54c5f6f1cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Fri, 10 Jun 2005 09:05:38 +0000 Subject: [PATCH] Eray'in ekraninda acik ne gorduysem svn'e add edip commit ediyorum (meren).. --- src/dependency.py | 1 + src/install.py | 27 +++++++++++++++++++++++++++ src/installdb.py | 1 + src/package.py | 19 +++++++++++++++++++ src/repodb.py | 2 ++ src/specfile.py | 5 +++++ 6 files changed, 55 insertions(+) create mode 100644 src/dependency.py create mode 100644 src/install.py create mode 100644 src/installdb.py create mode 100644 src/package.py create mode 100644 src/repodb.py diff --git a/src/dependency.py b/src/dependency.py new file mode 100644 index 00000000..61e0b859 --- /dev/null +++ b/src/dependency.py @@ -0,0 +1 @@ +# dependency analyzer diff --git a/src/install.py b/src/install.py new file mode 100644 index 00000000..a8aa4666 --- /dev/null +++ b/src/install.py @@ -0,0 +1,27 @@ +#import package +from specfile import SpecFile +from package import Package +#import repodb +#import packagedb +#import dependency +#import conflicts + + +def install_package_file(package_fn): + + package = Package(package_fn, "r") + # extract control files + package.extract_files(tmp_dir + "install/") + + # verify package + # check file semantics + # check file system requirements + # check conflicts + # check dependencies + + # unzip package in place + + # update databases + + # installdb + diff --git a/src/installdb.py b/src/installdb.py new file mode 100644 index 00000000..b8e8f020 --- /dev/null +++ b/src/installdb.py @@ -0,0 +1 @@ +# installation database diff --git a/src/package.py b/src/package.py new file mode 100644 index 00000000..f38e90c0 --- /dev/null +++ b/src/package.py @@ -0,0 +1,19 @@ +# package abstraction +# provides methods to add/remove files, extract control files + +class Package: + """Package: PISI package class""" + def __init__(self, packagefn, mode): + self.filename = packagefn + self.mode = mode + # etc. etc. + + def add_file(fn): + """add a file to package""" + + def extract(outdir): + """extract package contents to directory""" + + def extract_PISI_files(outdir): + """extract PISI control files: metadata.xml, files.xml, + action scripts, etc.""" diff --git a/src/repodb.py b/src/repodb.py new file mode 100644 index 00000000..d2d1779c --- /dev/null +++ b/src/repodb.py @@ -0,0 +1,2 @@ +# package database +# interface for update/query to local package repository diff --git a/src/specfile.py b/src/specfile.py index 44145aec..f9f171dc 100644 --- a/src/specfile.py +++ b/src/specfile.py @@ -2,6 +2,11 @@ import xml.dom.minidom +class Patch: + def __init__(self, filename, patchtype): + self.filename = filename + self.compressionType = patchtype + class XmlFile(object): """A class for retrieving information from an XML file"""