=== kiko is now known as kiko-afk | ||
=== kiko-afk is now known as kiko | ||
=== stub [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
=== stub [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
=== lalo [~lalo@200.96.126.118] 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 | ||
sabdfl | how do i use the arch-tag line at the top of a file? | 11:09 |
---|---|---|
=== stu1 [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
lalo | sabdfl: first you have to obtain an unique id from arch, and I don't know how to do that | 11:25 |
sabdfl | what's the line used for? | 11:25 |
lalo | arch doesn't use the filenames to "index" its metadata; it use an unique id for each file | 11:27 |
lalo | so that it can track renames and moves | 11:27 |
sabdfl | that much i understood, so i am curious what the tag inside the file is used for | 11:34 |
lalo | ah | 11:34 |
lalo | there 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 file | 11:35 |
=== stub [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
lalo | if you're in a source tree, "ls .arch-ids" will show you the id files | 11:35 |
sabdfl | so i can just not put the tagline into a file, and use tla add as usual? | 11:37 |
sabdfl | i'm moving some of the soyuz objects from doap.py to a new soyuz.py | 11:38 |
sabdfl | where do i need to register that new file and its classes? | 11:38 |
lalo | if you put the tag you don't need to use tla add anymore - it's already added | 11:38 |
lalo | personally I prefer to use separate files (arch calls that "explicit" ids) all the time, but I think that's a matter of taste | 11:39 |
lalo | where is doap.py? | 11:40 |
sabdfl | i also prefer the separate id's | 11:40 |
sabdfl | lib/canonical/database | 11:40 |
sabdfl | i found configure.zcml | 11:40 |
sabdfl | is there anywhere else? | 11:40 |
lalo | let me check | 11:41 |
lalo | *possibly* pages.zcml and sql.zcml - you'd have to check case by case | 11:43 |
lalo | (I mean class by class) | 11:43 |
sabdfl | and do i need to import this new file (import soyuz) anywhere? | 11:43 |
sabdfl | or does the configure.zcml take care of that? | 11:43 |
lalo | no, zcml takes care of that | 11:43 |
sabdfl | erm, and what's the pqm mailing address? | 11:53 |
sabdfl | pqm@chinstrap? | 11:53 |
lalo | pqm@chinstrap.warthogs.hbd.com | 11:53 |
lalo | yes | 11:53 |
=== stu1 [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
=== stub [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
=== stub [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
=== stu1 [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
SteveA | run uuidgen to make a new uid | 01:20 |
sabdfl | hey steve | 01:54 |
sabdfl | SteveA: | 01:55 |
sabdfl | having fun now | 01:55 |
daf | sabdfl: Dwayne has invited me to meet with him in London on Monday | 01:57 |
sabdfl | daf: cool, come on over | 01:57 |
daf | will do :) | 01:58 |
sabdfl | daf: when are you planning to move your db access classes into lib/canonical/database/rosetta.py? | 01:58 |
daf | sabdfl: I'll file a bug on that now | 01:59 |
sabdfl | daf: i'm creating the base file | 02:00 |
sabdfl | i'd like to clean things up a little | 02:00 |
sabdfl | SteveA: 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 |
daf | sabdfl: try adding an entry to /etc/email-addresses | 02:01 |
dilys | New bug 2036 for Launchpad/Rosetta: Rosetta database classes should be moved to canonical.database.rosetta | 02:01 |
sabdfl | daf: what sort of entry? | 02:02 |
daf | sabdfl: does the file exist already? | 02:02 |
sabdfl | nope | 02:02 |
daf | hmm, maybe Postfix doesn't use it then | 02:03 |
sabdfl | hmm... should I purge and reinstall postfix? | 02:03 |
daf | I'd ask somebody who knows it better than I do first :) | 02:03 |
daf | sabdfl: by the way, could you take a look at https://wiki.canonical.com/RosettaAlphaAnnouncement when you have the time? | 02:04 |
sabdfl | daf: looks good | 02:12 |
daf | sabdfl: groovy | 02:13 |
sabdfl | i'd like the alpha to be at rosetta.shuttleworthfoundation.org | 02:13 |
daf | instead of (rather than as well as) at rosetta.ubuntulinux.org? | 02:13 |
sabdfl | want to delay the penny dropping at red hat hq | 02:13 |
daf | right | 02:13 |
sabdfl | daf: we'll open up rosetta.ubuntulinux.org as soon as we actually announce | 02:14 |
daf | right | 02:14 |
daf | do I need to change the announcement in any way? | 02:14 |
sabdfl | but if it leaks, i'd like it to leak in a way that isn't immediately connected to ubuntu | 02:14 |
daf | I think the only other change we'd need to make is to the DNS | 02:14 |
daf | oh, and the Apache config would need tweaking | 02:14 |
sabdfl | i'll get thomas onto it | 02: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 | ||
daf | right | 02:17 |
SteveA | do you have a file called /usr/bin/\[ in ubuntu? | 02:30 |
spiv | SteveA: yes. | 02:34 |
spiv | SteveA: it's part of coreutils, apparently. | 02:36 |
spiv | There's even a man page for it... | 02:36 |
daf | isn't it identical to /usr/bin/test | 02:43 |
daf | ? | 02:43 |
=== lal1 [~lalo@200-203-017-231.paemt7001.dsl.brasiltelecom.net.br] has joined #launchpad | ||
=== lal1 is now known as lalo | ||
sabdfl | ok, how do i setup a new page under the /malone/? | 03:37 |
sabdfl | i guess i need to understand the traversal logic | 03:39 |
sabdfl | where is that enshrined? | 03:39 |
=== cprov [~cprov@200.158.100.251] has joined #launchpad | ||
=== stub [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
SteveA | sabdfl: if you just want a new single page, then use a <page ... > directive. See malone/pages.zcml | 04:04 |
sabdfl | SteveA: i'm trying to fix /malone/sourcepackage/firefox/ | 04:06 |
SteveA | I can't chat -- being dragged out to do some shopping :-/ May be around a bit later | 04:08 |
sabdfl | ok, chat then | 04:10 |
sabdfl | anybody else around to help with traversal? | 04:11 |
sabdfl | why do some interfaces just inherit from Interface, others from IAddFormCustomization? | 04:28 |
sabdfl | - | 04:45 |
sabdfl | - | 04:45 |
stub | sabdfl: Create a file /etc/postfix/canonical containing just a line like 'mylocalusername mark.shuttlework@canonical.com' | 05:21 |
stub | sabdfl: Then add the line 'canonical_maps = hash:/etc/postfix/canonical' to the end of /etc/postfix/main.cf | 05:21 |
sabdfl | stub: i think it's solved with an /etc/mailname of hbd.com | 05:22 |
stub | sabdfl: Then run 'postmap /etc/postfix/canonical' | 05:22 |
sabdfl | methinks we will need to tweak the postfix setup for Hoary to make this easier for users | 05:22 |
stub | sabdfl: That would work too :-) | 05:22 |
sabdfl | well, it only works because my local user is the same as my email@hbd.com | 05:23 |
stub | sabdfl: It would involve another installation question - 'what is your email address?' | 05:23 |
sabdfl | i wonder if .mailrc or .muttrc can be set to override all that anyhow | 05:23 |
sabdfl | glad you're back, i'm doing battle with zope3 | 05:24 |
stub | re: IAddFormCustomization - the Z3 form generation machinery requires some hooks to work. That interface defines them | 05:24 |
sabdfl | and sqlobject | 05:25 |
stub | sabdfl: no idea about .mailrc etc. | 05:25 |
sabdfl | given the SourcepackageContainer glass | 05:25 |
sabdfl | how do i fix the traversal to /sourcepackage/mozilla-firefox/? | 05:25 |
sabdfl | i'll try to do a pqm merge quickly... | 05:26 |
sabdfl | so back to SourcepackageContainer | 05:27 |
sabdfl | currently, it seems to __getitem__ on the basis of a package name | 05:28 |
sabdfl | leaving aside the thorny problem of multiple packages with the same name | 05:28 |
sabdfl | the current select looks like this: | 05:28 |
sabdfl | return self.table.select(self.table.q.name == name)[0] | 05:29 |
sabdfl | where self.table = Sourcepackage | 05:29 |
sabdfl | now, Sourcepackage has no name, just a sourcepackagename | 05:29 |
sabdfl | so it seems what's required is a slightly smarter search | 05:29 |
stub | The way I know to do that off the top of my head is to do sourcepackagename = SourcepackageName.select(SourcepackageName.q.name == name) | 05:30 |
stub | Then 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 |
sabdfl | what's self.table.q? | 05:33 |
sabdfl | i've moved the Sourcepackage / Binpackage etc objects from doap.py to a new soyuz.py | 05:33 |
sabdfl | and will do the same for rosetta shortly | 05:34 |
stub | sqlobject 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 |
stub | You 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 version | 05: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-246.248.240.220.dsl.comindico.com.au] has joined #launchpad | ||
sabdfl | how do we pass the connection to an SQLObject? | 08:51 |
sabdfl | i'm trying to set up a test harness where i can get quick access to one of our db objects at the python prompt | 08:51 |
sabdfl | hmm... sqlobject 0.6 seems to have many fixes. are we close to merging that? | 09:02 |
sabdfl | and sending our fixes upstream? he's calling for patches | 09:02 |
spiv | sabdfl: https://bugzilla.warthogs.hbd.com/bugzilla/show_bug.cgi?id=2020 | 09:04 |
sabdfl | spiv: thanks | 09:05 |
spiv | And to answer the earlier question, SourcePackage.select('Sourcepackage.sourcepackagename = SourcepackageName.id AND SourcepackageName.name = '%s'" % quote(name)) | 09:05 |
sabdfl | spiv: do you know how best to tell an SQLObject what connection to use? | 09:06 |
spiv | It depends :) | 09:07 |
spiv | For 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 |
spiv | Or possibly use SQLBase.initZopeless | 09:08 |
sabdfl | where do i find SQLBase? | 09:09 |
sabdfl | ah, got it | 09:10 |
sabdfl | now how do i use it? | 09:12 |
spiv | SQLBase.initZopeless(connectionForURI('postgres:///exampledb')) | 09:13 |
spiv | https://wiki.canonical.com/SQLObjectGuide is fairly complete these days. | 09:13 |
sabdfl | fsck, i've spent all evening banging on this, should have checked the wiki first, hey | 09:14 |
daf | spiv: hmm, perhaps canonical.lp.initZopeless should be documented somewhere also | 09:18 |
spiv | daf: Oh, right, good idea. | 09:19 |
daf | spiv: also, you had some ideas about transactionality for standalone scripts | 09:19 |
sabdfl | more fun and games | 09:20 |
spiv | daf: Yeah, they're largely still ideas ;) | 09:20 |
sabdfl | if i import sqlbase and use SQLBase.initZopeless, then try to import another module which also import sqlbase... | 09:20 |
sabdfl | Traceback (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, quote | 09: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 addClass | 09:20 |
sabdfl | raise ValueError("class %s is already in the registry" | 09:20 |
sabdfl | ValueError: class SQLBase is already in the registry | 09:20 |
spiv | sabdfl: ! | 09:21 |
daf | ewww | 09:21 |
daf | haven't seen that before | 09:21 |
sabdfl | so tell me about canonical.lp.initZopeless? | 09:21 |
spiv | sabdfl: Somehow SQLObject thinks there's two classes with the name SQLBase, which is odd. | 09:21 |
daf | sabdfl: that's a wrapper around SQLBase.initZopeless, which calls it with the host and dbname from canonical.lp | 09:21 |
daf | sabdfl: to avoid us duplicating DB names in the code | 09:22 |
spiv | (which defaults to launchpad_test) | 09:22 |
daf | (and localhost) | 09:22 |
spiv | sabdfl: Where's harness.py? | 09:23 |
sabdfl | so i can just import canonical.lp and then run canonical.lp.initZopeless()? | 09:23 |
daf | exactly | 09:23 |
spiv | In canonical.database? Ah, I see the problem, I think. | 09:23 |
sabdfl | spiv: it's what i'm writing, it will setup a connection and have the objects ready then end | 09:23 |
sabdfl | so you can do python -i harness.py | 09:23 |
spiv | Change line 26 of harness.py to "from canonical.database.soyuz import *" | 09:23 |
sabdfl | then immediately canonical.database.doap.Project.get(1) | 09:24 |
spiv | Relative imports are bad :) | 09:24 |
sabdfl | ok, so everything has to be "canonical.*"? | 09:24 |
spiv | Yep, otherwise you can get situations where Python thinks 'sqlbase' and 'canonical.database.sqlbase' are two entirely differnt modules. | 09:25 |
sabdfl | what's the correct python path setup? | 09:25 |
sabdfl | ah, as we saw | 09:25 |
spiv | Which seems to be what just bit you. | 09:25 |
spiv | From the root of launchpad, PYTHONPATH=lib is what you want. | 09:26 |
sabdfl | ok, it seems to be working, but i'll let someone else figure out the path stuff. phew, thanks | 09:28 |
sabdfl | btw, i have a feeling that the 0.6 release fixes some of the problems with fields that end in "id" | 09:31 |
sabdfl | man, sqlobject does weird things to you | 09:31 |
sabdfl | sourcepackageName becomes sourcepackage_name arbitrarily | 09:31 |
sabdfl | i see now there's method behind the madness, but it remains madness | 09:31 |
spiv | That'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 |
spiv | Yeah, I don't like the default naming "style" much, and it's not completely overrideable. | 09:33 |
spiv | I 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 | ||
sabdfl | any idea why vim keeps dropping to the next line when my line gets too long? | 09:52 |
spiv | What 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 |
sabdfl | spiv: my tw=76 | 10:13 |
sabdfl | does that normally jump down a line when you are making a long one? | 10:14 |
sabdfl | because the resulting code then does not parse in Python | 10:14 |
sabdfl | even if it looks neater | 10:14 |
sabdfl | daf: could you answer a traversal question for me? | 10:14 |
daf | I'll try :) | 10:16 |
daf | sabdfl: 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 line | 10:17 |
spiv | e.g. x = (foo, foo, | 10:19 |
sabdfl | daf: so i need to let vim split the line, then put in a \? | 10:19 |
spiv | foo) | 10:19 |
spiv | Python's happy with that. | 10:19 |
daf | sabdfl: I prefer to put () rather than \ | 10:19 |
sabdfl | i haven't seen () used like that | 10:19 |
daf | sabdfl: Python effectively ignores newlines inside parentheses | 10:19 |
sabdfl | oh, that's sweetly inconsistent :-) | 10:20 |
spiv | I'm having trouble of thinking of when I have written long lines that don't involve parens... | 10:20 |
sabdfl | so here's the traversal question | 10:20 |
sabdfl | hold on, there it isn't | 10:20 |
sabdfl | hmmm... death by traceback :-) | 10:25 |
dilys | New bug 2037 for Launchpad/Rosetta: main search form should search products as well as projects | 10:29 |
sabdfl | whoop! managed to lose those tracebacks | 10:41 |
=== justdave [~dave@24.247.63.44.gha.mi.chartermi.net] has joined #launchpad |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!