public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Reconstruct package.use
@ 2015-03-14 22:12 Alan McKinnon
  2015-03-14 22:36 ` Simon Thelen
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Alan McKinnon @ 2015-03-14 22:12 UTC (permalink / raw
  To: gentoo-user

It took 10 years but I've finally done something monumentally stupid in
Gentoo:

I delete package.use and have no backup

Is there any easy way to recover what was in it? I'm busy doing it the
long way round - repeatedly running emerge world, get past the blocking
USE, then see all the flags that portage thinks changed.

I wonder if there might be an easier way that I don't know of.

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Reconstruct package.use
  2015-03-14 22:12 [gentoo-user] Reconstruct package.use Alan McKinnon
@ 2015-03-14 22:36 ` Simon Thelen
  2015-03-14 23:07   ` Alan McKinnon
  2015-03-14 23:52 ` [gentoo-user] " Neil Bothwick
  2015-03-15 14:45 ` Bruce Hill, Jr.
  2 siblings, 1 reply; 10+ messages in thread
From: Simon Thelen @ 2015-03-14 22:36 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

On 15-03-15 at 00:12, Alan McKinnon wrote:
> It took 10 years but I've finally done something monumentally stupid in
> Gentoo:
> 
> I delete package.use and have no backup
> 
> Is there any easy way to recover what was in it? I'm busy doing it the
> long way round - repeatedly running emerge world, get past the blocking
> USE, then see all the flags that portage thinks changed.
> 
> I wonder if there might be an easier way that I don't know of.
Have you tried:
emerge -pDU --with-bdeps=y @world

That should list all packages where the installed use-flags differ from
the "current" use-flags.

-- 
Simon Thelen

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Reconstruct package.use
  2015-03-14 22:36 ` Simon Thelen
@ 2015-03-14 23:07   ` Alan McKinnon
  2015-03-14 23:39     ` [gentoo-user] " James
  0 siblings, 1 reply; 10+ messages in thread
From: Alan McKinnon @ 2015-03-14 23:07 UTC (permalink / raw
  To: gentoo-user

On 15/03/2015 00:36, Simon Thelen wrote:
> On 15-03-15 at 00:12, Alan McKinnon wrote:
>> It took 10 years but I've finally done something monumentally stupid in
>> Gentoo:
>>
>> I delete package.use and have no backup
>>
>> Is there any easy way to recover what was in it? I'm busy doing it the
>> long way round - repeatedly running emerge world, get past the blocking
>> USE, then see all the flags that portage thinks changed.
>>
>> I wonder if there might be an easier way that I don't know of.
> Have you tried:
> emerge -pDU --with-bdeps=y @world
> 
> That should list all packages where the installed use-flags differ from
> the "current" use-flags.
> 


That is the process I'm using.
I'm looking for an easier way :-)


-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gentoo-user] Re: Reconstruct package.use
  2015-03-14 23:07   ` Alan McKinnon
@ 2015-03-14 23:39     ` James
  2015-03-14 23:56       ` Alan McKinnon
  0 siblings, 1 reply; 10+ messages in thread
From: James @ 2015-03-14 23:39 UTC (permalink / raw
  To: gentoo-user

Alan McKinnon <alan.mckinnon <at> gmail.com> writes:


> That is the process I'm using.
> I'm looking for an easier way 


Surely an admin_wizard  has backups?

At least of /etc/?



James






^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Reconstruct package.use
  2015-03-14 22:12 [gentoo-user] Reconstruct package.use Alan McKinnon
  2015-03-14 22:36 ` Simon Thelen
@ 2015-03-14 23:52 ` Neil Bothwick
  2015-03-15  0:03   ` Alan McKinnon
  2015-03-15 14:45 ` Bruce Hill, Jr.
  2 siblings, 1 reply; 10+ messages in thread
From: Neil Bothwick @ 2015-03-14 23:52 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]

On Sun, 15 Mar 2015 00:12:49 +0200, Alan McKinnon wrote:

> I delete package.use and have no backup
> 
> Is there any easy way to recover what was in it? I'm busy doing it the
> long way round - repeatedly running emerge world, get past the blocking
> USE, then see all the flags that portage thinks changed.
> 
> I wonder if there might be an easier way that I don't know of.

I can't think of an approach any better than what you're doing. But
console yourself with the thought that you will only ever have to do this
once, because you'll always backup /etc/portage from now on.

BTW having backups is no protection against ID-ten-T errors. I no longer
use BackupPC so decided to delete my backuppc subvolume last week, and
used tab completion, not noticing that it completed on backup until an
ohnosecond before hittng enter.

I wondered why the backuppc volume was still listed, then I wondered why
it was listed first, then I cried.


-- 
Neil Bothwick

"Thou shalt not battle over operating systems. I am wise and in My wisdom
have created diverse and various operating systems."
  The Ten Usenet Commandments: One

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Re: Reconstruct package.use
  2015-03-14 23:39     ` [gentoo-user] " James
@ 2015-03-14 23:56       ` Alan McKinnon
  0 siblings, 0 replies; 10+ messages in thread
From: Alan McKinnon @ 2015-03-14 23:56 UTC (permalink / raw
  To: gentoo-user

On 15/03/2015 01:39, James wrote:
> Alan McKinnon <alan.mckinnon <at> gmail.com> writes:
> 
> 
>> That is the process I'm using.
>> I'm looking for an easier way 
> 
> 
> Surely an admin_wizard  has backups?
> 
> At least of /etc/?


Um, err, yeah, well, ahem.

No backups on this host. I forgot....


-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Reconstruct package.use
  2015-03-14 23:52 ` [gentoo-user] " Neil Bothwick
@ 2015-03-15  0:03   ` Alan McKinnon
  0 siblings, 0 replies; 10+ messages in thread
From: Alan McKinnon @ 2015-03-15  0:03 UTC (permalink / raw
  To: gentoo-user

On 15/03/2015 01:52, Neil Bothwick wrote:
> On Sun, 15 Mar 2015 00:12:49 +0200, Alan McKinnon wrote:
> 
>> I delete package.use and have no backup
>>
>> Is there any easy way to recover what was in it? I'm busy doing it the
>> long way round - repeatedly running emerge world, get past the blocking
>> USE, then see all the flags that portage thinks changed.
>>
>> I wonder if there might be an easier way that I don't know of.
> 
> I can't think of an approach any better than what you're doing. But
> console yourself with the thought that you will only ever have to do this
> once, because you'll always backup /etc/portage from now on.


That's what I thought.... oh well...


> BTW having backups is no protection against ID-ten-T errors. I no longer
> use BackupPC so decided to delete my backuppc subvolume last week, and
> used tab completion, not noticing that it completed on backup until an
> ohnosecond before hittng enter.
> 
> I wondered why the backuppc volume was still listed, then I wondered why
> it was listed first, then I cried.

ooooooooh, nasty. We've all done things like that.

My favourite is the time I was trying to run fsck/repair an ext3 volume
and was getting strange errors, which I didn't take time to understand.
Being tired and lazy, I confused --force with RTFM.

Then I noticed it was actually a reiser volume.

One customer machine. Ruined.

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Reconstruct package.use
  2015-03-14 22:12 [gentoo-user] Reconstruct package.use Alan McKinnon
  2015-03-14 22:36 ` Simon Thelen
  2015-03-14 23:52 ` [gentoo-user] " Neil Bothwick
@ 2015-03-15 14:45 ` Bruce Hill, Jr.
  2015-03-15 17:22   ` Neil Bothwick
  2015-03-15 20:56   ` Alan McKinnon
  2 siblings, 2 replies; 10+ messages in thread
From: Bruce Hill, Jr. @ 2015-03-15 14:45 UTC (permalink / raw
  To: gentoo-user; +Cc: Alan McKinnon



> On March 14, 2015 at 6:12 PM Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> 
> 
> It took 10 years but I've finally done something monumentally stupid in
> Gentoo:
> 
> I delete package.use and have no backup
> 
> Is there any easy way to recover what was in it? I'm busy doing it the
> long way round - repeatedly running emerge world, get past the blocking
> USE, then see all the flags that portage thinks changed.
> 
> I wonder if there might be an easier way that I don't know of.
> 
> -- 
> Alan McKinnon
> alan.mckinnon@gmail.com

You have lost nothing, thanks to gentoolkit. Please run "enalyze rebuild use"
and you will get package.use.test which will be the difference between default
USE flags and yours. Then "mv package.use.test /etc/portage/package.use" will
put you back in business.

Happy Penguin Computers    >`) 
805 Grant Street           ( \ 
Bessemer, AL 35020          ^^ 
Cell: 205-535-0347 
support at happypenguincomputers dot com 
http://www.happypenguincomputers.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Reconstruct package.use
  2015-03-15 14:45 ` Bruce Hill, Jr.
@ 2015-03-15 17:22   ` Neil Bothwick
  2015-03-15 20:56   ` Alan McKinnon
  1 sibling, 0 replies; 10+ messages in thread
From: Neil Bothwick @ 2015-03-15 17:22 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

On Sun, 15 Mar 2015 10:45:32 -0400 (EDT), Bruce Hill, Jr. wrote:

> You have lost nothing, thanks to gentoolkit. Please run "enalyze
> rebuild use" and you will get package.use.test which will be the
> difference between default USE flags and yours.

Nice one! Who needs backups?


-- 
Neil Bothwick

If I agreed with you, we'd both be wrong.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Reconstruct package.use
  2015-03-15 14:45 ` Bruce Hill, Jr.
  2015-03-15 17:22   ` Neil Bothwick
@ 2015-03-15 20:56   ` Alan McKinnon
  1 sibling, 0 replies; 10+ messages in thread
From: Alan McKinnon @ 2015-03-15 20:56 UTC (permalink / raw
  To: gentoo-user

On 15/03/2015 16:45, Bruce Hill, Jr. wrote:
> 
> 
>> On March 14, 2015 at 6:12 PM Alan McKinnon <alan.mckinnon@gmail.com> wrote:
>>
>>
>> It took 10 years but I've finally done something monumentally stupid in
>> Gentoo:
>>
>> I delete package.use and have no backup
>>
>> Is there any easy way to recover what was in it? I'm busy doing it the
>> long way round - repeatedly running emerge world, get past the blocking
>> USE, then see all the flags that portage thinks changed.
>>
>> I wonder if there might be an easier way that I don't know of.
>>
>> -- 
>> Alan McKinnon
>> alan.mckinnon@gmail.com
> 
> You have lost nothing, thanks to gentoolkit. Please run "enalyze rebuild use"
> and you will get package.use.test which will be the difference between default
> USE flags and yours. Then "mv package.use.test /etc/portage/package.use" will
> put you back in business.


Good find, hopefully I'll never need it again :-)

As luck would have it, I'd already finished reconstructing the file
manually the long way round - took about 3 hours.


-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-03-15 20:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-14 22:12 [gentoo-user] Reconstruct package.use Alan McKinnon
2015-03-14 22:36 ` Simon Thelen
2015-03-14 23:07   ` Alan McKinnon
2015-03-14 23:39     ` [gentoo-user] " James
2015-03-14 23:56       ` Alan McKinnon
2015-03-14 23:52 ` [gentoo-user] " Neil Bothwick
2015-03-15  0:03   ` Alan McKinnon
2015-03-15 14:45 ` Bruce Hill, Jr.
2015-03-15 17:22   ` Neil Bothwick
2015-03-15 20:56   ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox