Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Where can i find info about migrating package.* files to dir
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Tue Oct 18, 2011 2:34 pm    Post subject: Where can i find info about migrating package.* files to dir Reply with quote

I want to migrate /etc/portage/package.* files to dirs.
Is there a guide somewhere?
Is there some automated way for doing it? My package.use file is HUGE (382 lines) it would be nightmare to migrate it line by line :?
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Tue Oct 18, 2011 3:07 pm    Post subject: Reply with quote

The simplest migration is:
Code:
cd /etc/portage
mv package.use use.conf
mkdir package.use
mv use.conf package.use


use.conf is an arbitrary file name and the content can be spitted arbitrarily to other files in the directory. No tool would know how you want to organize them though.
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Tue Oct 18, 2011 4:03 pm    Post subject: Reply with quote

sera wrote:
The simplest migration is:
Code:
cd /etc/portage
mv package.use use.conf
mkdir package.use
mv use.conf package.use


use.conf is an arbitrary file name and the content can be spitted arbitrarily to other files in the directory. No tool would know how you want to organize them though.


I thought that package.use directory should be organized in custom cflags manner :

Code:
/etc/portage/package.use/app-office/libreoffice
and libreoffice file should contain the custom useflags and may be custom linguas ?
Or that's just my wishful thinking? :wink:
It seems i can't find any documentation on this subject .
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Tue Oct 18, 2011 4:08 pm    Post subject: Reply with quote

You can organize it that way if you want—it will work—but you don't have to.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.


Last edited by John R. Graham on Tue Oct 18, 2011 4:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Tue Oct 18, 2011 4:19 pm    Post subject: Reply with quote

John R. Graham wrote:
You can organize it that way if you want—it willwork—but you don't have to.

- John


That is a good news!
If i decide to organize it like this what kind of customizations i can put there:

Code:
GENTOO_MIRRORS
FEATURES
MAKEOPTS
LINGUAS
CAMERAS
RUBY_TARGETS


:?:

Can I run in mixed mode: Only special packages will have their directory, all the other will share one big package.use file?
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Tue Oct 18, 2011 4:23 pm    Post subject: Reply with quote

None of those. You can only put package-specific USE flags under the /etc/portage/package.use directory. The directory structure is meaningless (except, perhaps, to you). Similar comments apply to the package.keywords, package.mask, and package.unmask files and/or directories.

What you're talking about is /etc/portage/package.env which has different rules. The man page is a good starting point for learning about that.

- 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
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Tue Oct 18, 2011 4:29 pm    Post subject: Reply with quote

John R. Graham wrote:
None of those. You can only put package-specific USE flags under the /etc/portage/package.use directory. The directory structure is meaningless (except, perhaps, to you). Similar comments apply to the package.keywords, package.mask, and package.unmask files and/or directories.

What you're talking about is /etc/portage/package.env which has different rules. The man page is a good starting point for learning about that.

- John


Thank you! :wink:
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Tue Oct 18, 2011 4:34 pm    Post subject: Reply with quote

Kollin wrote:
I thought that package.use directory should be organized in custom cflags manner :
Code:
/etc/portage/package.use/app-office/libreoffice
and libreoffice file should contain the custom useflags and may be custom linguas ?


The entry would still have to be:
Code:
app-office/libreoffice doc -linguas_en_US



Quote:
Code:
GENTOO_MIRRORS
FEATURES
MAKEOPTS
LINGUAS
CAMERAS
RUBY_TARGETS


Those need to be set in package.env or the useflag value needs to be used.

See USE_EXPAND.
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Tue Oct 18, 2011 4:42 pm    Post subject: Reply with quote

sera wrote:

See USE_EXPAND.


I didn't know about that 8O It sound very interesting:

Quote:
USE_EXPAND and ARCH USE Flags

The VIDEO_CARDS, INPUT_DEVICES and LINGUAS variables are automatically expanded into USE flags. These are known as USE_EXPAND variables. If the user has LINGUAS="en fr" in make.conf, for example, then USE="linguas_en linguas_fr" will automatically be set by Portage.

The USE_EXPAND list is set in profiles/base/make.default as of Portage 2.0.51.20. This must not be modified without discussion on the gentoo-dev list, and it must not be modified in any subprofile.

The current architecture (e.g. x86, sparc, ppc-macos) will automatically be set as a USE flag as well. See profiles/arch.list for a full list of valid architecture keywords, and GLEP 22 for an explanation of the format.


Thank you too ! :wink:
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Tue Oct 18, 2011 8:12 pm    Post subject: Reply with quote

So here is what i did, and it works:

1.Created a file called linguas.conf into /etc/portage/env/ it contains my custom linguas:
Code:
LINGUAS='en bg en_GB'

2.Craeted a file called aspell into /etc/portage/package.env/ it contains only one line :
Code:
app-text/aspell linguas.conf

3.Craeted a file called kde-l10n also into /etc/portage/package.env and it also contains:
Code:
 kde-base/kde-l10n linguas.conf


The rest of my system is using different linguas.
I bet i can do the same thing with GENTOO_MIRRORS, FEATURES,MAKEOPTS,CAMERAS and RUBY_TARGETS :D
Flexibility of portage is unbeatable!

<3 portage <3
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Wed Oct 19, 2011 12:34 am    Post subject: Reply with quote

kollin, app-portage/gpytage is a gtk app to help you manage/migrate those files for you.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Wed Oct 19, 2011 6:42 am    Post subject: Reply with quote

dol-sen wrote:
kollin, app-portage/gpytage is a gtk app to help you manage/migrate those files for you.


I tried to convert package.use with it, but it doesn't work. Clicking on 'Convert file->Subfile' results in this :

Code:
TypeError: TODO() takes exactly 1 argument (2 given)


:?
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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