* install isinin icine build no katmayla ilgili calismalar devam
This commit is contained in:
@@ -348,7 +348,6 @@ class Info(Command):
|
|||||||
|
|
||||||
Usage: info <package1> <package2> ... <packagen>
|
Usage: info <package1> <package2> ... <packagen>
|
||||||
|
|
||||||
TODO: Some description
|
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Info, self).__init__()
|
super(Info, self).__init__()
|
||||||
|
|||||||
+18
-2
@@ -83,7 +83,6 @@ class Installer:
|
|||||||
' not satisfied\n')
|
' not satisfied\n')
|
||||||
raise InstallError("Package not installable")
|
raise InstallError("Package not installable")
|
||||||
|
|
||||||
# FIXME: where is build no?
|
|
||||||
def reinstall(self):
|
def reinstall(self):
|
||||||
"check reinstall, confirm action, and remove package if reinstall"
|
"check reinstall, confirm action, and remove package if reinstall"
|
||||||
|
|
||||||
@@ -92,7 +91,18 @@ class Installer:
|
|||||||
if installdb.is_installed(pkg.name): # is this a reinstallation?
|
if installdb.is_installed(pkg.name): # is this a reinstallation?
|
||||||
(iversion, irelease, ibuild) = installdb.get_version(pkg.name)
|
(iversion, irelease, ibuild) = installdb.get_version(pkg.name)
|
||||||
|
|
||||||
if pkg.version == iversion and pkg.release == irelease:
|
# determine if same version
|
||||||
|
same_ver = False
|
||||||
|
ignore_build = config.options and config.options.ignore_build_no
|
||||||
|
if (not ibuild) or (not pkg.build) or ignore_build:
|
||||||
|
# we don't look at builds to compare two package versions
|
||||||
|
if pkg.version == iversion and pkg.release == irelease:
|
||||||
|
same_ver = True
|
||||||
|
else:
|
||||||
|
if pkg.build == ibuild:
|
||||||
|
same_ver = True
|
||||||
|
|
||||||
|
if same_ver:
|
||||||
if self.ask_reinstall:
|
if self.ask_reinstall:
|
||||||
if not ui.confirm('Re-install same version package?'):
|
if not ui.confirm('Re-install same version package?'):
|
||||||
raise InstallError('Package re-install declined')
|
raise InstallError('Package re-install declined')
|
||||||
@@ -106,6 +116,10 @@ class Installer:
|
|||||||
elif pkg.release > irelease:
|
elif pkg.release > irelease:
|
||||||
ui.info('Upgrading to new distribution release\n')
|
ui.info('Upgrading to new distribution release\n')
|
||||||
upgrade = True
|
upgrade = True
|
||||||
|
elif ((not ignore_build) and ibuild and pkg.build
|
||||||
|
and pkg.build > ibuild):
|
||||||
|
ui.info('Upgrading to new distribution build\n')
|
||||||
|
upgrade = True
|
||||||
|
|
||||||
# is this a downgrade? confirm this action.
|
# is this a downgrade? confirm this action.
|
||||||
if self.ask_reinstall and (not upgrade):
|
if self.ask_reinstall and (not upgrade):
|
||||||
@@ -113,6 +127,8 @@ class Installer:
|
|||||||
x = 'Downgrade to old upstream version?'
|
x = 'Downgrade to old upstream version?'
|
||||||
elif pkg.release < irelease:
|
elif pkg.release < irelease:
|
||||||
x = 'Downgrade to old distribution release?'
|
x = 'Downgrade to old distribution release?'
|
||||||
|
else:
|
||||||
|
x = 'Downgrade to old distribution build?'
|
||||||
if not ui.confirm(x):
|
if not ui.confirm(x):
|
||||||
raise InstallError('Package downgrade declined')
|
raise InstallError('Package downgrade declined')
|
||||||
|
|
||||||
|
|||||||
+8
-2
@@ -209,6 +209,8 @@ def upgrade_pkg_names(A):
|
|||||||
"""Re-installs packages from the repository, trying to perform
|
"""Re-installs packages from the repository, trying to perform
|
||||||
a maximum number of upgrades."""
|
a maximum number of upgrades."""
|
||||||
|
|
||||||
|
ignore_build = config.options and config.options.ignore_build_no
|
||||||
|
|
||||||
# filter packages that are not installed
|
# filter packages that are not installed
|
||||||
Ap = []
|
Ap = []
|
||||||
for x in A:
|
for x in A:
|
||||||
@@ -217,7 +219,7 @@ def upgrade_pkg_names(A):
|
|||||||
continue
|
continue
|
||||||
(version, release, build) = installdb.get_version(x)
|
(version, release, build) = installdb.get_version(x)
|
||||||
pkg = packagedb.get_package(x)
|
pkg = packagedb.get_package(x)
|
||||||
if (config.options and config.options.ignore_build_no) or (not build):
|
if ignore_build or (not build):
|
||||||
if release < pkg.release:
|
if release < pkg.release:
|
||||||
Ap.append(x)
|
Ap.append(x)
|
||||||
elif build < pkg.build:
|
elif build < pkg.build:
|
||||||
@@ -260,7 +262,11 @@ def upgrade_pkg_names(A):
|
|||||||
rep_pkg = packagedb.get_package(dep.package)
|
rep_pkg = packagedb.get_package(dep.package)
|
||||||
(vp,rp,bp) = (rep_pkg.version, rep_pkg.release,
|
(vp,rp,bp) = (rep_pkg.version, rep_pkg.release,
|
||||||
rep_pkg.build)
|
rep_pkg.build)
|
||||||
if r >= rp: # installed already older
|
if ignore_build or (not b) or (not bp):
|
||||||
|
# if we can't look at build
|
||||||
|
if r >= rp: # installed already new
|
||||||
|
continue
|
||||||
|
elif b and bp and b >= bp:
|
||||||
continue
|
continue
|
||||||
if not dep.package in G_f.vertices():
|
if not dep.package in G_f.vertices():
|
||||||
Bp.add(str(dep.package))
|
Bp.add(str(dep.package))
|
||||||
|
|||||||
Reference in New Issue
Block a user