Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to Update files system thinks haven't changed? [SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
thestarman
n00b
n00b


Joined: 27 May 2014
Posts: 14
Location: Los Angeles

PostPosted: Tue May 27, 2014 6:05 pm    Post subject: How to Update files system thinks haven't changed? [SOLVED] Reply with quote

I recently deleted (long story -- see previous post) all my /bin files, then manually replaced them with those from the "install-amd64-minimal-20140522.iso" CD that I had to boot-up from. Most of the files had not changed (I had a list of MD5 sums from an up-to-date emerge to check them against), but now want to get those updated to the correct versions.

I believe that because I'd already done a full emerge, that somewhere in my Gentoo install, it saved an index that a particular file is at a certain version and therefore doesn't need to be updated. If so, how do I force it to update a certain file?

If anyone cares to check for me, I can send you all the MD5 sums for the currently installed files in /bin; minus the symbolic links.

Thank you, TheStarman.


Last edited by thestarman on Tue Jun 17, 2014 9:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44230
Location: 56N 3W

PostPosted: Tue May 27, 2014 8:20 pm    Post subject: Reply with quote

thestarman,

Code:
emerge -e @world
provided your world file is still present.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
thestarman
n00b
n00b


Joined: 27 May 2014
Posts: 14
Location: Los Angeles

PostPosted: Tue May 27, 2014 8:48 pm    Post subject: Reply with quote

NeddySeagoon wrote:
thestarman,

Code:
emerge -e @world
provided your world file is still present.


That's a ridiculous amount of re-installing! It wants to redo installing 285+ MEGABYTES (I used -ave to see what it would do); almost like starting over again. For having deleted just, oh, maybe 7 small files in /bin that now need to be updated.

Moral: ALWAYS BACK-UP BEFORE DELETING ANYTHING !!!

TheStarman.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10395
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue May 27, 2014 9:27 pm    Post subject: Reply with quote

Do you know which 7 small files? If so, you can find out what packages they belong to with
Code:
equery belongs full-path-of-small-file
Once you've found out which packages they belong to, you can rebuild just those packages. For example:
Code:
~ # equery belongs /bin/cat
 * Searching for /bin/cat ...
sys-apps/coreutils-8.21 (/bin/cat)
IPSN-JOHNGRAH2 ~ # emerge -1v coreutils
If you don't know which 7 files—and you're absolutely sure that your inadvertent delete and subsequent replacement only affected /bin—then I suppose you could just do the above procedure on every file in /bin. Otherwise, you'll have to do it NeddySeagoon's way.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14400

PostPosted: Tue May 27, 2014 10:16 pm    Post subject: Reply with quote

If you only need to rebuild files which differ from the ones you copied from elsewhere, you could use equery check to find files for which the recorded checksum does not match the actual checksum. That would spare you rebuilding every package that owns a file in /bin.
Back to top
View user's profile Send private message
thestarman
n00b
n00b


Joined: 27 May 2014
Posts: 14
Location: Los Angeles

PostPosted: Thu May 29, 2014 12:39 am    Post subject: Reply with quote

Hu wrote:
If you only need to rebuild files which differ from the ones you copied from elsewhere, you could use equery check to find files for which the recorded checksum does not match the actual checksum. That would spare you rebuilding every package that owns a file in /bin.


Thank you Hu,

I wish that your reply had been the first one and then/or John Graham's as well. By that time I'd already 'nuked' the whole install; now I really wish I could have seen the results, since yes, there were not many files at all that had been deleted and needed to be updated again!

I hope your replies will help someone else searching for how to handle any important system files that have been accidentally deleted.

TheStarman.
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9292

PostPosted: Thu Jun 12, 2014 3:21 am    Post subject: Reply with quote

I realize this is rather late in coming, but for future reference, emerge /path/to/something/ selects all packages which installed files into that directory as a set to be rebuilt, it operates analogously given names of individual installed files.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7200

PostPosted: Thu Jun 12, 2014 3:43 pm    Post subject: Reply with quote

thestarman wrote:
Moral: ALWAYS BACK-UP BEFORE DELETING ANYTHING !!!
TheStarman.


To cite a famous quote i like :
Code:

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.



ps: desultory, just tried, what an amazing feature! Should send it to gentoo newsletter
Back to top
View user's profile Send private message
thestarman
n00b
n00b


Joined: 27 May 2014
Posts: 14
Location: Los Angeles

PostPosted: Tue Jun 17, 2014 3:55 pm    Post subject: Reply with quote

First, just wanted to let everyone know that I went back and did another gentoo "Desktop" install all over again, and everything is working just fine.

Does this forum have any special way to mark a thread as ANSWERED? Thank you again, John and Hu.

TheStarman.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44230
Location: 56N 3W

PostPosted: Tue Jun 17, 2014 7:43 pm    Post subject: Reply with quote

thestarman,

You can edit the title of your original post in the thread to add [Solved]
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44230
Location: 56N 3W

PostPosted: Tue Jun 17, 2014 7:44 pm    Post subject: Reply with quote

desultory,

I'll need to remember that one.
Thank you.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Jun 17, 2014 8:57 pm    Post subject: Reply with quote

desultory wrote:
[...] for future reference, emerge /path/to/something/ selects all packages which installed files into that directory as a set to be rebuilt, it operates analogously given names of individual installed files.

desultory ... I'll join in the chorus of meeeetoooo :)

I guess one needs --noconfmem for /etc though, or anything thats CONFIG_PROTECT'd.

thanks & best ... khay
Back to top
View user's profile Send private message
thestarman
n00b
n00b


Joined: 27 May 2014
Posts: 14
Location: Los Angeles

PostPosted: Tue Jun 17, 2014 9:10 pm    Post subject: How to Update files system thinks haven't changed? [SOLVED] Reply with quote

NeddySeagoon wrote:
thestarman,

You can edit the title of your original post in the thread to add [Solved]


Thank you Neddy.
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 634

PostPosted: Wed Jun 18, 2014 2:39 am    Post subject: Reply with quote

Every few months I go ahead and kickoff what I consider a refresh build:

Code:
'nice emerge -e @system --keep-going y ; nice emerge -e @world --keep-going y'.


Doesn't hurt once and a while
:)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Jun 18, 2014 11:52 am    Post subject: Reply with quote

russK wrote:
Every few months I go ahead and kickoff what I consider a refresh build: [...] Doesn't hurt once and a while.

russK ... far be it for me to tell you how to expend your CPU cycles but the above is really only necessary if you want to take advantage of some compiler update, or change CFLAGS, or if migrating to a hardened profile. Otherwise, no real benefit can come from doing this.

best ... khay
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 634

PostPosted: Wed Jun 18, 2014 1:42 pm    Post subject: Reply with quote

khayyam wrote:
russK ... far be it for me to tell you how to expend your CPU cycles but the above is really only necessary if you want to take advantage of some compiler update, or change CFLAGS, or if migrating to a hardened profile. Otherwise, no real benefit can come from doing this.


In theory I agree but I swear there have been times when mysterious problems disappeared after doing this, I think it scares away ghosts or something. :wink:
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Jun 18, 2014 7:33 pm    Post subject: Reply with quote

russK wrote:
khayyam wrote:
russK ... far be it for me to tell you how to expend your CPU cycles but the above is really only necessary if you want to take advantage of some compiler update, or change CFLAGS, or if migrating to a hardened profile. Otherwise, no real benefit can come from doing this.

In theory I agree but I swear there have been times when mysterious problems disappeared after doing this, I think it scares away ghosts or something. :wink:

russK ... and these ghosts start appearing "every few months"? I wouldn't say that was typical, I've never encounted one and I've had installs that have been gradually updated for many years without the need of --emptytree. That said I'm very selective about what I choose to install.

best ... khay
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 634

PostPosted: Wed Jun 18, 2014 8:11 pm    Post subject: Reply with quote

Quote:

and these ghosts start appearing "every few months"? I wouldn't say that was typical, I've never encounted one and I've had installs that have been gradually updated for many years without the need of --emptytree. That said I'm very selective about what I choose to install.

I like to live on the edge and try things in haunted overlays. emerge -e helps get back to normal after a good fright.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44230
Location: 56N 3W

PostPosted: Wed Jun 18, 2014 8:23 pm    Post subject: Reply with quote

russK,

Turn on FEATURES=buildpkg, then use the -k option to emerge. It will save you a lot of build time.
I'll let you read the man pages to see what these options do
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7328
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 18, 2014 8:25 pm    Post subject: Reply with quote

desultory wrote:
I realize this is rather late in coming, but for future reference, emerge /path/to/something/ selects all packages which installed files into that directory as a set to be rebuilt, it operates analogously given names of individual installed files.


Never heard of that! It works indeed. 8O
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 634

PostPosted: Thu Jun 19, 2014 11:00 pm    Post subject: Reply with quote

NeddySeagoon wrote:
russK,

Turn on FEATURES=buildpkg, then use the -k option to emerge. It will save you a lot of build time.
I'll let you read the man pages to see what these options do


NeddySeagoon,

Thanks

Do you know if --emptytree implies --with-bdeps y, and if there would be any interaction with -k ?

I'm thinking it does, and I'm trying to wrap my head around whether portage would choose to use a binpkg or rebuild a new one, depending on the origin of the binpkg.

Thanks for any info.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Jun 20, 2014 5:11 pm    Post subject: Reply with quote

Yeah great tip desultory: saved.

Just wanted to check: should we be adding -1 to the command-line so emerge doesn't add to world, or is that assumed when given installed paths?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44230
Location: 56N 3W

PostPosted: Fri Jun 20, 2014 8:47 pm    Post subject: Reply with quote

russK,

I don't know that level of detail.

-k will prefer the binary if it was built with the correct USE flags and matches the required version of the package.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9292

PostPosted: Sat Jun 21, 2014 3:40 am    Post subject: Reply with quote

russK wrote:
Do you know if --emptytree implies --with-bdeps y, and if there would be any interaction with -k ?
So far as I am currently aware, --emptytree does not imply --with-bdeps=y, for the express reason that such dependencies are not necessary with --emptytree --usepkg (-ek), given correctly specified dependencies in the ebuild.

steveL wrote:
Just wanted to check: should we be adding -1 to the command-line so emerge doesn't add to world, or is that assumed when given installed paths?
Good point, I should have been more explicit when I posted that using a file or directory name does not imply -1/--oneshot and it should generally be used only with -1/--oneshot in effect to avoid dependency resolution issues later on.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7200

PostPosted: Sat Jun 21, 2014 4:06 am    Post subject: Reply with quote

russK wrote:
Every few months I go ahead and kickoff what I consider a refresh build:
Code:
'nice emerge -e @system --keep-going y ; nice emerge -e @world --keep-going y'.

Doesn't hurt once and a while
:)


Save one or two trees to even hurt a bit less -> world include system, so if you use -e no need to do system and world, just do world.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum