Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156282 - [PATCH] new FEATURES=unmerge-backup option to build binpkgs before unmerging it
Summary: [PATCH] new FEATURES=unmerge-backup option to build binpkgs before unmerging it
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 54113 78383 88997 127797 183283 321091 (view as bug list)
Depends on:
Blocks: 423075
  Show dependency tree
 
Reported: 2006-11-26 02:51 UTC by BlinkEye
Modified: 2012-07-08 13:13 UTC (History)
7 users (show)

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


Attachments
Applying this patch portage will create a binary package of the package which is about to be removed. (portage.patch,396 bytes, patch)
2006-11-26 02:54 UTC, BlinkEye
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BlinkEye 2006-11-26 02:51:26 UTC
I suggest a new /etc/make.conf FEATURE like "failback" which will build a binary package just prior to unmerging a package.

I'm well aware of the FEATURE buildpkg, but actually I don't always want those binary packages laying around and am sometimes forced to clean $PKGDIR (and sometimes it was not activated at all emerging the old package). Using the suggested feature would allow not to care about binary packages at all but would guarantee that if we update we would have a failback package, namely the one which was working just beforehand.

The provided patch (for sys-apps/portage-2.1.1-r2) just calls quickpkg before unmerging the package. This is how I'm using it at the moment.
Comment 1 BlinkEye 2006-11-26 02:54:04 UTC
Created attachment 102740 [details, diff]
Applying this patch portage will create a binary package of the package which is about to be removed.
Comment 2 Zac Medico gentoo-dev 2006-11-26 03:18:17 UTC
(In reply to comment #0)
> I suggest a new /etc/make.conf FEATURE like "failback" which will build a
> binary package just prior to unmerging a package.
> 
> I'm well aware of the FEATURE buildpkg, but actually I don't always want those
> binary packages laying around and am sometimes forced to clean $PKGDIR (and

You can use eclean from app-portage/gentoolkit to clean unwanted binary packages.

> sometimes it was not activated at all emerging the old package). Using the
> suggested feature would allow not to care about binary packages at all but
> would guarantee that if we update we would have a failback package, namely the
> one which was working just beforehand.
> 
> The provided patch (for sys-apps/portage-2.1.1-r2) just calls quickpkg before
> unmerging the package. This is how I'm using it at the moment.

Sure, it's useful if you haven't had buildpkg enabled, but I think you should just enable buildpkg and use eclean regularly.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 07:14:41 UTC
buildpkg has one disadvantage (or is it an advantage?) to the proposed solution: It will store the vanilla config files instead of the ones in $ROOT. Not a big deal but could be useful in some cases.
Comment 4 BlinkEye 2007-01-11 08:20:24 UTC
Exactly. That's the main reason I'm using it. At first glance it may seem like an overlapping feature - but I call it an enhancement since it does the same thing differently resulting in a (most likely) different binary. I still think the resulting binary is what most people would like - especially when you upgrade and things fail. There's no easier failback than to have a binary which exactly represents the last state (including config files).
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 14:27:57 UTC
*** Bug 78383 has been marked as a duplicate of this bug. ***
Comment 6 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 14:53:45 UTC
*** Bug 88997 has been marked as a duplicate of this bug. ***
Comment 7 Zac Medico gentoo-dev 2007-01-11 20:56:27 UTC

*** This bug has been marked as a duplicate of bug 54113 ***
Comment 8 BlinkEye 2007-01-11 21:35:33 UTC
I don't agree that this bug is a duplicate of http://bugs.gentoo.org/show_bug.cgi?id=54113 . 

# emerge --depclean

can be a dangerous command if you don't know what you're doing (well, what isn't) and has a 13 line warning header, meaning EVERYONE will stop a depclean if he doesn't know what he's doing. 

On th other hand my suggestion doesn't try to protect a user from it's own ignorance. But a user relies on the decision the developer teams make and when portage wants to update packages he'll usually follow the suggestion blindly. The solution (which at the moment is more like a pointer) will diminish frustration from update failures and certainly take heat away from developer teams or gentoo generally.

Wouldn't it be the easiest/most elegant solution to tell the user: don't worry, every time you make an update of a package the prior package will be saved (including the configs) and in case of a problem you may quickly do a rollback - EVEN if you updated/merged your old /etc/* files (which we STRONGLY suggest anyway).

I (still) suggest a (in my opinion default) FEATURES option called something like failback - which will quickpkg the package that is just about to be updated.

I'm inclined to reopen this bug ... but will wait for further input.
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2007-01-12 05:23:14 UTC
I agree, the other way around would be more appropriate.
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2007-01-12 05:23:49 UTC
*** Bug 54113 has been marked as a duplicate of this bug. ***
Comment 11 Marius Mauch (RETIRED) gentoo-dev 2007-06-07 14:16:50 UTC
*** Bug 127797 has been marked as a duplicate of this bug. ***
Comment 12 Zac Medico gentoo-dev 2007-06-26 15:32:41 UTC
*** Bug 183283 has been marked as a duplicate of this bug. ***
Comment 13 Zac Medico gentoo-dev 2010-05-25 07:51:14 UTC
*** Bug 321091 has been marked as a duplicate of this bug. ***
Comment 14 dE 2010-05-27 04:43:00 UTC
*** Bug 321091 has been marked as a duplicate of this bug. ***
Comment 15 dE 2010-05-27 04:43:34 UTC
Consider advices in Bug 321091
Comment 16 dE 2010-05-28 04:23:21 UTC
That patch...it does not implement that upgrade feature as in Bug 321091 right?
Comment 17 Brian Harring (RETIRED) gentoo-dev 2010-05-28 04:28:15 UTC
Name it FEATURE=unmerge-backup please; I added support for this to pkgcore in april of '08, I'd rather not have an incompatibility in portage configuration introduced when portage grows equivalent functionality...
Comment 19 Zac Medico gentoo-dev 2012-07-02 22:09:39 UTC
This is fixed in 2.1.11.4 and 2.2.0_alpha115.
Comment 20 dE 2012-07-08 13:13:23 UTC
WOW! Thanks!!