View previous topic :: View next topic |
Author |
Message |
thestarman n00b

Joined: 27 May 2014 Posts: 14 Location: Los Angeles
|
Posted: Tue May 27, 2014 6:05 pm Post subject: How to Update files system thinks haven't changed? [SOLVED] |
|
|
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 |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54957 Location: 56N 3W
|
Posted: Tue May 27, 2014 8:20 pm Post subject: |
|
|
thestarman,
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 |
|
 |
thestarman n00b

Joined: 27 May 2014 Posts: 14 Location: Los Angeles
|
Posted: Tue May 27, 2014 8:48 pm Post subject: |
|
|
NeddySeagoon wrote: | thestarman,
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 |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 10739 Location: Somewhere over Atlanta, Georgia
|
Posted: Tue May 27, 2014 9:27 pm Post subject: |
|
|
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 |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23148
|
Posted: Tue May 27, 2014 10:16 pm Post subject: |
|
|
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 |
|
 |
thestarman n00b

Joined: 27 May 2014 Posts: 14 Location: Los Angeles
|
Posted: Thu May 29, 2014 12:39 am Post subject: |
|
|
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 |
|
 |
desultory Bodhisattva


Joined: 04 Nov 2005 Posts: 9410
|
Posted: Thu Jun 12, 2014 3:21 am Post subject: |
|
|
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 |
|
 |
krinn Watchman


Joined: 02 May 2003 Posts: 7471
|
Posted: Thu Jun 12, 2014 3:43 pm Post subject: |
|
|
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 |
|
 |
thestarman n00b

Joined: 27 May 2014 Posts: 14 Location: Los Angeles
|
Posted: Tue Jun 17, 2014 3:55 pm Post subject: |
|
|
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 |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54957 Location: 56N 3W
|
Posted: Tue Jun 17, 2014 7:43 pm Post subject: |
|
|
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 |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54957 Location: 56N 3W
|
Posted: Tue Jun 17, 2014 7:44 pm Post subject: |
|
|
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 |
|
 |
khayyam Watchman


Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Jun 17, 2014 8:57 pm Post subject: |
|
|
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 |
|
 |
thestarman n00b

Joined: 27 May 2014 Posts: 14 Location: Los Angeles
|
Posted: Tue Jun 17, 2014 9:10 pm Post subject: How to Update files system thinks haven't changed? [SOLVED] |
|
|
NeddySeagoon wrote: | thestarman,
You can edit the title of your original post in the thread to add [Solved] |
Thank you Neddy. |
|
Back to top |
|
 |
russK l33t


Joined: 27 Jun 2006 Posts: 665
|
Posted: Wed Jun 18, 2014 2:39 am Post subject: |
|
|
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 |
|
 |
khayyam Watchman


Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Wed Jun 18, 2014 11:52 am Post subject: |
|
|
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 |
|
 |
russK l33t


Joined: 27 Jun 2006 Posts: 665
|
Posted: Wed Jun 18, 2014 1:42 pm Post subject: |
|
|
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.  |
|
Back to top |
|
 |
khayyam Watchman


Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Wed Jun 18, 2014 7:33 pm Post subject: |
|
|
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 |
|
 |
russK l33t


Joined: 27 Jun 2006 Posts: 665
|
Posted: Wed Jun 18, 2014 8:11 pm Post subject: |
|
|
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 |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54957 Location: 56N 3W
|
Posted: Wed Jun 18, 2014 8:23 pm Post subject: |
|
|
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 |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Wed Jun 18, 2014 8:25 pm Post subject: |
|
|
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.  _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
 |
russK l33t


Joined: 27 Jun 2006 Posts: 665
|
Posted: Thu Jun 19, 2014 11:00 pm Post subject: |
|
|
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 |
|
 |
steveL Watchman

Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Fri Jun 20, 2014 5:11 pm Post subject: |
|
|
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 |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54957 Location: 56N 3W
|
Posted: Fri Jun 20, 2014 8:47 pm Post subject: |
|
|
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 |
|
 |
desultory Bodhisattva


Joined: 04 Nov 2005 Posts: 9410
|
Posted: Sat Jun 21, 2014 3:40 am Post subject: |
|
|
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 |
|
 |
krinn Watchman


Joined: 02 May 2003 Posts: 7471
|
Posted: Sat Jun 21, 2014 4:06 am Post subject: |
|
|
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 |
|
 |
|