Skip site navigation (1)Skip section navigation (2)
Date:      29 Sep 2000 02:03:37 -0700
From:      asami@freebsd.org (Satoshi - Ports Wraith - Asami)
To:        Brandon Fosdick <bfoz@glue.umd.edu>
Cc:        Neil Blakey-Milner <nbm@mithrandr.moria.org>, ports@freebsd.org
Subject:   RFC: Ports layout reorganization (Re: ports tree idea: Combine DESCR and COMMENT)
Message-ID:  <vqcsnqjin86.fsf_-_@silvia.hip.berkeley.edu>
In-Reply-To: Brandon Fosdick's message of "Sat, 23 Sep 2000 18:06:22 -0400"
References:  <39CD200B.A10214EA@glue.umd.edu> <20000923233215.A45139@mithrandr.moria.org> <39CD295E.453FF278@glue.umd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
 * From: Brandon Fosdick <bfoz@glue.umd.edu>

 * > It's not really the files that kill us, but the directories.
 * 
 * So are you saying that removing some files won't help at all, or that it won't
 * help enough to be worth the effort?

The latter.

The way CVS works, an extra directory means at least five extra inodes
(the directory, the CVS directory, and three files in it).  Also, when
you do a something that involves locking, CVS creates a lock file per
directory.

One reason why I'm not very thrilled about combining COMMENT and DESCR
is that it will require a lot of manual work to merge them -- you
can't just "cat COMMENT DESCR > DESCR2; mv DESCR2 DESCR; cvs remove -f
COMMENT; cvs commit".  People actually need to read the DESCR files
and merge the COMMENT lines in as appropriate.

So I'm not sure if it's worth the effort.  On the other hand, moving
COMMENT into Makefiles would be much easier.  As long as we look out
for special characters, it can be done automatically.  However, as I
said above, the extra directories are an order of magnitude more
significant than extra files.  We can revisit this issue later.

As for reducing the number of directories, this is what I came up
with.  Comments welcome.

=======
The new layout will include

  Makefile
  checksum (<- files/md5)
  pkg-comment
  pkg-descr
  pkg-plist
   (and other pkg files)
  files/patch-* (<- patches/patch-*)

The rest of "files" and "scripts" stay the same.  This will get rid of
pretty much all the "pkg" and "patches" directories, and reduce some
(about 1,200, see below) of the "files" directories.  This will be a
reduction of some 8,000 directories total.  (With the CVS directories
I mentioned above taken into account, this is 40,000 inodes.)

I do not like moving all the patches into the main directory.  It's
not only the number of patches, but the unpredictability of the
directory listing caused by different lengths (more variations now
with filenames included) and number of patches.  I want to know where
to look for my stuff when I do a "ls". :)

FYI, here are some numbers from the ports tree a couple of weeks old.
There are 7891 patches in 2354 ports.  3534 ports have the files
directory, of which all but 598 include only the md5 file.

If we move patches into the files dir, there will be 2354 ports with
the files dir, meaning 1756 of the new files dir will only have
patchfiles.  (As I said above, 598 have files other than patches
anyway.)

There are only 204 ports with scripts.  I think we should leave those
alone.  I don't want to move them to files, as having "scripts" show
up in the directory listing of the main port triggers a little alarm
at the back of my head.  (These scripts are often sources of
trouble. :)

There are only 273 scripts total, so moving them to the main directory
is not out of question.  In which cases, the files will be renamed
scripts-pre-configure, etc.  But these are long filenames, and as I
said, I don't like the number of columns in ls messed up.

I like this:

===
## ls
total 8
1 CVS/         1 checksum     1 pkg-comment  1 pkg-plist
1 Makefile     1 files/       1 pkg-descr    1 scripts/
===

much better than this:

===
## ls
total 9
1 CVS/                     1 files/                   1 pkg-plist
1 Makefile                 1 pkg-comment              2 scripts-create-dev-link*
1 checksum                 1 pkg-descr
===

or heaven forbid:

===
## ls
total 21
1 CVS/                     1 patch-ac                 1 pkg-comment
1 Makefile                 1 patch-ad                 1 pkg-descr
1 checksum                 1 patch-af                 1 pkg-plist
1 files/                   1 patch-ag                 2 scripts-create-dev-link*
3 patch-aa                 1 patch-ai
3 patch-ab                 1 patch-ba
===

;)

One issue I'm still wondering is the name of the "checksum" file.  We
can put things like size information in there too, so "checksum" is
can still be a misnomer.  But the other two names I could think of,
"filelist" will cause a tab-conflict with the "files" directory and
"distfiles" looks too much like the directory in ${PORTSDIR}.
=======

If we can all agree on this, I will do the migration myself.  Most
ports will just involve a repo copy plus a few cvs remove's, and can
be completely automated.  Ports that set its own PATCHDIR and/or
PKGDIR have to be handled manually, but there aren't that many of
those.

Of course, I will send out a proposed patch to bsd.port.mk before I
change the files and also give everyone ample warning before the move
actually happens.

Thanks,
-PW


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vqcsnqjin86.fsf_-_>