Has portmaster gone insane?
lars.stokholm at gmail.com
Sun Oct 7 04:58:21 PDT 2007
On 10/7/07, Doug Barton <dougb at freebsd.org> wrote:
> On Fri, 5 Oct 2007, Lars Stokholm wrote:
> > On 10/5/07, Scot Hetzel <swhetzel at gmail.com> wrote:
> >> On 10/5/07, Lars Stokholm <lars.stokholm at gmail.com> wrote:
> >>> Running 'portmaster --clean-distfiles-all' it began to delete *a lot*
> >>> of files it shouldn't. I haven't had time to see how much is missing,
> >>> but I guess is so much, that the entire installation is screwed.
> I'm sincerely sorry that you've had this problem. I think Scot is right in
> that the code for --clean-distfiles* is pretty simple, and relies totally
> on a proper definition of DISTDIR.
Perhaps at the time it was empty, but it isn't now. I tried what Scot
said and it gave me "/usr/ports/distfiles". I also ran "portmaster
--clean-distfiles-all" again and it completed as expected, deleting a
few disftiles, but nothing else.
Also, I'm not completely sure, but it seems like it has only deleted
stuff in my ~, that is nothing outside of ~lars. It has probably got
something to do with the fact that I su'd from lars to root, likely
without cd'ing to somewhere else, when I ran clean-distfiles-all the
> I think I can see _what_ is happening, although I can't tell you why it's
> happening. Somehow the definition of DISTDIR on your system is empty, and
> so it's starting the find in / instead of /usr/ports/distfiles as it
> should. I'll add a check for empty DISTDIR and roll it into an update I'm
> working on at the moment.
> >>> It choked on a filename of a weird charset, so it didn't get a chance
> >>> to delete everything.
> I'm not sure I understand what you mean here, but I'm glad to hear that it
> didn't delete everything. Can you please try the attached patch and tell
> me if you get the error?
What I meant was just that it stopped deleting files (for some
reason), when it got to a file I have, originally called
"STUDIEFORLØBSBESKRIVELSE". At some point in time the "Ø" in the file
name was replaced by "??" and a lot of programs choke on that. It
probably hasn't got anything to do with portmaster anyway. :)
> >> Portmaster uses the following to determine the value of DISTDIR. What
> >> does this show that DISTDIR is set to?
> >> make BEFOREPORTMK=yes -f/usr/share/mk/bsd.port.mk -V DISTDIR
> > I'll have a look tomorrow.
> I'm very interested in the results here.
I finally got around to having a look at it. It wouldn't make much
sense to try the patch now that DISTDIR isn't empty (anymore?), but if
there's anything else I can do, I'll do it.
By the way, I had backup of everything, so nothing is lost. :)
More information about the freebsd-ports