diff options
-rw-r--r-- | src/cpt-lib | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/cpt-lib b/src/cpt-lib index 742bf17..da6faa4 100644 --- a/src/cpt-lib +++ b/src/cpt-lib @@ -1270,13 +1270,8 @@ pkg_swap() { # # Print the full path to the manifest file which contains # the match to our search. - pkg_owns=$(set +f; "$grep" -lFx "$2" "$sys_db/"*/manifest) ||: - # Extract the package name from the path above. - pkg_owns=${pkg_owns%/*} - pkg_owns=${pkg_owns##*/} - - [ "$pkg_owns" ] || + pkg_owns=$(pkg_owner -lFx "$2") || die "File '$2' exists on filesystem but isn't owned" log "Swapping '$2' from '$pkg_owns' to '$1'" |