Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Another way to maintain your system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
neumond
n00b
n00b


Joined: 22 Nov 2014
Posts: 5

PostPosted: Sat Nov 22, 2014 2:36 am    Post subject: Another way to maintain your system Reply with quote

Dealing with /etc/portage/package.* and /var/lib/portage/world files I came to a conclusion: some records are intentional and the rest are unintentional, just allowing me to proceed further. When you just start installing the system, its not a big deal to know where your settings and packages were intentional. But after some updating and continuous using you need some cleanup, that is usually hard to make.

To separate intentional settings you can create custom profile:

file: eapi <<<
5
<<<

file: make.defaults <<<
USE="some common use flags, separated from your hardware dependant make.conf"
<<<

file: package.use, package.mask, etc
intentional per-package settings

file: packages
intentional top-level packages. now you don't worry you can forget -1. also you can track your new packages in /var/lib/portage/world and if you need them, add to packages

file: parent
path to base profile you usually choose.

You cannot choose your profile with eselect, but you can make symlink /etc/portage/make.profile

Now you can remove all package.* files in /etc on every update safely. Also you can clear /var/lib/portage/world.
Back to top
View user's profile Send private message
Naib
Advocate
Advocate


Joined: 21 May 2004
Posts: 4200
Location: Removed by Neddy

PostPosted: Sat Nov 22, 2014 8:10 am    Post subject: Reply with quote

Why would you clear portage/world
_________________
A free press is the unsleeping guardian of every other right that free men prize; it is the most dangerous foe of tyranny. Where men have the habit of liberty, the Press will continue to be the vigilant guardian of the rights of the ordinary citizen.
Back to top
View user's profile Send private message
neumond
n00b
n00b


Joined: 22 Nov 2014
Posts: 5

PostPosted: Sat Nov 22, 2014 11:24 pm    Post subject: Reply with quote

Not just clear, but have ability to separate junk and useful things, then add them into profile. E.g. you always have to worry about -1 flag when you install temporary packages. Use flags and accepted keywords which just "necessary to proceed", do you really need them? You just move useful lines into custom profile, and can easily clear all that junk, without the need in complex scripts to cleanup package.*.
Back to top
View user's profile Send private message
jonathan183
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2011
Posts: 113

PostPosted: Sun Nov 23, 2014 1:05 am    Post subject: Reply with quote

neumond wrote:
Not just clear, but have ability to separate junk and useful things, then add them into profile.

/etc/portage/package.use /etc/protage/package.keyword and friends can be folders, so you could create folders and then for everthing you really wanted put in /etc/portage/package.use/everything_i_set_because_I_want_it
and put everything else in /etc/portage/package.use/emerge_world_fixes_only_I_did_not_care_about_until_it_stopped_my_emerge
A quick sort and comparison of a previous world file will soon show differences which can then be quickly fixed ... works for me ;)
Back to top
View user's profile Send private message
neumond
n00b
n00b


Joined: 22 Nov 2014
Posts: 5

PostPosted: Sun Nov 23, 2014 1:25 am    Post subject: Reply with quote

Well, yes, it should work. But you cannot comment world file, also it forces alphabetic order of lines. Probably that can be solved with couple of simple scripts. Thanks for critics.
Back to top
View user's profile Send private message
jonathan183
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2011
Posts: 113

PostPosted: Sun Nov 23, 2014 2:09 am    Post subject: Reply with quote

Code:
sort /var/lib/portage/world > world_file_nov_2014.txt

at some point later ...
Code:
sort /var/lib/portage/world > world_file_nov_2015.txt


on screen manual comparison
Code:
vimdiff world_file_nov_2014.txt world_file_nov_2015.txt


Code:
comm -3 world_file_nov_2014.txt world_file_nov_2015.txt

shortlist of things in the latest world set

For a list of everything you have in package.use
Code:
cat /etc/portage/package.use/*
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
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