aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Erdmann <dywi@mailerd.de>2014-07-14 21:24:03 +0200
committerAndré Erdmann <dywi@mailerd.de>2014-07-14 21:34:29 +0200
commit9b3fbe036fcffdb481bec73fa316c93805182739 (patch)
treeb55faf198a3acb8e86e053c058754f8d7717b419 /roverlay/overlay
parentaddition control: rename force-add=>force-replace (diff)
downloadR_overlay-9b3fbe036fcffdb481bec73fa316c93805182739.tar.gz
R_overlay-9b3fbe036fcffdb481bec73fa316c93805182739.tar.bz2
R_overlay-9b3fbe036fcffdb481bec73fa316c93805182739.zip
addition control: add replace-only
Diffstat (limited to 'roverlay/overlay')
-rw-r--r--roverlay/overlay/abccontrol.py2
-rw-r--r--roverlay/overlay/pkgdir/packagedir_base.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/roverlay/overlay/abccontrol.py b/roverlay/overlay/abccontrol.py
index e351909..f5def2a 100644
--- a/roverlay/overlay/abccontrol.py
+++ b/roverlay/overlay/abccontrol.py
@@ -64,7 +64,7 @@ class AdditionControlResult ( object ):
PKG_FORCE_DENY = 2**0
PKG_DENY_REPLACE = 2**1
PKG_FORCE_REPLACE = 2**2
- #PKG_REPLACE_ONLY
+ PKG_REPLACE_ONLY = 2**3
PKG_REVBUMP_ON_COLLISION = 2**4
PKG_DEFAULT_BEHAVIOR = 0
diff --git a/roverlay/overlay/pkgdir/packagedir_base.py b/roverlay/overlay/pkgdir/packagedir_base.py
index 7a038ad..155c8e7 100644
--- a/roverlay/overlay/pkgdir/packagedir_base.py
+++ b/roverlay/overlay/pkgdir/packagedir_base.py
@@ -239,6 +239,7 @@ class PackageDirBase ( roverlay.overlay.base.OverlayObject ):
_PKG_DENY_REPLACE = AdditionControlResult.PKG_DENY_REPLACE
_PKG_FORCE_REPLACE = AdditionControlResult.PKG_FORCE_REPLACE
_PKG_REVBUMP_ON_COLLISION = AdditionControlResult.PKG_REVBUMP_ON_COLLISION
+ _PKG_REPLACE_ONLY = AdditionControlResult.PKG_REPLACE_ONLY
_PKG_DEFAULT_BEHAVIOR = AdditionControlResult.PKG_DEFAULT_BEHAVIOR
def package_try_replace (
@@ -381,8 +382,8 @@ class PackageDirBase ( roverlay.overlay.base.OverlayObject ):
allow_postpone = allow_postpone
)
-# elif addition_override & _PKG_REPLACE_ONLY:
-# return False
+ elif addition_override & _PKG_REPLACE_ONLY:
+ return False
elif self.DISTROOT.handle_file_collision ( self, package_info ):
self._packages [shortver] = package_info