Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bash: /etc/portage/package.use: Is a directory ???
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
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Fri Jul 03, 2015 8:43 am    Post subject: bash: /etc/portage/package.use: Is a directory ??? Reply with quote

Code:
tux ramaswamy # echo 'sys-apps/openrc -netifrc' >> /etc/portage/package.use
bash: /etc/portage/package.use: Is a directory

now it shows a directory called package.use and a file iputils
ll useflags get there by --autounmask-write
when was this change ?
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)


Last edited by padoor on Fri Jul 03, 2015 9:10 am; edited 1 time in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Fri Jul 03, 2015 8:54 am    Post subject: Reply with quote

I don't think that happened without your intervention. As long as I can think back it was always possible to arrange package.use (and the others) as single file or files in a directory, or even directories in a directory. --autounmask-write just uses what is there, usually it seems to choose the last file in alphabetical order.
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Fri Jul 03, 2015 9:07 am    Post subject: Reply with quote

i have just reinstalled from scratch with stage3 amd-64 of 30th june 2015
i have not made any change like this
Code:
tux ramaswamy # cat /etc/portage/package.use/iputils
net-misc/iputils -caps -filecaps
# required by virtual/libgudev-215-r3::gentoo[-systemd]
# required by gnome-base/gvfs-1.22.4::gentoo[udev]
# required by x11-libs/libfm-1.2.3::gentoo[automount,-udisks]
# required by lxde-base/lxde-meta-0.5.5-r4::gentoo
# required by lxde-meta (argument)
>=sys-fs/udev-216 gudev
# required by sys-auth/polkit-0.112-r2::gentoo[-systemd]
# required by gnome-extra/polkit-gnome-0.105-r1::gentoo
>=sys-auth/consolekit-0.4.6 policykit
# required by x11-drivers/xf86-video-vmware-13.1.0::gentoo
# required by x11-base/xorg-drivers-1.16::gentoo[video_cards_vmware]
# required by x11-base/xorg-server-1.16.4::gentoo[xorg]
# required by x11-drivers/xf86-video-nv-2.1.20-r1::gentoo
>=media-libs/mesa-10.3.7-r1 xa
# required by x11-drivers/xf86-video-vmware-13.1.0::gentoo
# required by x11-base/xorg-drivers-1.16::gentoo[video_cards_vmware]
# required by x11-base/xorg-server-1.16.4::gentoo[xorg]
# required by x11-drivers/xf86-video-nv-2.1.20-r1::gentoo
>=x11-libs/libdrm-2.4.59 libkms
# required by dev-util/itstool-2.0.2::gentoo
# required by gnome-extra/yelp-xsl-3.14.0::gentoo
# required by app-text/yelp-tools-3.14.1::gentoo
# required by app-editors/pluma-1.8.1::gentoo
# required by pluma (argument)
>=dev-libs/libxml2-2.9.2-r1 python
# required by app-text/atril-1.8.0::gentoo
# required by mate-base/mate-1.8.0::gentoo[extras]
# required by mate-base/mate (argument)
>=app-text/poppler-0.32.0 cairo
# required by x11-misc/mozo-1.8.0::gentoo
# required by mate-base/mate-1.8.0::gentoo[base]
# required by mate-base/mate (argument)
>=mate-base/mate-menus-1.8.0 python
# required by mate-base/caja-1.8.1::gentoo
# required by mate-base/mate-control-center-1.8.1::gentoo
# required by mate-base/mate-1.8.0::gentoo[base]
# required by mate-base/mate (argument)
>=gnome-base/gvfs-1.22.4 udisks
# required by sys-boot/grub-2.02_beta2-r3::gentoo[static]
# required by grub (argument)
>=app-arch/xz-utils-5.0.8 static-libs
# required by net-misc/networkmanager-1.0.2-r1::gentoo[wifi]
# required by gnome-extra/nm-applet-1.0.2::gentoo
# required by nm-applet (argument)
>=net-wireless/wpa_supplicant-2.4-r3 dbus
# required by dev-qt/qtcore-5.4.2::gentoo
# required by dev-libs/libqtxdg-1.2.0::gentoo
# required by lxqt-base/lxqt-session-0.9.0-r1::gentoo
# required by lxqt-base/lxqt-meta-0.9.0-r2::gentoo
# required by lxqt-base/lxqt-meta (argument)
>=dev-libs/libpcre-8.36 pcre16
# required by dev-qt/qtgui-5.4.2::gentoo[xcb]
# required by dev-qt/qtwidgets-5.4.2::gentoo
# required by lxqt-base/lxqt-notificationd-0.9.0-r1::gentoo
# required by lxqt-base/lxqt-meta-0.9.0-r2::gentoo
# required by lxqt-base/lxqt-meta (argument)
>=x11-libs/libxcb-1.11-r1 xkb
sys-apps/openrc -netifrc
tux ramaswamy #


tux ramaswamy # nano -w /etc/portage/package.use

returns with buffer saying it is a directory.
i don't know what i did made this change :( :?
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Fri Jul 03, 2015 9:35 am    Post subject: Reply with quote

I installed Gentoo Stable on my new Clevo laptop back in April, and Portage expects directories by default rather than files. Portage created the directories automatically, if I recall correctly (except perhaps for /etc/portage/package.accept_keywords, which I believe I had to create manually). Anyway, this is what I have:

Code:
$ ls -d /etc/portage/package.*
/etc/portage/package.accept_keywords  /etc/portage/package.license  /etc/portage/package.mask  /etc/portage/package.unmask  /etc/portage/package.use


padoor, it's no big deal, just create a file (or files, if you so choose), inside those directories. For example, in my case I installed some packages that I wanted to have local USE flags, so I created the following files using the name of the package, to make it memorable for me:

Code:
$ ls /etc/portage/package.use
acroread     autokey  cnijfilter  eudev    fpc          gscan2pdf  kdebase-kioslaves  nvidia-drivers  samba  splashutils  wine   xorg-server
adobe-flash  avahi    corefonts   firefox  googleearth  iputils    networkmanager     peazip          skype  synaptiks    world  zbar

You'll notice I also created a file named 'world'. I use that to declare the remaining USE flags that 'emerge -uvpDN world' tells me are needed in order for me to 'emerge my world'. In a different installation I was just lazy and created a single file with everything in it, named /etc/portage/package.use/package.use!
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Fri Jul 03, 2015 10:09 am    Post subject: Reply with quote

Fitzcarraldo wrote:
Portage created the directories automatically, if I recall correctly (except perhaps for /etc/portage/package.accept_keywords, which I believe I had to create manually).

hmm that must be new. Last time I installed Gentoo, it was up to you to create either a file or directory when you made the first entries... or maybe I always did that anyway before the first --autounmask-write took place.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Fri Jul 03, 2015 11:24 am    Post subject: Reply with quote

genstorm, I can't be 100% certain now as I performed the installation back in April and my memory is hazy, but I have the feeling I didn't do it. I could be wrong, though. But I'm certain Portage was looking for a directory named package.*, not a file.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Fri Jul 03, 2015 5:18 pm    Post subject: Reply with quote

Fitzcarraldo wrote:
But I'm certain Portage was looking for a directory named package.*, not a file.

In what operation do you mean? It certainly will still work if package.* is a file, the question is does it actively create directories i.e. doing --autounmask-write if it won't find an existing package.* path (be it file or dir).
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Fri Jul 03, 2015 7:18 pm    Post subject: Reply with quote

Well, I know I can say for certain portage works perfectly fine if they are files and not directories. On my system, I don't have them as directories, only files. Now, my system was originally installed over 4 years ago, and I have never made them into directories. Frankly, I find it easier with them as files and not directories too.

Code:
ct85711@Oate ~ $ ls -l /etc/portage/
total 32
drwxr-xr-x 2 root root 4096 Jun 14 13:34 bin
-rw-r--r-- 1 root root   87 Jun 26 13:47 package.mask
-rw-r--r-- 1 root root   19 Jan 24 10:01 package.unmask
-rw-r--r-- 1 root root 1148 Jun 17 01:37 package.use
drwxr-xr-x 2 root root 4096 Jun 14 13:34 postsync.d
drwxr-xr-x 2 root root 4096 Jun 14 15:43 repo.postsync.d
drwxr-xr-x 2 root root 4096 Apr 25 01:10 repos.conf
drwxr-xr-x 4 root root 4096 Jul 31  2014 savedconfig


*Note: I am running unstable branch, so I am using the newest version of portage in the tree; so I'd easily find out when portage breaks for not accepting them as files.*
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Fri Jul 03, 2015 8:08 pm    Post subject: Reply with quote

ct85711 wrote:
Well, I know I can say for certain portage works perfectly fine if they are files and not directories. ...
Yes, that's exactly correct.
man portage wrote:
/etc/portage/
    Files in this directory including make.conf, repos.conf, and any file with a name 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
(Emphasis mine.) The man page has been that way for a looong time: years, at least. However, I just checked the current autobuild stage tarball and it does contain some "package.*" directories:
Code:
$ tar -tjvf stage3-amd64-20150702.tar.bz2 | egrep '\./etc/portage/package\..*/$'
drwxr-xr-x root/root         0 2015-02-22 13:06 ./etc/portage/package.mask/
drwxr-xr-x root/root         0 2015-02-22 13:06 ./etc/portage/package.use/
Now, that's relatively recent: a stage tarball I have from December of last year does not have those directories.

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