Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
i3-gaps from Overlay; i3blocks from official repo reqs i3
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
deurzen
n00b
n00b


Joined: 08 Sep 2017
Posts: 2

PostPosted: Fri Sep 08, 2017 3:38 pm    Post subject: i3-gaps from Overlay; i3blocks from official repo reqs i3 Reply with quote

Hey there,

Apologies for taking up your time; I'm a first time forums account owner, but have been using Gentoo for a few years now.

I've recently switched from i3 to i3-gaps, which is not officially available through the main repo, but has to be fetched in through an overlay.
Everything I've undertaken has been on a fresh Gentoo install, as I'd migrated to a 500GB SSD. The problem I'm having is the following.

In my i3-gaps usage, I require the following package: x11-misc/i3blocks
This package, however, depends on the i3 package from the main repo, amongst others.

Code:
equery depgraph i3blocks
 * Searching for i3blocks ...

 * dependency graph for x11-misc/i3blocks-1.4-r1
 `--  x11-misc/i3blocks-1.4-r1  ~amd64
   `--  app-text/ronn-0.7.3-r3  (app-text/ronn) amd64
   `--  app-admin/sysstat-11.4.0  (app-admin/sysstat) amd64
   `--  media-sound/playerctl-0.5.0  (media-sound/playerctl) ~amd64
   `--  sys-apps/lm_sensors-3.4.0_p20160725  (sys-apps/lm_sensors) amd64
   `--  sys-power/acpi-1.6  (sys-power/acpi) amd64
   `--  x11-wm/i3-4.13-r1  (x11-wm/i3) amd64            <============================
[ x11-misc/i3blocks-1.4-r1 stats: packages (7), max depth (1) ]


The problem, however, is that the i3-gaps package I've installed is a fork from i3 itself, and only contains some additional features.
How will I be able to clear this dependency from getting in the way of i3blocks updates also hauling in i3 (as it's a dependency), and consequently halting up my emerge, since it will call on a collision between i3 and i3-gaps?
I've already masked i3blocks (and i3 for that matter) to temporarily defer the issue, but I'm about ready to look for a permanent solution.

Code:
sudo emerge -auDN i3blocks
Password:

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

Calculating dependencies... done!
[ebuild  N    #] x11-wm/i3-4.13-r1  USE="-doc"

Would you like to merge these packages? [Yes/No]


Continuing the merge yields the following:

Code:
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at https://bugs.gentoo.org/ unless you report exactly
 * which two packages install the same file(s). See
 * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how
 * to solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 *
 * Detected file collision(s):
 *
 *    /usr/bin/i3-input
 *    /usr/bin/i3
 *    /usr/bin/i3-dump-log
 *    /usr/bin/i3-save-tree
 *    /usr/bin/i3-migrate-config-to-v4
 *    /usr/bin/i3-msg
 *    /usr/bin/i3bar
 *    /usr/bin/i3-sensible-editor
 *    /usr/bin/i3-sensible-pager
 *    /usr/bin/i3-sensible-terminal
 *    /usr/bin/i3-nagbar
 *    /usr/bin/i3-dmenu-desktop
 *    /usr/bin/i3-config-wizard
 *    /usr/share/applications/i3.desktop
 *    /usr/share/man/man1/i3-sensible-editor.1.bz2
 *    /usr/share/man/man1/i3bar.1.bz2
 *    /usr/share/man/man1/i3.1.bz2
 *    /usr/share/man/man1/i3-dmenu-desktop.1.bz2
 *    /usr/share/man/man1/i3-input.1.bz2
 *    /usr/share/man/man1/i3-sensible-terminal.1.bz2
 *    /usr/share/man/man1/i3-msg.1.bz2
 *    /usr/share/man/man1/i3-migrate-config-to-v4.1.bz2
 *    /usr/share/man/man1/i3-sensible-pager.1.bz2
 *    /usr/share/man/man1/i3-dump-log.1.bz2
 *    /usr/share/man/man1/i3-save-tree.1.bz2
 *    /usr/share/man/man1/i3-config-wizard.1.bz2
 *    /usr/share/man/man1/i3-nagbar.1.bz2
 *    /usr/share/xsessions/i3.desktop
 *    /usr/share/xsessions/i3-with-shmlog.desktop
 *    /usr/include/i3/ipc.h
 *    /usr/bin/i3-with-shmlog
 *
 * Searching all installed packages for file collisions...
 *
 * Press Ctrl-C to Stop
 *
 * x11-wm/i3-gaps-4.13:0::0x4d4c
 *    /usr/bin/i3
 *    /usr/bin/i3-config-wizard
 *    /usr/bin/i3-dmenu-desktop
 *    /usr/bin/i3-dump-log
 *    /usr/bin/i3-input
 *    /usr/bin/i3-migrate-config-to-v4
 *    /usr/bin/i3-msg
 *    /usr/bin/i3-nagbar
 *    /usr/bin/i3-save-tree
 *    /usr/bin/i3-sensible-editor
 *    /usr/bin/i3-sensible-pager
 *    /usr/bin/i3-sensible-terminal
 *    /usr/bin/i3bar
 *    /usr/share/applications/i3.desktop
 *    /usr/share/man/man1/i3-dmenu-desktop.1.bz2
 *    /usr/share/man/man1/i3-input.1.bz2
 *    /usr/share/man/man1/i3-sensible-editor.1.bz2
 *    /usr/share/man/man1/i3-sensible-terminal.1.bz2
 *    /usr/share/man/man1/i3.1.bz2
 *    /usr/share/man/man1/i3bar.1.bz2
 *
 * Package 'x11-wm/i3-4.13-r1' NOT merged due to file collisions. If
 * necessary, refer to your elog messages for the whole content of the
 * above message.




Has anyone else encountered anything like this? I've tried looking it up, but was unable to find anything sufficiently helpful.
Thank you in advance!

~deurzen
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11168

PostPosted: Sat Sep 09, 2017 12:55 am    Post subject: Reply with quote

The immediate answer to your problem is to use /etc/portage/profile/package.provided to lie to Portage and tell it that x11-wm/i3 is installed outside its control. While not strictly true (you installed a fork, not that exact package), from your description and the list of collisions, it's true enough that it will likely do what you want: convince Portage to pretend that i3 is installed when resolving dependencies, so it does not actually try to install i3 (and fail with file collisions). If you ever remove i3-gaps, you will need to remove the entry in package.provided, since Portage will otherwise continue to pretend that i3 is available.

Secondarily, I suggest that the ebuild for i3-gaps be modified to block installing x11-wm/i3 on the same system, since you know that it will never succeed. That would convert this collision into a dependency time block.
Back to top
View user's profile Send private message
deurzen
n00b
n00b


Joined: 08 Sep 2017
Posts: 2

PostPosted: Sat Sep 09, 2017 11:34 am    Post subject: Reply with quote

Hu wrote:
The immediate answer to your problem is to use /etc/portage/profile/package.provided to lie to Portage and tell it that x11-wm/i3 is installed outside its control. While not strictly true (you installed a fork, not that exact package), from your description and the list of collisions, it's true enough that it will likely do what you want: convince Portage to pretend that i3 is installed when resolving dependencies, so it does not actually try to install i3 (and fail with file collisions). If you ever remove i3-gaps, you will need to remove the entry in package.provided, since Portage will otherwise continue to pretend that i3 is available.

Secondarily, I suggest that the ebuild for i3-gaps be modified to block installing x11-wm/i3 on the same system, since you know that it will never succeed. That would convert this collision into a dependency time block.


That's a brilliant tip, thanks so much! I hadn't heard of the package.provided list before. This worked like a charm.
Cheers!

~deurzen
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3776
Location: Austro Bavaria

PostPosted: Sun Sep 10, 2017 8:37 am    Post subject: Reply with quote

deurzen wrote:
Hu wrote:
..


That's a brilliant tip, thanks so much! I hadn't heard of the package.provided list before. This worked like a charm.
Cheers!

~deurzen


Thats a dirty hack and cause issues in future wheny ou forget about it

As you already work with overlays.

A better solution. Create your own overlay with your own modified x11-misc/i3blocks ebuild.

..

I also loved such dirty hacks, but when the machine grows older and you forget about these you have random issues, which are hard to deal with.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11168

PostPosted: Sun Sep 10, 2017 4:16 pm    Post subject: Reply with quote

Yes, it can cause issues later, which is why I warned him to remove it if he ever removes the forked ebuild. This is the nature of package.provided. It is designed to assert to the package manager truths which it cannot see for itself, and it is the user's responsibility to ensure that those truths hold.

An alternative approach which is slightly more involved, but far more extensible than using an overlay to patch every ebuild that depends on x11-wm/i3, would be to define an overlay ebuild for x11-wm/i3 that hard depends on the fork and installs no files of its own. This would make the dependency resolver consider x11-wm/i3 to be installed, and would raise a dependency resolution issue if he removed the fork without also removing the overlay x11-wm/i3. To be very paranoid, the fork ebuild would then need to hard block any x11-wm/i3 from the main Portage tree.
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 197

PostPosted: Sun Sep 10, 2017 11:40 pm    Post subject: Reply with quote

I (used to) maintain i3 and some forks and patchsets in my home directory, installing them to ~/.local and having ~/.local/bin, etc., be in my $PATH. They were small enough and self contained enough I didn't have much problem doing this.

I suspect it is better to write an ebuild, but it took a couple of minutes to do the above.
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