Seems like genlop uses some parameters that FreeBSD's ps doesn't understand: ps: illegal option -- - usage: ps [-aCcefHhjlmrSTuvwXxZ] [-O fmt | -o fmt] [-G gid[,gid...]] [-M core] [-N system] [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]] ps [-L] !!! Error: no working merge found. (the -c option only works if there is an ongoing compilation, see manpage) Portage 2.1.2.3 (default-bsd/fbsd/6.2/x86, gcc-4.1.2, freebsd-lib-6.2-r0, 6.2-RELEASE i386) ================================================================= System uname: 6.2-RELEASE i386 i386 Gentoo Base System release 1.13.0_alpha12 Timestamp of tree: Sat, 31 Mar 2007 00:00:09 +0000 dev-lang/python: 2.4.4 dev-python/pycrypto: 2.0.1-r5 sys-devel/autoconf: 2.61 sys-devel/automake: 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.15-r1 sys-devel/libtool: 1.5.23b virtual/os-headers: 6.2 ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd" AUTOCLEAN="yes" CBUILD="i686-gentoo-freebsd6.2" CFLAGS="-march=k8 -O2 -pipe -msse3 -fomit-frame-pointer" CHOST="i686-gentoo-freebsd6.2" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=k8 -O2 -pipe -msse3 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="berkdb cli crypt cups dri gdbm iconv java5 libg++ midi ncurses oss pam pcre ppds readline reflection session spl ssl tcpd unicode x86-fbsd xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="FreeBSD" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="BSD" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy i128 i810 mga neomagic nv rendition s3 s3virge savage siliconmotion sis tga trident tseng vga via vmware" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
wonder why flameeyes keyworded it then (ps call hasn't changed in any recent version that I'm aware of, certainly not since it was passed over from the original maintainers)
My guess was that an older version of genlop worked and the x86-fbsd keyword was just taken over to a new version, we can't just force downgrades on G/FBSD users because 0.30.5 is already the oldest version in protage ;>
Erm sorry, forget my last comment, I misread your comment :/
I just ran across this when using the "-c" option (looks like the bug author also was doing this). Main options seem to work fine. I will take a look at this when I get done with some other stuff and try to develop a patch.
Created attachment 131344 [details, diff] genlop Attached is a patch to genlop that will work on FreeBSD. Note that the GNU-specific options are now gone, so I use some other techniques to get the pertinent info. Also, I grab the process info right from ps, so no need to use the Linux-specific /proc loop now. I believe this will work fine on Linux, but please test. Also, I can make a patch and ebuild to work with the current dist files if desired. I am also willing to check this in - give the word!
Created attachment 131347 [details, diff] genlop-0.30.7-freebsd.patch Patch for use 0.30.7 ebuild
Created attachment 131348 [details, diff] genlop-0.30.7-r2.ebuild New 0.30.7 ebuild (diff)
I just tested these patches on Linux as well, and it works.
Created attachment 131442 [details, diff] genlop-0.30.7-r2.ebuild Minor change to make more correct...
Hello portage tools guys, Can you take a look at my patch and look at my method for doing "-c" in a portable way? I'd like to get this checked in for testing so that non-GNU/Linux can use this feature. Thanks!
$ svn commit -m "Apply FreeBSD patch from lavajoe (Bug #172839)" Sending trunk/genlop Transmitting file data . Committed revision 200.
New version 0.30.8 incorporates my patch as well as some other improvements (thanks, FuzzyRay, for making the new tarball!). Checked into cvs.
(In reply to comment #10) ... > portable way? I'd like to get this checked in for testing so that > non-GNU/Linux can use this feature. Thanks! One problem I have with calling it "non-GNU/Linux", is that you actually mean G/FreeBSD. Your patch doesn't work on OSX, neither does it on Solaris, most probably not on AIX either. (solaris would grok ps -ef -o pid,args, osx just doesn't know args output column)
(In reply to comment #13) > (In reply to comment #10) > ... > > portable way? I'd like to get this checked in for testing so that > > non-GNU/Linux can use this feature. Thanks! > > One problem I have with calling it "non-GNU/Linux", is that you actually mean > G/FreeBSD. Your patch doesn't work on OSX, neither does it on Solaris, most > probably not on AIX either. > > (solaris would grok ps -ef -o pid,args, osx just doesn't know args output > column) Good point. You are right: "non-GNU/Linux" is not a good way to describe it. It works now on Linux & FreeBSD for sure, but it needs work to work on some others; I guess people don't use -c that much... ;) The patch does make it *more portable", in that it also removed the dependency on the /proc file system, so it comes down to ps options... ps has always been a rather tough one, cross-platform-wise! :)
If you're really interested, this is the (ugly) hack I did: http://overlays.gentoo.org/proj/alt/changeset?old_path=trunk%2Fprefix-overlay%2Fapp-portage%2Fgenlop%2Fgenlop-0.30.8.ebuild&old=9952&new_path=trunk%2Fprefix-overlay%2Fapp-portage%2Fgenlop%2Fgenlop-0.30.7.ebuild&new=9952 ps: sorry for misusing this bug, but .8 has actually the version number of .7 in the code.
(In reply to comment #15) > If you're really interested, this is the (ugly) hack I did: > > ... > > ps: sorry for misusing this bug, but .8 has actually the version number of .7 > in the code. Thanks for spotting that version thing! I patched the version in r1. As for your patch, I think it might be better to patch the genlop script to detect platform real-time. That way the script itself will be portable. Also, no need to worry then about sed "malfunctions". :) If you agree, go ahead and make a patch. I think it would be great to have more portability.