Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/portage/package.use: Is a directory ERROR
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Thu Apr 23, 2015 6:11 pm    Post subject: /etc/portage/package.use: Is a directory ERROR Reply with quote

Hello all,

I'm trying to follow along the Xorg install document.

I ran into this error when trying to do this step in the guide:

Quote:
First of all, make sure udev is added as a USE:

root #echo "x11-base/xorg-server udev" >> /etc/portage/package.use


I got this when I tried it:

Quote:
linux # echo "x11-base/xorg-server udev" >> /etc/portage/package.use
-bash: /etc/portage/package.use: Is a directory


Suggestions?

Thank you in advance!!

cayenne
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 253

PostPosted: Thu Apr 23, 2015 6:16 pm    Post subject: Reply with quote

Basically what it says. On your computer package.use is a directory. Just echo that command to any file inside that directory.
Back to top
View user's profile Send private message
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Thu Apr 23, 2015 6:27 pm    Post subject: Reply with quote

bstaletic wrote:
Basically what it says. On your computer package.use is a directory. Just echo that command to any file inside that directory.


There is no file in that directory to echo that info into....

It appears the documentation things there is a file named package.use in that directory that this line it to be appended to.....from reading the online manual.

So, wondering what the fix to this apparent mistake is....?


Thanks!!

C
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 253

PostPosted: Thu Apr 23, 2015 7:12 pm    Post subject: Reply with quote

There's no file in that dir by default, but you're supposed to make them as you see fit. You could use pkg names for file names for easy maintenance.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Apr 23, 2015 7:21 pm    Post subject: Reply with quote

cayenne,

Once upon a time /etc/portage/package.use was a file. Now it can be either a file or a directory.
If you have set it up as a directory, all the files it contains will be parsed in name lexical order - that might be important to you.

The follow that out of date install, make a file inside /etc/portage/package.use/ and put your per packagce settinging in it.

Now, I mentioned that the guide you have is out of date.
A long time ago Xorg could be built with either udev or devfs support. devfs vanished at kernel 2.6.13. Snce that time udev has become the default.
Everywhere that hase options udev support, you will want it, so udev is probably set in your profile. If not, it needs to be set globally.
_________________
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
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Thu Apr 23, 2015 8:05 pm    Post subject: thank you!! Reply with quote

NeddySeagoon wrote:
cayenne,

Once upon a time /etc/portage/package.use was a file. Now it can be either a file or a directory.
If you have set it up as a directory, all the files it contains will be parsed in name lexical order - that might be important to you.

The follow that out of date install, make a file inside /etc/portage/package.use/ and put your per packagce settinging in it.

Now, I mentioned that the guide you have is out of date.
A long time ago Xorg could be built with either udev or devfs support. devfs vanished at kernel 2.6.13. Snce that time udev has become the default.
Everywhere that hase options udev support, you will want it, so udev is probably set in your profile. If not, it needs to be set globally.


Oh goodness..ok, thanks.

I found another thread on this..and I created a file called "custom" under the package.use directory...and put the line in there.

Ok, well, I learn something new every day.

Will someone be changing that install *blip* anytime in the near future?


Thank you,

C
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Apr 23, 2015 8:10 pm    Post subject: Reply with quote

cayenne,

The install guides you should be following are on the wiki - that means you can fix it :)
_________________
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
mrbassie
l33t
l33t


Joined: 31 May 2013
Posts: 781
Location: over here

PostPosted: Sun Apr 26, 2015 10:07 am    Post subject: Reply with quote

What would be an example of a filename within a package.use directory?
Back to top
View user's profile Send private message
mrbassie
l33t
l33t


Joined: 31 May 2013
Posts: 781
Location: over here

PostPosted: Sun Apr 26, 2015 10:08 am    Post subject: Reply with quote

What would be an example of a filename within a package.use directory?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Apr 26, 2015 10:19 am    Post subject: Reply with quote

mrbassie,

All the files is package.use are concatenated in lexical order. The file names can be anything.
The lexical order bit is important if you are trying to be clever and use wildcards to make global settings here.
You want a file containing wildcard settings to be processed first.

Suppose you have a file package.use/z which is low down the lexical order and it contains one line
Don't Try This at home:
*/* -*
it will be processed last, or almost last and will clear all your USE flags. That's probably not what you want.

You could borrow from /ect/udev/udev.rules which did the same parsing in lexical order, where file names started with two digits. 00..99, lower numbers are processed first.
_________________
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
mrbassie
l33t
l33t


Joined: 31 May 2013
Posts: 781
Location: over here

PostPosted: Sun Apr 26, 2015 11:51 am    Post subject: Reply with quote

Gotcha. Thanks.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Wed Apr 29, 2015 8:13 am    Post subject: Reply with quote

NeddySeagoon wrote:
cayenne,

The install guides you should be following are on the wiki - that means you can fix it :)


Which is why a distro should provide their own doc written by devs who know how it works and not a wiki which is open to anyone who "thinks" they know something.

This will end up like WonkyPedia.
:P
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Wed Apr 29, 2015 2:05 pm    Post subject: Reply with quote

Gentree wrote:
Which is why a distro should provide their own doc written by devs who know how it works and not a wiki which is open to anyone who "thinks" they know something.

This will end up like WonkyPedia.
:P

I agree with that. It could be confusing for a newbie if he reads total baloney in some doc and fails to install gentoo because of that.
On the other hand wiriting and maintaining documentations can be very time consuming.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8938

PostPosted: Wed Apr 29, 2015 2:21 pm    Post subject: Reply with quote

It shouldn't be necessary however to list each and every possibility of how to configure things in /etc/portage/, every time.
Back to top
View user's profile Send private message
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Wed Apr 29, 2015 2:53 pm    Post subject: Reply with quote

genstorm wrote:
It shouldn't be necessary however to list each and every possibility of how to configure things in /etc/portage/, every time.


No..but the part of expecting a file vs a directory can be jarring, especially when a noob.

With me, it was a bit strange in that I've used and installed Gentoo over the years...but has been nearly a decade since I last used or installed it. And in the back of my head, I seemed to recall that package.use WAS a file you directly wrote these things into, and when seeing a directory now, well, I didn't know WTF to do.....and was likely even more confused than a true noob.

Hmm...I've never actually tried editing a Wiki before, might look into it.

But yes, plain language saying " put a file here, any name you want it with xyz in it will work." would have been very helpful.
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Wed Apr 29, 2015 3:13 pm    Post subject: Reply with quote

From the Gentoo Handbook USE Flags section (highlighting is mine):
Quote:
Declaring USE flags for individual packages

Sometimes users want to declare a certain USE flag for one (or a couple) of applications but not system-wide. To accomplish this, edit /etc/portage/package.use. This is usually a single file, but can also be a directory; see man portage for more information. The following examples assume package.use is a single file. ...
So it's already spelled out, in summary if not in detail. You can't expect to understand something as complex and capable as Gentoo without a little study.

- 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
EmaRsk
Apprentice
Apprentice


Joined: 07 Sep 2004
Posts: 158
Location: Italy

PostPosted: Thu Apr 30, 2015 10:12 am    Post subject: Reply with quote

man portage

Code:
       /etc/portage/
              Any  file in this directory that begins with "package." can be more than just a flat file.  If it is a directory, then all the files in that directory will
              be sorted in ascending alphabetical order by file name and summed together as if it were a single file.

              Example:
              /etc/portage/package.accept_keywords/common
              /etc/portage/package.accept_keywords/e17
              /etc/portage/package.accept_keywords/kde
Back to top
View user's profile Send private message
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Thu Apr 30, 2015 4:00 pm    Post subject: See the guide... Reply with quote

Well, if you know all the different places to look...then sure, it is "easy"
;)

But I was coming in as basically a noob. Following the natural progression of the install....base, then x-windows....

And I was on the X.org Guide: https://wiki.gentoo.org/wiki/Xorg/Configuration

And in this one section it said:

Code:
First of all, make sure udev is added as a USE:

root #echo "x11-base/xorg-server udev" >> /etc/portage/package.use


Ok, as a noob, you general cut and paste from a guide, assuming it to be the method to use...and boom, this blows up now on a generic install, because what used to be a file is now a directory, and in this guide here, there is nothing indicating this and nothing telling you what to do next to do.

I didn't know to search all other documents, or that this should require looking at man portage.....

Following the instructions as prescribed...you're puzzled as to why the directions are telling you append text to a directory.

That's where the confusion was.

A nice thing to do there would be change it to tell you to create a file there with that text and then have a blurb with some text saying "this used to be a file rather than a directory, and for more info go see..." the documents you listed that go more into USE or tell them to look at the man file for portage.

I'm just telling how I hit this as basically a noob following directions in the guide...following the breadcrumbs without much external knowledge.
:)

cayenne
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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