[pacman-dev] [RFC] command-line provided paths under --sysroot

Eli Schwartz eschwartz at archlinux.org
Sun Jan 17 00:01:37 UTC 2021


On 1/16/21 5:32 AM, Allan McRae wrote:
> On 16/1/21 5:47 pm, Andrew Gregory wrote:
>> Implementing --sysroot the lazy way with a simple chroot turned out to
>> have a number of complications that significantly reduce its utility.
>> I've been sitting on a patch to reimplement it by prefixing all
>> configuration paths with the sysroot, but this raises the question of
>> how we should handle paths provided on the command line.  Using chroot
>> meant that all paths, regardless of what they were or where they came
>> from, would be interpreted relative to the sysroot.  Switching to
>> manually adjusting paths means that we have the option to change that.
>>
>> I'm inclined to change pacman to use command line arguments/options
>> as-is and have --sysroot just modify values from the config file.
>> I think that's the friendlier option for users.
>>
> 
> I think that is the right approach, but I'd really like input from the
> archiso and pacstrap maintainers, as they use these options and I
> believe have had issues this should solve.

Speaking with my pacstrap maintainer hat on, my attempts to use 
--sysroot (which never panned out due to the disabled network thing) 
were rendered pretty ugly by the need to take the pacman.conf from the 
host and copy it into "$newroot"/tmp/pacman.conf, or bind mount the host 
cachedir in the case of pacstrap -c, because I needed to use the host 
resources rather than strictly administrating an existing chroot.

So the ability to pass command-line options relating to the host would 
be very helpful since I would then not need to mess around with those.

I do not know what the story is with archiso; it's plausible they'd need 
the same kind of flexibility. I'm looping in dvzrv for input, since I 
don't believe he is subscribed to this list.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20210116/33de5ab2/attachment-0001.sig>


More information about the pacman-dev mailing list