Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 680346

Summary: app-portage/portage-utils - qmerge should support package moves
Product: Portage Development Reporter: Joakim Tjernlund <joakim.tjernlund>
Component: ToolsAssignee: Fabian Groffen <grobian>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Joakim Tjernlund 2019-03-14 17:45:46 UTC
As far as I can see, qmerge has no clue about pkg moves
Comment 1 Fabian Groffen gentoo-dev 2019-03-30 12:19:14 UTC
How should it support pkgmoves?  Isn't pkgmove something that should be handled during tree sync?
Comment 2 Joakim Tjernlund 2019-03-30 16:10:23 UTC
(In reply to Fabian Groffen from comment #1)
> How should it support pkgmoves?  Isn't pkgmove something that should be
> handled during tree sync?

Good question, I don't know ..
but now rember, SLOT moves, like nurses did a while back.
How to handle that?
Comment 3 Fabian Groffen gentoo-dev 2019-03-30 16:13:08 UTC
as far as I understand, right now, Portage would rewrite the binpkgs to update SLOTs
Comment 4 Joakim Tjernlund 2019-03-31 15:04:22 UTC
(In reply to Fabian Groffen from comment #3)
> as far as I understand, right now, Portage would rewrite the binpkgs to
> update SLOTs

Not quite sure I follow all this but a target using qmerge may not have portage
installed or an updated Gentoo tree. How would pkg/slot move work here?
Comment 5 Fabian Groffen gentoo-dev 2019-03-31 17:30:21 UTC
(In reply to Joakim Tjernlund from comment #4)
> Not quite sure I follow all this but a target using qmerge may not have
> portage
> installed or an updated Gentoo tree. How would pkg/slot move work here?

Not.  And since the info is in the Gentoo tree, it may not even be available.  As far as I understand, qmerge cannot ever do anything with pkgmoves.
Comment 6 Joakim Tjernlund 2019-10-31 15:34:35 UTC
(In reply to Fabian Groffen from comment #5)
> (In reply to Joakim Tjernlund from comment #4)
> > Not quite sure I follow all this but a target using qmerge may not have
> > portage
> > installed or an updated Gentoo tree. How would pkg/slot move work here?
> 
> Not.  And since the info is in the Gentoo tree, it may not even be
> available.  As far as I understand, qmerge cannot ever do anything with
> pkgmoves.

The move is in the profile which may/is availble. For simplcity one could ask
for move explicitly. I hacked a simple shell script for my simple
ncurces move:
pkg_move() {
    from="$1" # full pkg name, PF i.e sys-libs/ncurses-5.9-r5
    to="$2" # full pkg name, PF i.e sys-libs/ncurses-compat-5.9-r5
    db="/var/db/pkg"

    [ $# -eq 2 ] || return 1 # error, must be two args
    [ -d "$db/$from" ] || return 0 # nothing to move
    [ -d "$db/$to" ] && return 1 # error, must not exist

    PF=$(basename "$to")
    mv "$db/$from" "$db/$to" || echo "failed mv!"
    echo "$PF" > "$db/$to/PF" || echo "failed writing PF!"
    mv "$db/$to/$(basename $from)".ebuild "$db/$to/${PF}".ebuild
}
#Old ncurses moved to ncurses-compat
pkg_move "sys-libs/ncurses-5.9-r5" "sys-libs/ncurses-compat-5.9-r5"