=== kiko is now known as kiko-afk
=== kiko-afk is now known as kiko
=== stub [~stub@dsl-] has joined #launchpad
=== stub [~stub@dsl-] has joined #launchpad
=== lalo [~lalo@] has joined #launchpad
=== sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad
=== mdz [~mdz@69-167-148-207.vnnyca.adelphia.net] has joined #launchpad
sabdflhow do i use the arch-tag line at the top of a file?11:09
=== stu1 [~stub@dsl-] has joined #launchpad
lalosabdfl: first you have to obtain an unique id from arch, and I don't know how to do that11:25
sabdflwhat's the line used for?11:25
laloarch doesn't use the filenames to "index" its metadata; it use an unique id for each file11:27
laloso that it can track renames and moves11:27
sabdflthat much i understood, so i am curious what the tag inside the file is used for11:34
lalothere are two ways to associate an id with a file; either in a separate file (that's what "tla add foo" does) or as a tagline inside the file11:35
=== stub [~stub@dsl-] has joined #launchpad
laloif you're in a source tree, "ls .arch-ids" will show you the id files11:35
sabdflso i can just not put the tagline into a file, and use tla add as usual?11:37
sabdfli'm moving some of the soyuz objects from doap.py to a new soyuz.py11:38
sabdflwhere do i need to register that new file and its classes?11:38
laloif you put the tag you don't need to use tla add anymore - it's already added11:38
lalopersonally I prefer to use separate files (arch calls that "explicit" ids) all the time, but I think that's a matter of taste11:39
lalowhere is doap.py?11:40
sabdfli also prefer the separate id's11:40
sabdfli found configure.zcml11:40
sabdflis there anywhere else?11:40
lalolet me check11:41
lalo*possibly* pages.zcml and sql.zcml - you'd have to check case by case11:43
lalo(I mean class by class)11:43
sabdfland do i need to import this new file (import soyuz) anywhere?11:43
sabdflor does the configure.zcml take care of that?11:43
lalono, zcml takes care of that11:43
sabdflerm, and what's the pqm mailing address?11:53
=== stu1 [~stub@dsl-] has joined #launchpad
=== stub [~stub@dsl-] has joined #launchpad
=== stub [~stub@dsl-] has joined #launchpad
=== stu1 [~stub@dsl-] has joined #launchpad
SteveArun uuidgen to make a new uid01:20
sabdflhey steve01:54
sabdflSteveA: 01:55
sabdflhaving fun now01:55
dafsabdfl: Dwayne has invited me to meet with him in London on Monday01:57
sabdfldaf: cool, come on over01:57
dafwill do :)01:58
sabdfldaf: when are you planning to move your db access classes into lib/canonical/database/rosetta.py?01:58
dafsabdfl: I'll file a bug on that now01:59
sabdfldaf: i'm creating the base file02:00
sabdfli'd like to clean things up a little02:00
sabdflSteveA: when I send mail to arch-pqm it seems to be sending it as "mark@slinky" instead of mark@hbd.com, any idea how to fix that?02:01
dafsabdfl: try adding an entry to /etc/email-addresses02:01
dilysNew bug 2036 for Launchpad/Rosetta: Rosetta database classes should be moved to canonical.database.rosetta02:01
sabdfldaf: what sort of entry?02:02
dafsabdfl: does the file exist already?02:02
dafhmm, maybe Postfix doesn't use it then02:03
sabdflhmm... should I purge and reinstall postfix?02:03
dafI'd ask somebody who knows it better than I do first :)02:03
dafsabdfl: by the way, could you take a look at https://wiki.canonical.com/RosettaAlphaAnnouncement when you have the time?02:04
sabdfldaf: looks good02:12
dafsabdfl: groovy02:13
sabdfli'd like the alpha to be at rosetta.shuttleworthfoundation.org02:13
dafinstead of (rather than as well as) at rosetta.ubuntulinux.org?02:13
sabdflwant to delay the penny dropping at red hat hq02:13
sabdfldaf: we'll open up rosetta.ubuntulinux.org as soon as we actually announce02:14
dafdo I need to change the announcement in any way?02:14
sabdflbut if it leaks, i'd like it to leak in a way that isn't immediately connected to ubuntu02:14
dafI think the only other change we'd need to make is to the DNS02:14
dafoh, and the Apache config would need tweaking02:14
sabdfli'll get thomas onto it02:15
sabdfl(dns), apace will need tweaking by our admins@02:16
=== lalo [~lalo@200-096-111-044.paemt7013.dsl.brasiltelecom.net.br] has joined #launchpad
SteveAdo you have a file called /usr/bin/\[ in ubuntu?02:30
spivSteveA: yes.02:34
spivSteveA: it's part of coreutils, apparently.02:36
spivThere's even a man page for it...02:36
dafisn't it identical to /usr/bin/test02:43
=== lal1 [~lalo@200-203-017-231.paemt7001.dsl.brasiltelecom.net.br] has joined #launchpad
=== lal1 is now known as lalo
sabdflok, how do i setup a new page under the /malone/?03:37
sabdfli guess i need to understand the traversal logic03:39
sabdflwhere is that enshrined?03:39
=== cprov [~cprov@] has joined #launchpad
=== stub [~stub@dsl-] has joined #launchpad
SteveAsabdfl: if you just want a new single page, then use a <page ... > directive.  See malone/pages.zcml04:04
sabdflSteveA: i'm trying to fix /malone/sourcepackage/firefox/04:06
SteveAI can't chat -- being dragged out to do some shopping :-/   May be around a bit later04:08
sabdflok, chat then04:10
sabdflanybody else around to help with traversal?04:11
sabdflwhy do some interfaces just inherit from Interface, others from IAddFormCustomization?04:28
stubsabdfl: Create a file /etc/postfix/canonical containing just a line like 'mylocalusername mark.shuttlework@canonical.com'05:21
stubsabdfl: Then add the line 'canonical_maps = hash:/etc/postfix/canonical' to the end of /etc/postfix/main.cf05:21
sabdflstub: i think it's solved with an /etc/mailname of hbd.com05:22
stubsabdfl: Then run 'postmap /etc/postfix/canonical'05:22
sabdflmethinks we will need to tweak the postfix setup for Hoary to make this easier for users05:22
stubsabdfl: That would work too :-)05:22
sabdflwell, it only works because my local user is the same as my email@hbd.com05:23
stubsabdfl: It would involve another installation question - 'what is your email address?'05:23
sabdfli wonder if .mailrc or .muttrc can be set to override all that anyhow05:23
sabdflglad you're back, i'm doing battle with zope305:24
stubre: IAddFormCustomization - the Z3 form generation machinery requires some hooks to work. That interface defines them05:24
sabdfland sqlobject05:25
stubsabdfl: no idea about .mailrc etc.05:25
sabdflgiven the SourcepackageContainer glass05:25
sabdflhow do i fix the traversal to /sourcepackage/mozilla-firefox/?05:25
sabdfli'll try to do a pqm merge quickly...05:26
sabdflso back to SourcepackageContainer05:27
sabdflcurrently, it seems to __getitem__ on the basis of a package name05:28
sabdflleaving aside the thorny problem of multiple packages with the same name05:28
sabdflthe current select looks like this:05:28
sabdflreturn self.table.select(self.table.q.name == name)[0] 05:29
sabdflwhere self.table = Sourcepackage05:29
sabdflnow, Sourcepackage has no name, just a sourcepackagename05:29
sabdflso it seems what's required is a slightly smarter search05:29
stubThe way I know to do that off the top of my head is to do sourcepackagename = SourcepackageName.select(SourcepackageName.q.name == name)05:30
stubThen return self.table.select(self.table.q.sourcepackagename == sourcepackagename)[0] 05:31
stub(ie. two steps) There might be a more efficient way of doing it in SQLObject, but I'm not familiar with it.05:31
stub(SourcepackageName is defined in canonical.database.doap if it isn't already imported)05:32
sabdflwhat's self.table.q?05:33
sabdfli've moved the Sourcepackage / Binpackage etc objects from doap.py to a new soyuz.py05:33
sabdfland will do the same for rosetta shortly05:34
stubsqlobject magic (or the sqlbuilder bit of it). self.table is a class (subclass of sqlobject). the 'q' stands for query - I don't know the technical reason the syntax needs to be like that. The expression generates a SQL where clause (in this case just 'name = "thesourcepackagename"'). 05:35
stubYou can just stick a raw SQL clause in there if you like, but you have to ensure you currectly quote everything in that case.05:36
stub(so return self.table.select('sourcepackagename in (select id from sourcepackagename where name = %s)' % sqlrepr(name)) might work as a single query version05:37
=== lalo [~lalo@200-102-170-104.paemt7012.dsl.brasiltelecom.net.br] has joined #launchpad
=== lalo [~lalo@200-102-170-104.paemt7012.dsl.brasiltelecom.net.br] has joined #launchpad
=== lalo [~lalo@200-102-170-104.paemt7012.dsl.brasiltelecom.net.br] has joined #launchpad
=== lalo [~lalo@200-102-170-104.paemt7012.dsl.brasiltelecom.net.br] has joined #launchpad
=== lalo [~lalo@200-102-139-234.paemt7011.dsl.brasiltelecom.net.br] has joined #launchpad
=== lalo [~lalo@200-102-139-234.paemt7011.dsl.brasiltelecom.net.br] has joined #launchpad
=== lalo [~lalo@200-102-139-234.paemt7011.dsl.brasiltelecom.net.br] has joined #launchpad
=== stub [~stub@dsl-] has joined #launchpad
sabdflhow do we pass the connection to an SQLObject?08:51
sabdfli'm trying to set up a test harness where i can get quick access to one of our db objects at the python prompt08:51
sabdflhmm... sqlobject 0.6 seems to have many fixes. are we close to merging that?09:02
sabdfland sending our fixes upstream? he's calling for patches09:02
spivsabdfl: https://bugzilla.warthogs.hbd.com/bugzilla/show_bug.cgi?id=202009:04
sabdflspiv: thanks09:05
spivAnd to answer the earlier question, SourcePackage.select('Sourcepackage.sourcepackagename = SourcepackageName.id AND SourcepackageName.name = '%s'" % quote(name))09:05
sabdflspiv: do you know how best to tell an SQLObject what connection to use?09:06
spivIt depends :)09:07
spivFor this case, I think passing it explicitly to as a keyword arg would do.09:07
spiv(i.e. Foo.select(..., connection=your_connection) )09:08
spivOr possibly use SQLBase.initZopeless09:08
sabdflwhere do i find SQLBase?09:09
sabdflah, got it09:10
sabdflnow how do i use it?09:12
spivhttps://wiki.canonical.com/SQLObjectGuide is fairly complete these days.09:13
sabdflfsck, i've spent all evening banging on this, should have checked the wiki first, hey09:14
dafspiv: hmm, perhaps canonical.lp.initZopeless should be documented somewhere also09:18
spivdaf: Oh, right, good idea.  09:19
dafspiv: also, you had some ideas about transactionality for standalone scripts09:19
sabdflmore fun and games09:20
spivdaf: Yeah, they're largely still ideas ;)09:20
sabdflif i import sqlbase and use SQLBase.initZopeless, then try to import another module which also import sqlbase...09:20
sabdflTraceback (most recent call last):09:20
sabdfl  File "harness.py", line 26, in ?09:20
sabdfl    from soyuz import *09:20
sabdfl  File "/home/mark/projects/ubuntu/code/launchpad/lib/canonical/database/soyuz.py", line 27, in ?09:20
sabdfl    from canonical.database.sqlbase import SQLBase, quote09:20
sabdfl  File "/home/mark/projects/ubuntu/code/launchpad/lib/canonical/database/sqlbase.py", line 7, in ?09:20
sabdfl    class SQLBase(SQLOS):09:20
sabdfl  File "/home/mark/projects/ubuntu/code/launchpad/lib/sqlobject/main.py", line 179, in __new__09:20
sabdfl    classregistry.registry(newClass._registry).addClass(newClass)09:20
sabdfl  File "/home/mark/projects/ubuntu/code/launchpad/lib/sqlobject/classregistry.py", line 69, in addClass09:20
sabdfl    raise ValueError("class %s is already in the registry"09:20
sabdflValueError: class SQLBase is already in the registry09:20
spivsabdfl: !09:21
dafhaven't seen that before09:21
sabdflso tell me about canonical.lp.initZopeless?09:21
spivsabdfl: Somehow SQLObject thinks there's two classes with the name SQLBase, which is odd.09:21
dafsabdfl: that's a wrapper around SQLBase.initZopeless, which calls it with the host and dbname from canonical.lp09:21
dafsabdfl: to avoid us duplicating DB names in the code09:22
spiv(which defaults to launchpad_test)09:22
daf(and localhost)09:22
spivsabdfl: Where's harness.py?09:23
sabdflso i can just import canonical.lp and then run canonical.lp.initZopeless()?09:23
spivIn canonical.database?  Ah, I see the problem, I think.09:23
sabdflspiv: it's what i'm writing, it will setup a connection and have the objects ready then end09:23
sabdflso you can do python -i harness.py09:23
spivChange line 26 of harness.py to "from canonical.database.soyuz import *"09:23
sabdflthen immediately canonical.database.doap.Project.get(1)09:24
spivRelative imports are bad :)09:24
sabdflok, so everything has to be "canonical.*"?09:24
spivYep, otherwise you can get situations where Python thinks 'sqlbase' and 'canonical.database.sqlbase' are two entirely differnt modules.09:25
sabdflwhat's the correct python path setup?09:25
sabdflah, as we saw09:25
spivWhich seems to be what just bit you.09:25
spivFrom the root of launchpad, PYTHONPATH=lib is what you want.09:26
sabdflok, it seems to be working, but i'll let someone else figure out the path stuff. phew, thanks09:28
sabdflbtw, i have a feeling that the 0.6 release fixes some of the problems with fields that end in "id"09:31
sabdflman, sqlobject does weird things to you09:31
sabdflsourcepackageName becomes sourcepackage_name arbitrarily09:31
sabdfli see now there's method behind the madness, but it remains madness09:31
spivThat'd be nice.. and someone added a patch to sourceforge today to improve selectBy and foreign keys, so you can pass SQLOjbects, not just ids.  The implementation looks a bit dodgy, but hopefully it'll get fixed up and included.09:32
spivYeah, I don't like the default naming "style" much, and it's not completely overrideable.09:33
spivI just always explictly set dbName and so on everywhere to avoid that.09:33
=== lalo [~lalo@200-102-139-234.paemt7011.dsl.brasiltelecom.net.br] has joined #launchpad
=== lalo [~lalo@200-102-139-234.paemt7011.dsl.brasiltelecom.net.br] has joined #launchpad
sabdflany idea why vim keeps dropping to the next line when my line gets too long?09:52
spivWhat does ":set tw?" report?  Perhaps try ":set tw=0", if I'm understanding what you mean?09:55
spiv(although if you're editing python, 80 columns is what our style guide says)09:56
spiv(er, I mean 78 :)09:56
sabdflspiv: my tw=7610:13
sabdfldoes that normally jump down a line when you are making a long one?10:14
sabdflbecause the resulting code then does not parse in Python10:14
sabdfleven if it looks neater10:14
sabdfldaf: could you answer a traversal question for me?10:14
dafI'll try :)10:16
dafsabdfl: if you're having trouble with long lines, you have to either use () or \ to tell Python that a logical line is extended over more than one physical line10:17
spive.g. x = (foo, foo,10:19
sabdfldaf: so i need to let vim split the line, then put in a \?10:19
spiv         foo)10:19
spivPython's happy with that.10:19
dafsabdfl: I prefer to put () rather than \10:19
sabdfli haven't seen () used like that10:19
dafsabdfl: Python effectively ignores newlines inside parentheses10:19
sabdfloh, that's sweetly inconsistent :-)10:20
spivI'm having trouble of thinking of when I have written long lines that don't involve parens...10:20
sabdflso here's the traversal question10:20
sabdflhold on, there it isn't10:20
sabdflhmmm... death by traceback :-)10:25
dilysNew bug 2037 for Launchpad/Rosetta: main search form should search products as well as projects10:29
sabdflwhoop! managed to lose those tracebacks10:41
=== justdave [~dave@] has joined #launchpad

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!