From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: kdbusaddons: Embed path to kdeinit5, avoid dependency cycles. Date: Thu, 15 Dec 2016 17:06:19 +0100 Message-ID: <8760mlfa84.fsf@gnu.org> References: <20161212.192812.1004299089367170098.thomas.danckaert@aeronomie.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHYYC-00076x-0d for guix-devel@gnu.org; Thu, 15 Dec 2016 11:06:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHYY5-0000R6-UQ for guix-devel@gnu.org; Thu, 15 Dec 2016 11:06:31 -0500 In-Reply-To: <20161212.192812.1004299089367170098.thomas.danckaert@aeronomie.be> (Thomas Danckaert's message of "Mon, 12 Dec 2016 19:28:12 +0100 (CET)") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Thomas Danckaert Cc: guix-devel@gnu.org Hello! Thomas Danckaert skribis: > A remaining issue with kdeinit is, that it needs to run in an > environment with all the required environment variables (such as > QT_PLUGIN_PATH and QML2_IMPORT_PATH) for all possible KDE applications > it has to start (and any libraries they depend on), in order to find > dependencies at runtime, such as plugins and Qml modules. If a user > wants to run a KDE application which relies on kdeinit, but kdeinit is > already running without all the required environment vars, the > application will not find all the plugins or Qml modules it needs. > (In a conventional system, kde applications just need to know one > central directory where they will find all KDE plugins present on the > system) OK. > I don't know what would be a good solution. A =E2=80=9Ckde-master=E2=80= =9D package, > which has references to all packaged KDE applications (and some > libraries which provide plugins) as inputs, and just adds the required > paths to the user's profile (not very modular, but it could work)? > Could a kdeinit service could help with this in GuixSD (haven't really > looked at services yet)? Other options that come to mind: (1) make =E2=80=98QT_PLUGIN_PATH=E2=80=99 = and =E2=80=98QML2_IMPORT_PATH=E2=80=99 search paths of =E2=80=98kinit=E2=80=99;= or (2) add a =E2=80=9Cprofile hook=E2=80=9D that creates a file containing the search path, and patch kinit to honor that file somehow. Option 1 sounds better, but =E2=80=98QT_PLUGIN_PATH=E2=80=99 really belongs= to Qt, not to kinit. Thoughts? > From ba729cd9a2bbbc98bd308702ded837cae5980281 Mon Sep 17 00:00:00 2001 > From: Thomas Danckaert > Date: Tue, 6 Dec 2016 14:55:39 +0100 > Subject: [PATCH] gnu: kdbusaddons: Embed path to kdeinit5, avoid dependen= cy > cycles. > > kdbusaddons needs to know the location of the kdeinit5 executable, > provided by kinit. kinit depends on kdbusaddons, so we add bootstrap > versions of all packages in the dependency chain from kinit to > kdbusaddons to avoid cyclic dependencies. > > * gnu/packages/kde-frameworks.scm (kinit-bootstrap, > kdbusaddons-bootstrap, kbookmarks-bootstrap, kglobalaccel-bootstrap, > kio-bootstrap, kservice-bootstrap, ktextwidgets-bootstrap, > kwallet-bootstrap, kxmlgui-bootstrap): New variables. > (kdbusaddons)[inputs]: Add kinit-bootstrap. > [source,arguments]: Add patch and substitution to embed > kinit-bootstrap's store path in the code. > * gnu/packages/patches/kdbusaddons-kinit-path.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. [...] > +;; This version of kdbusaddons does not use kinit as an input, and is us= ed to > +;; build kinit-bootstrap, as well as bootstrap versions of all kinit > +;; dependencies which also rely on kdbusaddons. > +(define kdbusaddons-bootstrap > + (package > + (inherit kdbusaddons) > + (source (origin > + (inherit (package-source kdbusaddons)) > + (patches '()))) Since =E2=80=98kdbusaddons=E2=80=99 doesn=E2=80=99t have any patches, you c= an omit this =E2=80=98source=E2=80=99 field. > +(define kservice-bootstrap > + ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap))) = kservice)) > + > +(define ktextwidgets-bootstrap > + ((package-input-rewriting `((,kservice . ,kservice-bootstrap))) ktextw= idgets)) > + > +(define kwallet-bootstrap > + ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap) > + (,kservice . ,kservice-bootstrap))) kwalle= t)) > + > +(define kglobalaccel-bootstrap > + ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap) > + (,kservice . ,kservice-bootstrap))) kglob= alaccel)) > + > +(define kxmlgui-bootstrap > + ((package-input-rewriting `((,kglobalaccel . ,kglobalaccel-bootstrap) > + (,ktextwidgets . ,ktextwidgets-bootstrap))= ) kxmlgui)) > + > +(define kbookmarks-bootstrap > + ((package-input-rewriting `((,kxmlgui . ,kxmlgui-bootstrap))) kbookmar= ks)) > + > +(define kio-bootstrap > + ((package-input-rewriting `((,kservice . ,kservice-bootstrap) > + (,kxmlgui . ,kxmlgui-bootstrap) > + (,kbookmarks . ,kbookmarks-bootstrap) > + (,kdbusaddons . ,kdbusaddons-bootstrap) > + (,kwallet . ,kwallet-bootstrap) > + (,ktextwidgets . ,ktextwidgets-bootstrap))= ) kio)) > + > +(define kinit-bootstrap > + ((package-input-rewriting `((,kio . ,kio-bootstrap) > + (,kservice . ,kservice-bootstrap) > + (,kbookmarks . ,kbookmarks-bootstrap) > + (,kxmlgui . ,kxmlgui-bootstrap))) kinit)) Isn=E2=80=99t it enough to do: (define kinit-bootstrap ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap))) kinit)) ? Remember that =E2=80=98package-input-rewriting=E2=80=99 replaces inputs = recursively. You can check with =E2=80=98guix graph -e '(@ (gnu packages kde) kdeinit-bo= otstrap)'=E2=80=99 whether you=E2=80=99re really getting what you want. > diff --git a/gnu/packages/patches/kdbusaddons-kinit-path.patch b/gnu/pack= ages/patches/kdbusaddons-kinit-path.patch > new file mode 100644 > index 0000000..97c7319 > --- /dev/null > +++ b/gnu/packages/patches/kdbusaddons-kinit-path.patch > @@ -0,0 +1,15 @@ > +Add placeholder for kinit's store path. s/path/file name/ please. :-) In GNU =E2=80=9Cpath=E2=80=9D traditionally means =E2=80=9Csearch path.=E2= =80=9D Thanks! Ludo=E2=80=99.