On Sat, Nov 29, 2014 at 04:32:20PM +0100, Mark Kettenis wrote:
> > Date: Sat, 29 Nov 2014 09:27:51 -0500
> > From: Ted Unangst <[email protected]>
> >
> > On Sat, Nov 29, 2014 at 14:02, Antoine Jacoutot wrote:
> > >> But that said, why does your pkg.conf keep returning? I don't have one on
> > >> my laptop at all, I probably removed it once after installing, but it
> > >
> > > It returns each time I upgrade using bsd.rd.
> > >
> >
> > This seems like a mistake. I like that the install script "remembers"
> > things like timezone and mirror for installation, but it always
> > prompts me. It's never an invisible setting. And two, it's not
> > actually something configured on the installed system.
>
> It would be rather annoying if pkg_add would ask me where I'd want to
> fetch my packages from every time I run it.
>
> Changing the install script to only create /etc/pkg.conf when doing a
> new install would make more sense.
This sound like a reasonable compromise to me.
Index: install.sub
===================================================================
RCS file: /home/cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.799
diff -p -u -r1.799 install.sub
--- install.sub 18 Nov 2014 19:00:16 -0000 1.799
+++ install.sub 29 Nov 2014 19:35:51 -0000
@@ -1952,12 +1952,9 @@ finish_up() {
done </mnt/etc/fstab
fi
- # Create or update pkg.conf with the new package path, if any
- if [[ -n $PACKAGE_PATH ]]; then
- grep -v '^[ ]*installpath[ ]*=' /mnt/etc/pkg.conf
2>/dev/null >/tmp/pkgconf
- print -r -- "installpath = $PACKAGE_PATH" >>/tmp/pkgconf
- cp /tmp/pkgconf /mnt/etc/pkg.conf
- fi
+ # Create an initial pkg.conf with the package path during install.
+ [[ -n $PACKAGE_PATH && $MODE == install ]] &&
+ print -r -- "installpath = $PACKAGE_PATH" >/mnt/etc/pkg.conf
echo -n "Making all device nodes..."
(cd /mnt/dev; sh MAKEDEV all
--
-=[rpe]=-