Re: Working on FLAVOR support in portmaster

2017-12-05 Thread Jeremy Lea
Hi,

On Tue, Dec 05, 2017 at 08:35:55AM +0100, Stefan Esser wrote:
> Is it acceptable, to have portmaster stop supporting the old package system?
> AFAIK, there is no way that a modern ports tree with flavor support works
> with a non-PKG_NG infrastructure?

I also started working on this yesterday...  Looking at the code it is
probably also worth asking if portmaster needs to continue to support so
many binary package options.  Many of the options can be done directly
with 'pkg', and many of the use cases are probably better served by
poudriere, and many of them don't work with portmaster and pkgng anyway.

Regards,
  -Jeremy
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Parallel builds, build locks, pkg_dbdir locked

2009-04-09 Thread Jeremy Lea
Hi,

On Thu, Apr 02, 2009 at 05:57:05PM -0400, David Forsythe wrote:
 patch: http://dmz2.khome.utcorp.net/~dforsyth/port.mk-locks.diff

Since no one else seems to have commented, a few quick thoughts.  I have
not actually tried your patch.

1. Is there any reason not to do the locking?  Removing NO_LOCKS would
make things much simpler.  Would it be possible to not lock the whole
initial make call and only lock the main targets (grep for USE_SUBMAKE).

2. The locks seem to be created in ${PORTSDIR}/${PKGORIGIN}, which might
be read only.  The locks should be created in ${PORT_DBDIR}.  Or use
${PORTSDIR}/${PKGORIGIN}/Makefile and make lockf always keep the file!

3. I don't see how parallel fetching is useful.  If you've got enough
bandwidth to make it work, then you've got enough bandwidth to be
considered rude to the FTP site at the receiving end.  If you haven't
then you're not going to benefit from multiple fetches.  For checksums,
you also don't want to stress your disks with parallel reads.

4. Use:
.if defined(MAX_PARALLEL_DEPENDS)  ${MAX_PARALLEL_DEPENDS} != 1
_P_DEPENDS = -j ${MAX_PARALLEL_DEPENDS}
.endif
Forcing BATCH is bad.  It changes how some ports work.  Rather, it would
be better to force a config-recursive if someone wants this.

5. Can you use ${MAKE} -C $DIR ... instead of ${SH} -c {cd ${DIR} 
$MAKE ...} as an argument for ${LOCKF}

6. It is not clear to me that all of the merging of lib-depends into the
other depends targets buys you anything.  I don't think it allows you to
run the different types of depends targets in parallel?  The logic of
parallel depends would be cleaner if you just defined all of the
individual targets for each depends type in one loop, the lib depends in
second loop, and built the locking targets and things a third loop.  Not
changing the whitespace or changing $$i to $${dependency} would be good,
because they would make the patch easier to read.

7. The locking for PKGDIR is different to the other locking, and
probably should always be done.  You could wrap the entire target into
the ${SH} call.  Do you need to wrap the PKG_INFO command in a lockf
call?

Otherwise, thank you for working on this important feature!  I often try
to launch multiple port builds in different terminals and hate it when
they crash...

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
   http://www.freebsd.org/
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: APNG patch for graphics/png port

2008-12-22 Thread Jeremy Lea
Hi,

On Mon, Dec 22, 2008 at 03:10:59PM -0500, Mikhail Teterin wrote:
 Personally, I think, I'm in favor of the last approach, at least for
 now that animated PNG (APNG) content is non-existent anyway

Except for many of the chrome icons in firefox, etc.  i.e. doing this
with break firefox.  Do number one - link mozilla apps against their own
static libpng.  It really isn't that much space, and the mozilla build
works that way by default.

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
   http://www.freebsd.org/
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: APNG patch for graphics/png port

2008-12-22 Thread Jeremy Lea
Hi,

On Mon, Dec 22, 2008 at 05:06:52PM -0500, Mikhail Teterin wrote:
 Was not one of the advantages of APNG the fact, that a non-Animated PNG 
 reader will still show the first frame of the animation? In that case, 
 the icons will simply be non-animated...

The throbber is pretty important UI for a browser.  If you break it,
people will complain.  And say goodbye to '--enable-offical-branding'.

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
   http://www.freebsd.org/
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: APNG patch for graphics/png port

2008-12-22 Thread Jeremy Lea
Hi,

On Mon, Dec 22, 2008 at 08:16:43PM -0500, Mikhail T. wrote:
 The throbber is pretty important UI for a browser.  If you break it,
 people will complain.
 Uhm, what is throbber? Could you elaborate?

The little spinning things in the tabs, or the right hand side of the
menu bar, which tell you that its loading a page.

  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
   http://www.freebsd.org/
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: Utility for safe updating of ports in base system

2008-03-20 Thread Jeremy Lea
Hi,

On Thu, Mar 20, 2008 at 01:05:27AM -0700, Doug Barton wrote:
 Now all that said, I'd love to see us move to a much more robust package 
 management system, or even just a better interface to the one we have. The 
 problem is that I don't have the time to do that as a volunteer project, 
 and I don't think anyone else does either. :)

I did a lot of this work, when I did have the time:
http://sourceforge.net/projects/fpkg/

Supports upgrading (doesn't move the files to compat, but that would be
a five line change), backups, db files, versioned depends, pkg_which. 
Just about all of the ideas on that page, but not command line
compatible with portupgrade.

I haven't played with it in years.  It would need all of the pkg_install
features and fixes from about 2004 (or maybe earlier) merged in (or
reimplemented).

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
   http://www.freebsd.org/
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Looking for speed increases in make index and pkg_version for ports

2007-05-27 Thread Jeremy Lea
Hi,

On Sun, May 27, 2007 at 03:30:48PM -0700, Jeremy Chadwick wrote:
 Does it need to be done this way?  Can we just iterate through all of
 the ports, call make -V _DEPEND_DIRS, then sort | uniq the results?

This is exactly what ALL-DEPENDS-LIST does.  Except it's faster.  It
keeps two lists and generates a third implictly, with a two more
temporary lists...  The first is $$L, which start cas _DEPEND_DIRS.  It
loops over L and for each directory ($$d) in $$L checks if it has
already been there (the ports dependencies are not a single list - a
port like gnome2 implicitly depends on libtool hundreds of times), and
skips it if it has, otherwise it adds it to $$checked, which is the list
of directories it has checked, and echo's it so it is added to the
result of ALL-DEPENDS-LIST.  It then does a make -V _DEPENDS_DIR in the
directory (getting $$children), which it then checks to make sure they
are not in the list of checked directories or directories to be checked. 
If they are not it adds them to $$l, the list of directories to check. 
Once it has done with the directories in $$L it sets $$L to $$l, and
starts over, until there are no more directories.

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
   http://www.freebsd.org/
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Speedup for make clean-depends (and thus make clean)

2007-05-21 Thread Jeremy Lea
Hi,

On Mon, May 21, 2007 at 10:20:26AM +0200, Alexander Leidinger wrote:
 I tried to do the WRKDIR and _DEPEND_DIRS part in one go myself, but  
 it was slower than the patch I did post (in the case where all dirs  
 are already clean). But I did use another implementation, I did a set  
 -- $$children and used shift instead of state variables. Did you  
 compare the speed of your patch with the speed of my patch (in a  
 directory with a lot of dependencies like e.g. gnome2)?

In /usr/ports/x11/gnome2 (on an up to date port's tree):

make clean-depends:
real 1030.98user 916.21 sys 102.80
make all-depends-list:
real 348.25 user 310.27 sys 32.01
make clean-depends-list: (Your patch)
real 685.53 user 611.60 sys 65.93
make clean-depends-full:
real 346.18 user 310.53 sys 31.94
make clean-depends-quick:
real 124.72 user 119.88 sys 3.73

In other words, it takes my poor old machine 17 minutes to do a 'make
clean' of gnome2 with no existing work directories (i.e. to do nothing). 
Of that 5.8 minutes is spent building the list of directories to clean. 
Your patch increases that to 11.4 minutes (meaning that 'make clean' is
33% faster - which matches the numbers you posted).  With my patch it
takes the same time to build the list (meaning 'make clean' is 66%
faster).

The cheating quick version takes one tenth of the time, because gnome2
directly depends on 57 ports, out of 508 total (on my machine).

 There's a bug. You continue if the WRKDIR does not exist, but you  
 don't change the state, so you don't check if the first dependency was  
 already checked. You need to switch to the second state before  
 checking the existence of the WRKDIR.

Ooops, that should, of course, have been a 'break' not a 'continue'...

 One might want to use the logic that 'make clean' does a 'make clean
 limited-clean' if NOCLEANDEPENDS is not defined, and 'make clean' if it
 is, and leave 'make clean-depends' to do the full clean.
 
 I don't think changing the semantic of some existing stuff without a  
 major reason is a good idea. I think it is better to introduce a new  
 target and let people use the new target instead.

From bsd.port.mk:
# clean - Remove ${WRKDIR} and other temporary files used for building.
# clean-depends - Do a make clean for all dependencies.

This is the only documentation of the targets that I found.  Using the
limited-clean target would get users exactly the this behaviour - it
would clean up the port and all of the other ports it depended on that
were built to statisfy the building of this port.

The only difference would be that if you say built some stuff (say
firefox), doing a clean, removed some stuff (say gmake - which is now a
leaf port/package), then built some other stuff (like mysql) without a
clean, then built something else (like gnome2) with a clean, it would
still leave behind some dirty dirs like gmake, which would have been
cleaned before.

You could come up with a number of contrived examples where this would
shoot you in the foot -- mostly when you install something then
pkg_delete it, without cleaning, and then build something else which
depends on it, and because it's not clean the sub-make will return
without doing an install because the install cookie exists, but the
build will fail right there.  (This case has been broken in the ports
tree for a long time - changing DEPENDS_TARGET to 'reinstall' fixes most
cases).  'make clean' will still get you back on track because you will
have a trail of partially built ports down to this old build.

I've added some more to the attched patch, including the idea of a
pre-clean, which would be useful for portupgrade, since it could define
DEPENDS_PRECLEAN and not have to worry about cleaning before building...

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
   http://www.freebsd.org/

--- bsd.port.mk.origSat May 19 12:57:27 2007
+++ bsd.port.mk Mon May 21 15:11:53 2007
@@ -3216,10 +3216,14 @@
 .endif
 
 .if !defined(DEPENDS_TARGET)
+.if defined(DEPENDS_PRECLEAN)
+DEPENDS_TARGET=clean
+DEPENDS_ARGS=  NOCLEANDEPENDS=yes
+.endif
 .if make(reinstall)
-DEPENDS_TARGET=reinstall
+DEPENDS_TARGET+=   reinstall
 .else
-DEPENDS_TARGET=install
+DEPENDS_TARGET+=   install
 .endif
 .if defined(DEPENDS_CLEAN)
 DEPENDS_TARGET+=   clean
@@ -4453,7 +4457,7 @@
 .if !target(clean)
 clean:
 .if !defined(NOCLEANDEPENDS)
-   @cd ${.CURDIR}  ${MAKE} ${__softMAKEFLAGS} clean-depends
+   @cd ${.CURDIR}  ${MAKE} ${__softMAKEFLAGS} limited-clean-depends
 .endif
@${ECHO_MSG} ===  Cleaning for ${PKGNAME}
 .if target(pre-clean)
@@ -4846,6 +4850,14 @@
if ${EXPR} $$dir : '.*:'  /dev/null; then \
target=`${ECHO_CMD} $$dir | ${SED} -e 's/.*://'`; \
dir=`${ECHO_CMD} $$dir | ${SED} -e 's/:.*//'`; \
+   if [