Skip Menu |
 

This queue is for tickets about the Portable CPAN distribution.

Report information
The Basics
Id: 105395
Status: open
Priority: 0/
Queue: Portable

People
Owner: Nobody in particular
Requestors: RIVY [...] cpan.org
Cc: adamk [...] cpan.org
CHORNY [...] cpan.org
kmx [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: adamk [...] cpan.org, kmx [...] cpan.org
Subject: Configuring portable perl (for a "semi-portable" installation)
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-4873-1434903382-372.0-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 2152
Download (untitled) / with headers
text/plain 2.1k
After "installing" a portable perl installation onto a PC (i.e., by using `scoop` [https://github.com/lukesampson/scoop]), I'd like to customize the install to access my home path using the usually recommended File::HomePath methods. `scoop` installs the portable perl package in a directory under my home directory (%LOCALAPPDATA%) and sets up the PATH to make perl accessible. It does this to avoid requiring any elevated security levels for installation. So, it's really a regular installation into an unusual path. Parenthetically, I'm not sure that installation of the usual perl onto that path wouldn't work just as well, but I'm not privvy to the thoughts behind their choice of "portable perl". Given this type of "semi-portable" installation, I'd like to be able to configure portable.perl to access the usual directories (~ aka %USERPROFILE%, etc.). To accomplish just the %USERPROFILE% access, I could make "<PERL_ROOT_PATH>/data" a symbolic link to "%USERPROFILE%", but that seems hackish. Alternatively, the most straight forward method seems to me to be modifying the configuration in the `portable.perl` file. But, currently, HomePath:my_home path is just tacked onto <PERL_ROOT_PATH> no matter whether it's a relative or absolute path. So, that won't work. However, the code within "Portable" could be modified to use absolute directories when specified (which I'm happy to do, and, if you have a repo somewhere, then send you a pull request). As I don't fully grok the larger design picture of "Portable", I'm not sure of the ramifications of making such a change. But, I think it might be nice to move toward having a fully relocatable perl installation which can still access all of the host resources like a normal perl installation (hence, "semi-portable"). If this all seems like a wrong-headed direction or non-productive for you, I can start expermenting with using a full perl installation placed solely within the USER directory tree. If that works, I can set up my own bucket for scoop and/or discuss changing the copy that `scoop` installs with it's creator. Do you have any input on this? Thanks for your attention.
MIME-Version: 1.0
X-Spam-Status: No, score=-5.692 tagged_above=-99.9 required=10 tests=[AWL=0.208, BAYES_00=-1.9, FROM_OUR_RT=-4, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
In-Reply-To: <rt-4.0.18-4873-1434903383-427.105395-17-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-105395 [...] rt.cpan.org> <rt-4.0.18-4873-1434903383-427.105395-17-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <55871F64.9000708 [...] cpan.org>
content-type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.692
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id B722C24046D for <cpan-bug+portable [...] hipster.bestpractical.com>; Sun, 21 Jun 2015 16:32:52 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PnN46fXXrzVz for <cpan-bug+portable [...] hipster.bestpractical.com>; Sun, 21 Jun 2015 16:32:51 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 1324C240302 for <bug-portable [...] rt.cpan.org>; Sun, 21 Jun 2015 16:32:50 -0400 (EDT)
Received: (qmail 5206 invoked by alias); 21 Jun 2015 20:32:49 -0000
Received: from fep14.mx.upcmail.net (HELO fep14.mx.upcmail.net) (62.179.121.34) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 21 Jun 2015 13:32:47 -0700
Received: from edge01.upcmail.net ([192.168.13.236]) by viefep14-int.chello.at (InterMail vM.8.01.05.13 201-2260-151-135-20130320) with ESMTP id <20150621203240.SFWV6124.viefep14-int.chello.at [...] edge01.upcmail.net> for <bug-portable [...] rt.cpan.org>; Sun, 21 Jun 2015 22:32:40 +0200
Received: from [192.168.9.200] ([89.176.203.233]) by edge01.upcmail.net with edge id j8Yd1q00952fSkh018Ye45; Sun, 21 Jun 2015 22:32:40 +0200
Delivered-To: cpan-bug+portable [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
Subject: Re: [rt.cpan.org #105395] Configuring portable perl (for a "semi-portable" installation)
Return-Path: <kmx [...] cpan.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+portable [...] hipster.bestpractical.com
X-RT-Mail-Extension: portable
Date: Sun, 21 Jun 2015 22:32:36 +0200
X-Sourceip: 89.176.203.233
X-Spam-Level:
To: bug-Portable [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: kmx <kmx [...] cpan.org>
RT-Message-ID: <rt-4.0.18-24166-1434918773-1225.105395-0-0 [...] rt.cpan.org>
Content-Length: 284
Download (untitled) / with headers
text/plain 284b
Try to: 0/ perl -MFile::HomeDir -E "say File::HomeDir->my_home" 1/ remove the line set HOME=%~dp0data from portableshell.bat 2/ remove the whole section HomeDir: my_home: data my_data: data from portable.perl 3/ perl -MFile::HomeDir -E "say File::HomeDir->my_home" -- kmx
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-24166-1434918773-1225.105395-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <RT-Ticket-105395 [...] rt.cpan.org> <rt-4.0.18-4873-1434903383-427.105395-17-0 [...] rt.cpan.org> <55871F64.9000708 [...] cpan.org> <rt-4.0.18-24166-1434918773-1225.105395-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-829-1434949036-133.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-829-1434949036-1297.105395-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: RIVY [...] cpan.org
Content-Length: 818
Download (untitled) / with headers
text/plain 818b
On Sun Jun 21 16:32:53 2015, KMX wrote: Show quoted text
> Try to: > > 0/ perl -MFile::HomeDir -E "say File::HomeDir->my_home" > > 1/ remove the line > set HOME=%~dp0data > from portableshell.bat > > 2/ remove the whole section > HomeDir: > my_home: data > my_data: data > from portable.perl > > 3/ perl -MFile::HomeDir -E "say File::HomeDir->my_home" > > -- > kmx >
Yes, that worked. Thanks for the rapid response. I'll create a post_install script that removes the HomeDir section from "portable.perl" and the HOME line from "portableshell.bat". Should I consider removal of those lines a dependable/canonical way to disable the customization of HomeDir by Portable? Or do you see it changing in the future? When I submit the "semi-portable" fix, I want to comment on possible future maintenance issues. Thanks again.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.