Dear Mojca, Root privileges worked using vim. The new ports are shown in the port search. Thanks a lot.
Rajdeep On Tue, Apr 16, 2019 at 3:09 PM Mojca Miklavec <mo...@macports.org> wrote: > Dear Rajdeep, > > I'm not sure to what extent my suggestion helps. If the file is in > fact locked, this won't do it, but I find it strange that this would > ever happen (if it happened to me, I would probably reboot the > machine). If using admin privileges won't help, maybe ask if someone > can help you on our IRC channel? > > Mojca > > On Tue, 16 Apr 2019 at 09:34, Mojca Miklavec <mo...@macports.org> wrote: > > > > On Tue, 16 Apr 2019 at 09:12, Rajdeep Bharati wrote: > > > > > > Hello, > > > For testing a new Portfile in my local repository, the Macports guide > says that I need to edit the sources.conf file. However, this file is > locked and I'm not able to unlock it. > > > > Did you try with root privileges? > > > > I don't know what editor you used, but > > sudo vim /opt/local/etc/macports/sources.conf > > (or some other editor of your choice) should work. > > > > If I open the file with TextMate and modify & change it, I get a > > prompt to enter the password and then I can save the file. > > > > (The best way is probably to clone the full macports-ports repository > > and point sources.conf to your clone. Or at least that's what I do. > > You need to make sure to generate the PortIndex in any case.) >