Kaydet (Commit) ecac1ca4 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Başka bir yapı denemesi.

Nası olsa artık en önemli işi yaptık scom'u çıkarttık. Gerisi çok zor olmasa gerek.
üst ab9448f1
...@@ -102,7 +102,6 @@ ...@@ -102,7 +102,6 @@
Replaces | Replaces |
AdditionalFiles | AdditionalFiles |
Provides Provides
Realtor
)*> )*>
...@@ -118,16 +117,6 @@ ...@@ -118,16 +117,6 @@
<!ELEMENT Service (#PCDATA)> <!ELEMENT Service (#PCDATA)>
<!ATTLIST Service runlevel CDATA #IMPLIED> <!ATTLIST Service runlevel CDATA #IMPLIED>
<!ELEMENT Realtor (PreInstall)>
<!ELEMENT PreInstall (#PCDATA)>
<!ELEMENT Realtor (PostInstall)>
<!ELEMENT PostInstall (#PCDATA)>
<!ELEMENT Realtor (PreRemove)>
<!ELEMENT PreRemove (#PCDATA)>
<!ELEMENT Realtor (PostRemove)>
<!ELEMENT PostRemove (#PCDATA)>
<!ELEMENT Conflicts (Package)+> <!ELEMENT Conflicts (Package)+>
<!-- we have a problem here, this Package tag only contains a package name <!-- we have a problem here, this Package tag only contains a package name
while dtd treats this as another Package section, who said dtd doesnt while dtd treats this as another Package section, who said dtd doesnt
......
...@@ -1525,43 +1525,6 @@ ...@@ -1525,43 +1525,6 @@
</optional> </optional>
</define> </define>
<!-- Realtor -->
<define name="Realtor">
<element name="Realtor">
<oneOrMore>
<ref name="PreRemove"/>
<ref name="PreInstall"/>
<ref name="PostRemove"/>
<ref name="PostInstall"/>
</oneOrMore>
</element>
</define>
<!-- PreRemove -->
<define name="PreRemove">
<element name="PreRemove">
<text/>
</element>
</define>
<!-- PreInstall -->
<define name="PreInstall">
<element name="PreInstall">
<text/>
</element>
</define>
<!-- PostRemove -->
<define name="PostRemove">
<element name="PostRemove">
<text/>
</element>
</define>
<!-- PostInstall -->
<define name="PostInstall">
<element name="PostInstall">
<text/>
</element>
</define>
<!-- Conflicts --> <!-- Conflicts -->
<define name="Conflicts"> <define name="Conflicts">
<element name="Conflicts"> <element name="Conflicts">
......
...@@ -302,8 +302,8 @@ class Install(AtomicOperation): ...@@ -302,8 +302,8 @@ class Install(AtomicOperation):
def preinstall(self): def preinstall(self):
try: try:
if self.metadata.package.realtorPreInstall: if self.metadata.package.postopsPreInstall:
command=self.metadata.package.realtorPreInstall[0] command=self.metadata.package.postopsPreInstall[0]
if os.system(command) != 0: if os.system(command) != 0:
ctx.ui.error(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name)) ctx.ui.error(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name))
except AttributeError: except AttributeError:
...@@ -322,8 +322,8 @@ class Install(AtomicOperation): ...@@ -322,8 +322,8 @@ class Install(AtomicOperation):
# ctx.ui.info(_("Chowning in postinstall {0} ({1}:{2})").format(_file.path, _file.uid, _file.gid), verbose=True) # ctx.ui.info(_("Chowning in postinstall {0} ({1}:{2})").format(_file.path, _file.uid, _file.gid), verbose=True)
# os.chown(fpath, int(_file.uid), int(_file.gid)) # os.chown(fpath, int(_file.uid), int(_file.gid))
try: try:
if self.metadata.package.realtorPostInstall: if self.metadata.package.postopsPostInstall:
command=self.metadata.package.realtorPostInstall[0] command=self.metadata.package.postopsPostInstall[0]
if os.system(command) != 0: if os.system(command) != 0:
ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name)) ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name))
self.config_later = True self.config_later = True
...@@ -507,7 +507,6 @@ class Install(AtomicOperation): ...@@ -507,7 +507,6 @@ class Install(AtomicOperation):
if self.reinstall(): if self.reinstall():
util.clean_dir(self.old_path) util.clean_dir(self.old_path)
self.package.extract_file_synced(ctx.const.files_xml, self.package.pkg_dir()) self.package.extract_file_synced(ctx.const.files_xml, self.package.pkg_dir())
self.package.extract_file_synced(ctx.const.metadata_xml, self.package.pkg_dir()) self.package.extract_file_synced(ctx.const.metadata_xml, self.package.pkg_dir())
...@@ -673,8 +672,8 @@ class Remove(AtomicOperation): ...@@ -673,8 +672,8 @@ class Remove(AtomicOperation):
def run_preremove(self): def run_preremove(self):
try: try:
if self.package.realtorPreRemove: if self.package.postopsPreRemove:
command=self.package.realtorPreRemove[0] command=self.package.postopsPreRemove[0]
if os.system(command) != 0: if os.system(command) != 0:
ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name)) ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name))
except AttributeError: except AttributeError:
...@@ -682,8 +681,8 @@ class Remove(AtomicOperation): ...@@ -682,8 +681,8 @@ class Remove(AtomicOperation):
def run_postremove(self): def run_postremove(self):
try: try:
if self.package.realtorPostRemove: if self.package.postopsPostRemove:
command=self.package.realtorPostRemove[0] command=self.package.postopsPostRemove[0]
if os.system(command) != 0: if os.system(command) != 0:
ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name)) ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name))
except AttributeError: except AttributeError:
......
...@@ -49,7 +49,7 @@ def configure_pending(packages=None): ...@@ -49,7 +49,7 @@ def configure_pending(packages=None):
pkginfo.name = x pkginfo.name = x
ctx.ui.notify(inary.ui.configuring, package=pkginfo, files=None) ctx.ui.notify(inary.ui.configuring, package=pkginfo, files=None)
command=m.package.realtorPostInstall[0] command=m.package.postopsPostInstall[0]
if os.system(command) != 0: if os.system(command) != 0:
ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(pkginfo.name)) ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(pkginfo.name))
......
...@@ -58,6 +58,7 @@ class Package(specfile.Package, xmlfile.XmlFile, metaclass=autoxml.autoxml): ...@@ -58,6 +58,7 @@ class Package(specfile.Package, xmlfile.XmlFile, metaclass=autoxml.autoxml):
t_DeltaPackages = [[Delta], autoxml.optional] t_DeltaPackages = [[Delta], autoxml.optional]
t_PackageFormat = [autoxml.String, autoxml.optional] t_PackageFormat = [autoxml.String, autoxml.optional]
t_Rfp = [autoxml.String, autoxml.optional] t_Rfp = [autoxml.String, autoxml.optional]
t_PostOps = [autoxml.String, autoxml.optional]
t_Source = [Source, autoxml.optional] t_Source = [Source, autoxml.optional]
...@@ -128,11 +129,6 @@ class MetaData(xmlfile.XmlFile, metaclass=autoxml.autoxml): ...@@ -128,11 +129,6 @@ class MetaData(xmlfile.XmlFile, metaclass=autoxml.autoxml):
self.package.providesCMAKE = pkg.providesCMAKE self.package.providesCMAKE = pkg.providesCMAKE
self.package.providesPkgConfig = pkg.providesPkgConfig self.package.providesPkgConfig = pkg.providesPkgConfig
self.package.providesService = pkg.providesService self.package.providesService = pkg.providesService
# Realtors
self.package.realtorPreInstall = pkg.realtorPreInstall
self.package.realtorPostInstall = pkg.realtorPostInstall
self.package.realtorPreRemove = pkg.realtorPreRemove
self.package.realtorPostRemove = pkg.realtorPostRemove
# FIXME: no need to copy full history with comments # FIXME: no need to copy full history with comments
self.package.history = history self.package.history = history
self.package.conflicts = pkg.conflicts self.package.conflicts = pkg.conflicts
......
...@@ -249,10 +249,6 @@ class Package(metaclass=autoxml.autoxml): ...@@ -249,10 +249,6 @@ class Package(metaclass=autoxml.autoxml):
t_ProvidesPkgConfig = [[autoxml.String], autoxml.optional, "Provides/PkgConfig"] t_ProvidesPkgConfig = [[autoxml.String], autoxml.optional, "Provides/PkgConfig"]
t_ProvidesSharedObject = [[autoxml.String], autoxml.optional, "Provides/SharedObject"] t_ProvidesSharedObject = [[autoxml.String], autoxml.optional, "Provides/SharedObject"]
t_ProvidesService = [[ServiceProvide], autoxml.optional, "Provides/Service"] t_ProvidesService = [[ServiceProvide], autoxml.optional, "Provides/Service"]
t_RealtorPreInstall = [[autoxml.String], autoxml.optional, "Realtor/PreInstall"]
t_RealtorPostInstall = [[autoxml.String], autoxml.optional, "Realtor/PostInstall"]
t_RealtorPreRemove = [[autoxml.String], autoxml.optional, "Realtor/PreRemove"]
t_RealtorPostRemove = [[autoxml.String], autoxml.optional, "Realtor/PostRemove"]
t_AdditionalFiles = [[AdditionalFile], autoxml.optional] t_AdditionalFiles = [[AdditionalFile], autoxml.optional]
t_History = [[Update], autoxml.optional] t_History = [[Update], autoxml.optional]
......
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