From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: bug#30006: bzip2 does not provide libbz2.so Date: Tue, 27 Mar 2018 22:49:19 +0200 Message-ID: <87bmf9gs6o.fsf@fastmail.com> References: <87incft8tf.fsf@gnu.org> <877eq3knk0.fsf@fastmail.com> <718583be2617e43743e8ee40397bb0b4@tobias.gr> <871sgbklvj.fsf@fastmail.com> <87zi2xjtm9.fsf@gnu.org> <87bmfakacc.fsf@fastmail.com> <87370m0y9x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0vXj-00037f-T5 for bug-guix@gnu.org; Tue, 27 Mar 2018 16:50:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0vXe-0003s0-Bn for bug-guix@gnu.org; Tue, 27 Mar 2018 16:50:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f0vXe-0003rn-7x for bug-guix@gnu.org; Tue, 27 Mar 2018 16:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f0vXd-0001xE-W1 for bug-guix@gnu.org; Tue, 27 Mar 2018 16:50:02 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87370m0y9x.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 30006-done@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hello Marius, > > Marius Bakke skribis: > >> Ludovic Court=C3=A8s writes: >> >>> There=E2=80=99s no such function, which is unfortunate. But I agree it= =E2=80=99s nicer >>> to preserve symlinks in this case. >>> >>> Perhaps we should actually do: >>> >>> (with-directory-excursion libdir >>> (symlink =E2=80=A6 "libbz2.so")) >> >> Thanks for the feedback everyone. I settled on a slightly different >> solution, that first extracts the (full) soversion from the built >> library, then creates symlinks for each "sub-version". >> >> It assumes that the major version is "1". That could be circumvented >> with a regex, but I'm not sure if it's worth the effort. >> >> As an added bonus, this also creates "libbz2.so.1" which was missing too. >> >> WDYT of this approach? Can it be made simpler? > > Sounds reasonable to me. I have a suggestion: [...] > To avoid =E2=80=98set!=E2=80=99, I=E2=80=99d write it along these lines: > > ;; Create symlinks libbz2.so.1.2 -> libbz2.so.1, etc. > (let loop ((base "libbz2.so") > (numbers (string-split soversion #\.))) > (unless (null? numbers) > (let ((so-file (string-append base "." (car numbers)))) > (symlink so-file base) > (loop so-file (cdr numbers))))) This is much nicer, thanks! I've pushed the patch with this improvement. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlq6rk8ACgkQoqBt8qM6 VPreMQgAqF4i/nyhdzt/qa/d6H/N9xQUf1JZXIiAtx2BG7qVVXQ5IXMLmRINYv/h 5Y5Lr+v/H7xCo6PZYeRAPPIfYWRcB+K7mPH+O4uimMpfE1+ZA9lgzHTZ8CfOF+Dl n2U6pqxiw/fPHWURpU+JdQi1J5JujWLG8umYoM7FqDom+rtBkXvFB+TlxoYEi0wP uR/yb1ylHSXv8F+/8BMbmtqlGnvB1PodtcJ1N1PAweLIKGvqiXhVpemu60KfHD5v V8tjS2zJEnaGCK9fRiaMlTbqZnw+aY2FBNlZM9jLa2FvlWRynWYAqkC0Bqr0hgdu J65/55WyEA+d9fFdmEcrStZ546VyVw== =nRKY -----END PGP SIGNATURE----- --=-=-=--