Re: [gentoo-portage-dev] 2.1 release candidate soon?

2006-04-07 Thread solar
On Fri, 2006-04-07 at 21:06 +0900, Jason Stubbs wrote:
 On Friday 07 April 2006 20:54, Ned Ludd wrote:
  Handling of the || () in ROOT!=/ via the -K option is not in that 
  good of shape in 2.1_NXX and can't really be used. Till that's 
  addressed 2.1(re-ping jason) in my eyes absolutely should 
  not even be considered for any rc status.
 
 Can you refresh my memory on what the issue is here?

Example off the topof my head:

FEATURES=buildpkg ROOT=/ emerge gcc
rm -rf /dev/shm/foo

ROOT=/dev/shm/foo emerge gcc -pvK

Notice how it selects the incorrect deps? 
IE: eselect cuz it's the first listed dep in the || ( ) vs the
gcc-config

I forget what the title of the subject was but I recall us 
talking about it a bit on the portage alias a month or two ago and you 
more or less stated it's not broken at this point it's just not been 
coded to handle such cases yet. Other ppl who do alot of work with
either || () / $ROOT such as Donnie or Alec should also be 
able to give some insights also.



-- 
solar [EMAIL PROTECTED]
Gentoo Linux

-- 
gentoo-portage-dev@gentoo.org mailing list



Re: [gentoo-portage-dev] DB and binary dependency

2006-03-23 Thread solar
This thread keeps going and going and it's a subject thats already been 
covered... So I'll just Re you here. 
Search the archives here for RRDEPEND, LDEPEND

As soon as I can figure out a way in python to do fast lookups of libs 
it will be integrated. I can do it really really fast in c but 
I don't think everybody here is keen on installing the portage-utils.

-peace


On Wed, 2006-03-15 at 12:13 -0300, Gustavo Sverzut Barbieri wrote:
 Hello,
 
 There is any provision for binary dependency on Gentoo/Portage? The
 way it works now is quite messy with things like revdep-rebuild.
 
 I have an idea to solve this problem: after software is build, you
 check which files it links (ldd binaries libraries) and check the used
 against installed packages. If a library is not provided by  an
 installed package we could have a policy to inform user or just abort
 installation.
 
 Also, if we implement these dependencies in rpm-generator, we could
 just generate RPM packages and install it in the RPM-DB and let it
 handle these kind of things.
 
 With these in place emerge would handle the build stage (where it
 excels), but rpm would handle the binary installation and dependencies
 (where it excels).
 
 --
 Gustavo Sverzut Barbieri
 --
 Mobile: +55 (81) 9927 0010
  Phone:  +1 (347) 624 6296; [EMAIL PROTECTED]
 Jabber: [EMAIL PROTECTED]
   ICQ#: 17249123
MSN: [EMAIL PROTECTED]
GPG: 0xB640E1A2 @ wwwkeys.pgp.net
 
-- 
solar [EMAIL PROTECTED]
Gentoo Linux

-- 
gentoo-portage-dev@gentoo.org mailing list



Re: [gentoo-portage-dev] Few things, which imho would make portage better

2006-03-14 Thread solar
On Tue, 2006-03-14 at 15:50 +0200, Marius Mauch wrote:
 tvali wrote:
  I did think about some priorities too, so that it could be perfect for me.
  
  It should be possible to add package with a priority. I will give you an 
  use case and explanation how i would use portage.
 



 Heh, make the dep resolver even more complex ;)
 Also don't really see a need for such a feature, pretty much no benefit 
 with a lot of additional complexity.

agreed.


-- 
solar [EMAIL PROTECTED]
Gentoo Linux

-- 
gentoo-portage-dev@gentoo.org mailing list



Re: [gentoo-portage-dev] Deprecating 'emerge action' syntax

2006-02-16 Thread solar
On Thu, 2006-02-16 at 19:04 +0100, Marius Mauch wrote:

[snip]

  If by deprecate you mean to detect when '--' hasn't been prepended
  and either go ahead with the action or notify that the package
  doesn't exist then I have no objections. Might be better to go with
  the latter so that users adjust quickly.
 
 You saw the attached one-line patch?
 Atm it just throws a warning when an action without -- is used.
 I'm divided on ignoring the action then, on one hand it would be nice to
 get rid of this, OTOH it would be kinda rude to not have a transition
 period for people. Anyone else having an opinion on this?


Re opinion:

I agree it would be kinda rude to just deprecate a behavior and
introduce another all in one shot. I'd give it a few releases till
people retrain themselves.
Maybe when emerge --world/--system/--action has worked it's way into
at least 2 stable releases before deprecating 'action'



-- 
solar [EMAIL PROTECTED]
Gentoo Linux

-- 
gentoo-portage-dev@gentoo.org mailing list



Re: [gentoo-portage-dev] confcache integration

2006-01-24 Thread solar
On Wed, 2006-01-25 at 00:30 +0900, Jason Stubbs wrote:
 On Tuesday 24 January 2006 21:50, Brian Harring wrote:
 
 +os.makedirs(mysettings[CONFCACHE_DIR], mode=0775)
 +os.chown(mysettings[CONFCACHE_DIR], portage_uid, -1)
 
 This will die when running as non-root, no? ebuild is now oft used by devs
 running as normal users which will be broken by this. 

Your right. I've hit that bug myself in the past switching 
between root merges and being a real life dev and running ebuild 
foo.build clean unpack compile;

-- 
solar [EMAIL PROTECTED]
Gentoo Linux

-- 
gentoo-portage-dev@gentoo.org mailing list



[gentoo-portage-dev] [RFC] Making --quiet really mean it

2005-12-27 Thread solar
Attached is the initial framework to make portage stfu.

pym/portage_util.py - (wrappers the writemsg function)
 By default writemsg() has noiselevel handling, but it sends 
 everything to stderr. We wrapper it in order to pass 
 an additional file descriptor so we can use stdout vs stderr.

pym/portage.py - (use writemsg_stdout function)
 To take advantage of the newy created writemsg_stdout() function
 we swap it in place of alot of the default print foo statements 
 that are in portage's merge/unmerging phases.
 Shifts env var PORTAGE_QUIET to doebuild where it can 
 be used by ebuild.sh.

bin/emerge - (-q/--quiet trigger)
 Sets noiselimit to -1
 and uses writemsg_stdout in a few places.

bin/ebuild.sh - (ulgy not attached)
bin/prepstrip - (ulgy not attached)

-- 
solar [EMAIL PROTECTED]
Gentoo Linux
--- pym/portage_util.py	(revision 2485)
+++ pym/portage_util.py	(working copy)
@@ -6,13 +6,20 @@
 import sys,string,shlex,os.path
 
 noiselimit = 0
-def writemsg(mystr,noiselevel=0):
+
+def writemsg(mystr,noiselevel=0,fd=None):
 	Prints out warning and debug messages based on the noiselimit setting
 	global noiselimit
+	if fd is None:
+		fd = sys.stderr
 	if noiselevel = noiselimit:
-		sys.stderr.write(mystr)
-		sys.stderr.flush()
+		fd.write(mystr)
+		fd.flush()
 
+def writemsg_stdout(mystr,noiselevel=0):
+	Prints messages stdout based on the noiselimit setting
+	writemsg(mystr, noiselevel=noiselevel, fd=sys.stdout)
+
 def grabfile(myfilename, compat_level=0, recursive=0):
 	This function grabs the lines in a file, normalizes whitespace and returns lines in a list; if a line
 	begins with a #, it is ignored, as are empty lines
Index: pym/portage.py
===
--- pym/portage.py	(revision 2485)
+++ pym/portage.py	(working copy)
@@ -90,7 +90,7 @@
 	import portage_util
 	from portage_util import grab_multiple, grabdict, grabdict_package, grabfile, grabfile_package, \
 		grabints, map_dictlist_vals, pickle_read, pickle_write, stack_dictlist, stack_dicts, stack_lists, \
-		unique_array, varexpand, writedict, writeints, writemsg, getconfig, dump_traceback
+		unique_array, varexpand, writedict, writeints, writemsg, getconfig, dump_traceback, writemsg_stdout
 	import portage_exception
 	import portage_gpg
 	import portage_locks
@@ -2293,7 +2293,7 @@
 			print
 			return 0
 		else:
-			print  checksums +note+ ;-),x
+			writemsg_stdout( checksums +note+ ;-) %s\n % x)
 	return 1
 
 
@@ -2493,6 +2493,9 @@
 	mysettings[PV] = mysplit[1]
 	mysettings[PR] = mysplit[2]
 
+	if portage_util.noiselimit  0:
+		mysettings[PORTAGE_QUIET] = 1
+
 	if mydo != depend:
 		try:
 			mysettings[INHERITED], mysettings[RESTRICT] = db[root][tree].dbapi.aux_get( \
@@ -5704,7 +5707,7 @@
 		#we skip this if we're dealing with a symlink
 		#because os.path.exists() will operate on the
 		#link target rather than the link itself.
-		print --- !found +str(pkgfiles[obj][0]), obj
+		writemsg_stdout(--- !found +str(pkgfiles[obj][0])+  %s\n % obj)
 		continue
 # next line includes a tweak to protect modules from being unmerged,
 # but we don't protect modules from being overwritten if they are
@@ -5712,56 +5715,56 @@
 # functionality for /lib/modules. For portage-ng both capabilities
 # should be able to be independently specified.
 if self.isprotected(obj) or ((len(obj)  len(modprotect)) and (obj[0:len(modprotect)]==modprotect)):
-	print --- cfgpro +str(pkgfiles[obj][0]), obj
+	writemsg_stdout(--- cfgpro %s %s\n % (pkgfiles[obj][0], obj))
 	continue
 
 lstatobj=os.lstat(obj)
 lmtime=str(lstatobj[stat.ST_MTIME])
 if (pkgfiles[obj][0] not in (dir,fif,dev)) and (lmtime != pkgfiles[obj][1]):
-	print --- !mtime, pkgfiles[obj][0], obj
+	writemsg_stdout(--- !mtime %s %s\n % (pkgfiles[obj][0], obj))
 	continue
 
 if pkgfiles[obj][0]==dir:
 	if not os.path.isdir(obj):
-		print --- !dir  ,dir, obj
+		writemsg_stdout(--- !dir  %s %s\n % (dir, obj))
 		continue
 	mydirs.append(obj)
 elif pkgfiles[obj][0]==sym:
 	if not os.path.islink(obj):
-		print --- !sym  ,sym, obj
+		writemsg_stdout(--- !sym  %s %s\n % (sym, obj))
 		continue
 	try:
 		os.unlink(obj)
-		print,sym,obj
+		writemsg_stdout(   %s %s\n % (sym,obj))
 	except (OSError,IOError),e:
-		print !!!   ,sym,obj
+		writemsg_stdout(!!!   %s %s\n % (sym,obj))
 elif pkgfiles[obj][0]==obj:
 	if not os.path.isfile(obj):
-		print --- !obj  ,obj, obj
+		writemsg_stdout(--- !obj  %s %s\n % (obj, obj))
 		continue
 	mymd5=portage_checksum.perform_md5(obj, calc_prelink=1)
 
 	# string.lower is needed because db entries used to be in upper-case.  The
 	# string.lower allows for backwards compatibility.
 	if mymd5 != string.lower(pkgfiles[obj][2]):
-		print --- !md5  ,obj, obj
+		writemsg_stdout(--- !md5  %s %s\n % (obj, obj))
 		continue