Date: Fri, 16 Dec 2011 07:38:26 +0100 From: Baptiste Daroussin <bapt@freebsd.org> To: Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com> Cc: FreeBSD Ports List <freebsd-ports@freebsd.org> Subject: Re: Global and User package database Message-ID: <20111216063826.GD61709@azathoth.lan> In-Reply-To: <CAOgwaMssWQ8w43ZSb09vSvQvt9fA1BOvDBzW6btZvu90SCOgGg@mail.gmail.com> References: <CAOgwaMvoHakdYpGNhYdswvTb5xnGBWfMmp4hpC9U3he4SYtWEg@mail.gmail.com> <20111215210600.GA61709@azathoth.lan> <CAOgwaMssWQ8w43ZSb09vSvQvt9fA1BOvDBzW6btZvu90SCOgGg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--M38YqGLZlgb6RLPS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 15, 2011 at 10:13:19PM -0500, Mehmet Erol Sanliturk wrote: > On Thu, Dec 15, 2011 at 4:06 PM, Baptiste Daroussin <bapt@freebsd.org>wro= te: >=20 > > On Thu, Dec 15, 2011 at 02:10:57PM -0500, Mehmet Erol Sanliturk wrote: > > > Dear All , > > > > > > > > > In the new PkgNG : > > > > > > https://github.com/pkgng/pkgng/blob/master/pkg/add.c > > > > > > > > > the following statement is written : > > > > > > if (geteuid() !=3D 0) { > > > warnx("adding packages can only be done as root"); > > > return (EX_NOPERM); > > > } > > > > > > > > > Instead of the above statement , is it possible to use a statement > > > as follows ( which it may be defined as a function to be called from = all > > > the related > > > functions / programs ) : > > > > > > > > > > > > if (geteuid() =3D=3D 0) { > > > > > > package_db_path =3D ... global path name ... , etc. ; > > > > > > > > > PKGDB_PLACE =3D PKGDB_DEFAULT ... etc. > > > > > > > > > } else > > > { > > > > > > > > > package_db_path =3D ... local path name , ie. > > > in $HOME about user path name ... , etc. ; > > > > > > PKGDB_PLACE =3D PKGDB_USER ... etc. > > > > > > } > > > > > > if (pkgdb_open(&db, PKGDB_PLACE) !=3D EPKG_OK) { > > > return (EX_IOERR); > > > } > > > > > > > > > ( Replace PKGDB_PLACE by a suitable name ... ) > > > > > > > > > In that way , it will be possible to install packages into user home > > > directory , > > > instead of global package directory . > > > > > > For security concerns , user-installed packages will not be usable > > globally > > > , or > > > convenient only for the user . > > > > > > > > > > > > Thank you very much . > > > > > > Mehmet Erol Sanliturk > > > > This is an interesting idea, but it deserves more thinking about it, > > because it > > could have more impacts. > > > > Could you please fill an issue on the github so that we won't forget the > > idea > > and will be able to discuss it. > > > > I don't think we will propose that feature for 1.0 but maybe it could be > > discussed for 2.0 :) > > > > regards, > > Bapt > > >=20 >=20 >=20 > The issue has been created . >=20 > During program writing , design and implementation at the beginning is mu= ch > more easier than modifications > performed after a completed design and implementation . >=20 >=20 It is no more the begining of pkgng for long :) Yes that is what we do, and because pkgng is very close to the doors we won= 't break its design now, while we are ready to do it for 2.0 :) regards, Bapt --M38YqGLZlgb6RLPS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7q52IACgkQ8kTtMUmk6Eze4ACghqMtl3UjjoY/nmzn2DxvfIbE UGAAn2yDaUywYcWM2xCm1WsHxV4Xa/2O =0MY1 -----END PGP SIGNATURE----- --M38YqGLZlgb6RLPS--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111216063826.GD61709>