Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172839 - app-portage/genlop-0.30.5 borked on G/FBSD
Summary: app-portage/genlop-0.30.5 borked on G/FBSD
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-03-31 02:00 UTC by Christoph Mende (RETIRED)
Modified: 2007-09-27 02:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
genlop (genlop.diff,1.35 KB, patch)
2007-09-19 21:54 UTC, Joe Peterson (RETIRED)
Details | Diff
genlop-0.30.7-freebsd.patch (genlop-0.30.7-freebsd.patch,1.37 KB, patch)
2007-09-19 22:25 UTC, Joe Peterson (RETIRED)
Details | Diff
genlop-0.30.7-r2.ebuild (genlop-0.30.7-r2.ebuild.diff,367 bytes, patch)
2007-09-19 22:26 UTC, Joe Peterson (RETIRED)
Details | Diff
genlop-0.30.7-r2.ebuild (genlop-0.30.7-r2.ebuild.diff,360 bytes, patch)
2007-09-20 18:55 UTC, Joe Peterson (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Mende (RETIRED) gentoo-dev 2007-03-31 02:00:28 UTC
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
Comment 1 Michael Cummings (RETIRED) gentoo-dev 2007-04-21 00:44:41 UTC
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)
Comment 2 Christoph Mende (RETIRED) gentoo-dev 2007-04-21 01:29:47 UTC
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 ;>
Comment 3 Christoph Mende (RETIRED) gentoo-dev 2007-04-21 01:31:10 UTC
Erm sorry, forget my last comment, I misread your comment :/
Comment 4 Joe Peterson (RETIRED) gentoo-dev 2007-09-16 19:31:24 UTC
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.
Comment 5 Joe Peterson (RETIRED) gentoo-dev 2007-09-19 21:54:02 UTC
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!
Comment 6 Joe Peterson (RETIRED) gentoo-dev 2007-09-19 22:25:47 UTC
Created attachment 131347 [details, diff]
genlop-0.30.7-freebsd.patch

Patch for use 0.30.7 ebuild
Comment 7 Joe Peterson (RETIRED) gentoo-dev 2007-09-19 22:26:47 UTC
Created attachment 131348 [details, diff]
genlop-0.30.7-r2.ebuild

New 0.30.7 ebuild (diff)
Comment 8 Joe Peterson (RETIRED) gentoo-dev 2007-09-19 23:01:51 UTC
I just tested these patches on Linux as well, and it works.
Comment 9 Joe Peterson (RETIRED) gentoo-dev 2007-09-20 18:55:32 UTC
Created attachment 131442 [details, diff]
genlop-0.30.7-r2.ebuild

Minor change to make more correct...
Comment 10 Joe Peterson (RETIRED) gentoo-dev 2007-09-23 17:51:39 UTC
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!
Comment 11 Paul Varner (RETIRED) gentoo-dev 2007-09-25 21:27:33 UTC
$ svn commit -m "Apply FreeBSD patch from lavajoe (Bug #172839)"
Sending        trunk/genlop
Transmitting file data .
Committed revision 200.
Comment 12 Joe Peterson (RETIRED) gentoo-dev 2007-09-25 23:34:08 UTC
New version 0.30.8 incorporates my patch as well as some other improvements (thanks, FuzzyRay, for making the new tarball!).  Checked into cvs.
Comment 13 Fabian Groffen gentoo-dev 2007-09-26 09:21:03 UTC
(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)
Comment 14 Joe Peterson (RETIRED) gentoo-dev 2007-09-26 16:03:03 UTC
(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!  :)
Comment 15 Fabian Groffen gentoo-dev 2007-09-26 23:41:25 UTC
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.
Comment 16 Joe Peterson (RETIRED) gentoo-dev 2007-09-27 02:17:06 UTC
(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.