Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27965 - [patch] add support for a "slot" command to portage updates
Summary: [patch] add support for a "slot" command to portage updates
Status: RESOLVED DUPLICATE of bug 32526
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-04 16:13 UTC by TGL
Modified: 2011-10-30 22:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
slot_updates.patch (slot_updates.patch,3.51 KB, patch)
2003-09-04 16:15 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TGL 2003-09-04 16:13:51 UTC
Here is a patch that add support support for a reslotting command to 
/usr/portage/profile/updates files. I suggest this patch as a solution
to several issues I've noted on my box, and that I've already somehow reported
in a recent post on gentoo-dev mailing list:
http://article.gmane.org/gmane.linux.gentoo.devel/11630

To summarize:

 1) old unslotted package will never get cleaned.

 2) there is from time to time some reslottings in the tree when new slots are 
not really needed, often for cosmetic purpose. But each time a maintainer
decide that "2" sounds better than "2.0", the user gets a ghost package in its 
db that will never get cleaned.

 3) there are some real slot bugs in portage, like bug #26460, and currently
no clean way to solve them.

I think all this issues are somehow blocking for deeper improvements like the 
Masatomo "update in slots" patch (bug #4698), which currently produce strange 
results on a messy db.

The following patch allows to explicit some reslottings in portage updates.
In an update file, the command "slot >=foo/bar-0.9 <foo/bar-1.9 1" will force
the SLOT files of installed foo/bar packages in versions between 0.9 and 1.9
to the value "1". This would allow to correct the above three types of issues:

 1) we could generate once for all an update file for the whole tree, this is 
very scriptable. Sure, it would be a huge update, but it would only have to be 
applied once to get ride of all this old unslotted packages.

 2) when a maintainer decide to change slot "2.0" into slot "2", then he should 
also add "slot >=foo/bar-x.x.x <=foo/bar-y.y.y 2", with x.x.x being the first 
slot 2.0 version that has ever exist in portage tree and y.y.y being the last 
one, to the current update file, so that users' package db will reflect his mind
after the next sync.

 3) if you take the example of the above cited bug, it would be easy to fix it 
by adding a "slot sys-kernel/linux-headers sys-kernel/linux-headers 0" entry to 
an update (plus definitly fixing all ebuilds to slot 0).

I also think this extension of the updates files is backward compatible because
old portage versions will ignore the commands it doesn't know.

Reproducible: Always
Steps to Reproduce:
Comment 1 TGL 2003-09-04 16:15:05 UTC
Created attachment 17091 [details, diff]
slot_updates.patch

This patch is against portage.py from portage-2.0.49-r3.
Comment 2 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-25 08:23:11 UTC
I didn't know this bug and I made a patch on bug 32526.
And the patch I made is included in the latest portage which doesn't exist in portage tree yet.

I just compared 2 patches. They are very alike :)
My patch would also fix 3 issues you showed here.

I'm sorry to not find this bug before I made patch.
If you are ok, I'll close this bug.

Thanks,
Masatomo
Comment 3 TGL 2003-11-26 01:55:12 UTC
Sure you can close this bug :)

What is important is that the feature made it into portage, but I 
don't care about which patch has been used... (and mine is probably 
less complete, and is also outdated)

Thanks for your work,

TGL.
Comment 4 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-26 03:46:46 UTC
OK :)

*** This bug has been marked as a duplicate of 32526 ***