Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] package.use file or directory?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
Xywa
Veteran
Veteran
User avatar
Posts: 1631
Joined: Sat Jul 23, 2005 2:00 pm
Location: /mnt/Gentoo/Europe

[SOLVED] package.use file or directory?

  • Quote

Post by Xywa » Fri May 27, 2016 6:46 pm

HI,

After a long time I am installing a fresh Gentoo system (stable this time).

In /etc/portage I could see package.use directory instead of package,use file, like used to be for 12 years for me.

I have to make some changes for 20 files, so easier for me is to add those changes to package.use file, than separately to 20 new files. Will be the system see package.use file together with package.file directory? Is it possible this way?

The same for package.mask, package.unmask, etc...
Last edited by Xywa on Tue May 31, 2016 11:29 am, edited 1 time in total.
Top
charles17
Advocate
Advocate
Posts: 3686
Joined: Sun Mar 02, 2008 3:20 pm

  • Quote

Post by charles17 » Fri May 27, 2016 6:52 pm

Just delete that directory.
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

Re: package.use file or directory?

  • Quote

Post by khayyam » Fri May 27, 2016 7:00 pm

Xywa wrote:I have to make some changes for 20 files, so easier for me is to add those changes to package.use file, than separately to 20 new files. Will be the system see package.use file together with package.file directory? Is it possible this way? The same for package.mask, package.unmask, etc...
Xywa ... as charles points out, you needn't have a directory, however, one file within the directory will behave the same as your previous /etc/portage/package.use file.

You may want to keep it a directory as if you need to change package.{accept_keywords,mask,unmask} for a number of packages you can group these changes in one file (which may help you remember why you'd made the change).

best ... khay
Top
Fitzcarraldo
Advocate
Advocate
User avatar
Posts: 2057
Joined: Sat Aug 30, 2008 9:49 pm
Location: United Kingdom
Contact:
Contact Fitzcarraldo
Website

  • Quote

Post by Fitzcarraldo » Fri May 27, 2016 7:03 pm

I have individual files for the packages I want to set USE flags for individually, and a file I called 'world' for USE changes specified by Portage in order to merge world:

Code: Select all

$ ls /etc/portage/package.use/
acroread     clamav      dia      fpc          heimdal            libreoffice     openssl          samba        teamviewer   xorg-server
adobe-flash  cnijfilter  dropbox  googleearth  iputils            microcode-data  owncloud-client  skype        thunderbird  zbar
autokey      corefonts   eudev    gparted      kde-l10n           networkmanager  peazip           splashutils  wine
avahi        dbus        firefox  gscan2pdf    kdebase-kioslaves  nvidia-drivers  rxvt-unicode     synaptiks    world
For example:

Code: Select all

$ cat /etc/portage/package.use/eudev 
sys-fs/eudev -rule-generator abi_x86_32

Code: Select all

$ cat /etc/portage/package.use/world
.
.
.
# required by sys-libs/ldb-1.1.26::gentoo
# required by net-fs/samba-4.2.9::gentoo
>=sys-libs/tevent-0.9.28 python
# required by media-sound/pulseaudio-8.0::gentoo
# required by media-sound/mpg123-1.22.4::gentoo[pulseaudio]
# required by media-video/mplayer-1.2.1::gentoo[mp3]
# required by media-video/smtube-16.1.0::gentoo
>=dev-libs/json-c-0.12 abi_x86_32
# required by sys-libs/ldb-1.1.26::gentoo
# required by net-fs/samba-4.2.9::gentoo
>=sys-libs/tdb-1.3.8 python
# required by virtual/libffi-3.0.13-r1::gentoo
# required by dev-libs/glib-2.46.2-r3::gentoo
# required by mail-client/thunderbird-45.1.0::gentoo
>=dev-libs/libffi-3.2.1 abi_x86_32
# required by media-video/ffmpeg-2.8.6::gentoo[bzip2]
# required by media-libs/gegl-0.2.0-r2::gentoo
# required by media-gfx/gimp-2.8.14-r1::gentoo
# required by media-gfx/sane-frontends-1.0.14::gentoo[gimp]
>=app-arch/bzip2-1.0.6-r7 abi_x86_32
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Top
Xywa
Veteran
Veteran
User avatar
Posts: 1631
Joined: Sat Jul 23, 2005 2:00 pm
Location: /mnt/Gentoo/Europe

  • Quote

Post by Xywa » Fri May 27, 2016 7:10 pm

What about Using --autounmask-write option?

Can this option do this automatically for me? Where are config files from that option?

Eg. when I am unmasking dozen those files with abi_x86_32 use flag, I would prefer to do this automatically rather than soendind an hour to do this manually. Is it -autounmask-write option safe?
Top
MarioCorleone
Guru
Guru
User avatar
Posts: 336
Joined: Sun Jun 29, 2003 7:30 pm

  • Quote

Post by MarioCorleone » Fri May 27, 2016 7:31 pm

Xywa wrote:What about Using --autounmask-write option?

Can this option do this automatically for me? Where are config files from that option?

Eg. when I am unmasking dozen those files with abi_x86_32 use flag, I would prefer to do this automatically rather than soendind an hour to do this manually. Is it -autounmask-write option safe?
In my experience in the last 12 months, portage has done --autounmask-write for me, i just say Y or N then do a sudo dispatch-conf
-Mario
Top
Fitzcarraldo
Advocate
Advocate
User avatar
Posts: 2057
Joined: Sat Aug 30, 2008 9:49 pm
Location: United Kingdom
Contact:
Contact Fitzcarraldo
Website

  • Quote

Post by Fitzcarraldo » Fri May 27, 2016 7:46 pm

I don't use --autounmask-write myself, but notice the following:
man emerge wrote:--autounmask-write [ y | n ]
If --autounmask is enabled, changes are written to config files, respecting CONFIG_PROTECT and --ask. If the corresponding package.* is a file, the changes are appended to it, if it is a directory, changes are written to the lexicographically last file. This way it is always ensured that the new changes take precedence over existing changes. This option is automatically enabled with --ask.
So, if the last file in /etc/portage/package.use/ is named 'world', then you're good to go. You could of course create a file named 'zzzzz' instead, to be sure!
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Fri May 27, 2016 7:51 pm

Xywa wrote:Eg. when I am unmasking dozen those files with abi_x86_32 use flag, I would prefer to do this automatically rather than soendind an hour to do this manually. Is it -autounmask-write option safe?
Xywa ... when keywording numerious packages ~arch on a stable system, "safe" doesn't come into it.

best ... khay
Top
Xywa
Veteran
Veteran
User avatar
Posts: 1631
Joined: Sat Jul 23, 2005 2:00 pm
Location: /mnt/Gentoo/Europe

Re: package.use file or directory?

  • Quote

Post by Xywa » Mon May 30, 2016 1:02 pm

khayyam wrote:
Xywa wrote:You may want to keep it a directory as if you need to change package.{accept_keywords,mask,unmask} for a number of packages you can group these changes in one file (which may help you remember why you'd made the change).
Fitzcarraldo wrote:I have individual files for the packages I want to set USE flags for individually, and a file I called 'world' for USE changes specified by Portage in order to merge world:
Many thanks for all the explanations, looks like I am old-fashion Gentoo user, who did not pay attentions to the news :)

So it means for example, I could make eg. a group called video-making, and inside unmask some newest package like kdenlive, mlt, ffmpeg? So it will be easy for me to keep a control why did I unmask those package later on?
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

Re: package.use file or directory?

  • Quote

Post by khayyam » Mon May 30, 2016 3:53 pm

Xywa wrote:So it means for example, I could make eg. a group called video-making, and inside unmask some newest package like kdenlive, mlt, ffmpeg? So it will be easy for me to keep a control why did I unmask those package later on?
Xywa ... exactly.

best ... khay
Top
keet
Guru
Guru
Posts: 580
Joined: Tue Sep 09, 2008 12:04 am

  • Quote

Post by keet » Mon May 30, 2016 4:03 pm

I have /etc/portage/package.{use,keywords}/base, which has all the flags/masks for packages that I want. Then, I have, for example, /etc/portage/package.use/cairo-dock, which has all the USE flags required in other packages for cairo-dock to install or work properly.

That way, if I want to test something like Plasma 5 without switching profiles, I just make a file in each directory called plasma5 with all the flags and keywords that I need to install or use it, and if I no longer want it, I comment out or remove those files. It makes it easier for me to track why I set apparently random USE flags or keywords on packages. For example, why do I enable the gles2 USE flag on mesa? Oh, since that's set in /etc/portage/package.use/weston, it's probably because I needed it to make weston work.
Top
Xywa
Veteran
Veteran
User avatar
Posts: 1631
Joined: Sat Jul 23, 2005 2:00 pm
Location: /mnt/Gentoo/Europe

Re: package.use file or directory?

  • Quote

Post by Xywa » Mon May 30, 2016 4:05 pm

khayyam wrote:
Xywa wrote:So it means for example, I could make eg. a group called video-making, and inside unmask some newest package like kdenlive, mlt, ffmpeg? So it will be easy for me to keep a control why did I unmask those package later on?
Xywa ... exactly.

best ... khay
Many thanks, works perfect, I made video-editing, games and some more folders. Great control, niece and clean, MANY THANKS! 8) 8) 8) 8) 8) 8) 8) 8)

BTW. I did emerge --autounmaskig for Chromium I think, and system was asking few times for "etc-udate", so now I have such message bellow. Where I could find what --autounmasking did?

Code: Select all

# emerge -puDN world

These are the packages that would be merged, in order:

Calculating dependencies... done!

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

dev-libs/libxml2:2

  (dev-libs/libxml2-2.9.3:2/2::gentoo, ebuild scheduled for merge) conflicts with
    dev-libs/libxml2:2[-icu,abi_x86_64(-)] required by (dev-qt/qtwebkit-4.8.6-r1:4/4::gentoo, installed)
Top
Fitzcarraldo
Advocate
Advocate
User avatar
Posts: 2057
Joined: Sat Aug 30, 2008 9:49 pm
Location: United Kingdom
Contact:
Contact Fitzcarraldo
Website

  • Quote

Post by Fitzcarraldo » Mon May 30, 2016 4:13 pm

Xwya, once you get used to using files inside the /etc/portage/package.use/ directory instead of declaring everything in a single file /etc/portage/package.use, it's not such a bad way of doing things and can be quite helpful sometimes. As you wrote, you can create files named e.g. 'video-making' -- or whatever name you want -- and declare whatever packages you want inside them. The only thing to watch out for is declaring the same package in more than one file, but I don't find that an issue really. After all it's not a big deal to check. For example:

Code: Select all

fitzcarraldo@clevow230ss ~ $ grep thunderbird /etc/portage/package.use/*
/etc/portage/package.use/thunderbird:mail-client/thunderbird lightning
/etc/portage/package.use/world:# required by mail-client/thunderbird-31.7.0::gentoo
/etc/portage/package.use/world:# required by mail-client/thunderbird-45.1.0::gentoo
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Top
Post Reply

13 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic