Add Requires tag to Update with actions:
reverseDependencyUpdate
serviceRestart
systemRestart
Example:
<Update release="6">
<Date>2008-08-27</Date>
<Version>0.28.3</Version>
<Comment>Version bump</Comment>
<Name>Faik Uygur</Name>
<Email>faik@pardus.org.tr</Email>
<Requires>
<Action>revDepUpdates</Action>
<Action>systemRestart</Action>
<Action>serviceRestart</Action>
</Requires>
</Update>
Requires is optional. An Action is mandatory.
This commit is contained in:
@@ -71,11 +71,14 @@ def upgrade_pkg_names(A = []):
|
||||
ctx.ui.info(_('Package %s is not available in repositories.') % x, True)
|
||||
continue
|
||||
|
||||
updates = [i for i in pkg.history if pisi.version.Version(i.release) > pisi.version.Version(release)]
|
||||
if security_only:
|
||||
updates = [i for i in pkg.history if pisi.version.Version(i.release) > pisi.version.Version(release)]
|
||||
if not pisi.util.any(lambda i:i.type == 'security', updates):
|
||||
continue
|
||||
|
||||
if pisi.util.any(lambda x:x.requires and "reverseDependencyUpdate" in x.requires.action, updates):
|
||||
Ap.extend(map(lambda d:d.package, packagedb.get_rev_deps(x)))
|
||||
|
||||
if ignore_build or (not build) or (not pkg.build):
|
||||
if pisi.version.Version(release) < pisi.version.Version(pkg.release):
|
||||
Ap.append(x)
|
||||
@@ -89,7 +92,6 @@ def upgrade_pkg_names(A = []):
|
||||
ctx.ui.info(_('Package %s is already at the latest build %s.')
|
||||
% (pkg.name, pkg.build), True)
|
||||
|
||||
|
||||
A = set(Ap)
|
||||
|
||||
if len(A)==0:
|
||||
|
||||
+10
-1
@@ -83,6 +83,15 @@ class Patch:
|
||||
s += ' level:' + self.level
|
||||
return s
|
||||
|
||||
class Requires:
|
||||
|
||||
# Valid actions:
|
||||
#
|
||||
# reverseDependencyUpdate
|
||||
# systemRestart
|
||||
# serviceRestart
|
||||
|
||||
t_Action = [ [autoxml.String], autoxml.mandatory]
|
||||
|
||||
class Update:
|
||||
|
||||
@@ -93,6 +102,7 @@ class Update:
|
||||
t_Comment = [autoxml.String, autoxml.optional]
|
||||
t_Name = [autoxml.Text, autoxml.optional]
|
||||
t_Email = [autoxml.String, autoxml.optional]
|
||||
t_Requires = [Requires, autoxml.optional]
|
||||
|
||||
def __str__(self):
|
||||
s = self.date
|
||||
@@ -102,7 +112,6 @@ class Update:
|
||||
s += ", type=" + self.type
|
||||
return s
|
||||
|
||||
|
||||
class Path:
|
||||
|
||||
s_Path = [autoxml.String, autoxml.mandatory]
|
||||
|
||||
Reference in New Issue
Block a user