* luned� 11 aprile 2005, alle 15:13, Junichi Uekawa scrive:
> > PKGNAMES=$(ls -1 /tmp/buildd/*.deb | sed 's/.\+\/\([^_]\+\)_.*$/\1/')
> > 
> > (kudos to Enrico Zini, that's skilled then me, on cryptical sed regexp)
> 
> Thanks for spotting it.
> 
> I'd like the following fix; since it looks too cryptic; how does it sound ?
> 
> -PKGNAMES=$(ls -1 /tmp/buildd/*.deb | sed 's/_.*$//' )
> +PKGNAMES=$(cd /tmp/buildd && ls -1 /tmp/buildd/*.deb | sed 's/_.*$//' )

Seems ok to me.
I tried to respect original idea, and that regexp catch just the name of
the package. If you're familiar with perl, is equal to:

/.+([^_]+)_*$/$1/

$1 is backreference to ([^_]+) that catch the package name. In sed, is
\1.

Of course, as you stated in next mail, you're solution is more readable,
and probably preferred.


> > Plus, i suggest that could be useful inform user that is useful add 
> > BINDMOUNTS="/tmp"
> > 
> > in .pbuilderrc (i don't like hack around /etc/* if it isn't necessary).
> > 
> > With this var, i do:
> > 
> > pbuilder update (that create /tmp/buildd, if it isn't)
> > (cd into package source)
> > pdebuild (that create all the stuff in /tmp/buildd)
> > pbuilder execute B91dpkg-i (that test all the *.deb in /tmp/buildd)
> 
> That is not a good idea;
> /tmp/buildd is a directory created and controlled by pbuilder 
> when pbuilder build is ran.

I'm not really sure of this. Without that binding, all the .deb going to
/var/cache/pbuilder/result, that are unusable inside the chroot. Also
copying just the deb inside /tmp/buildd (creating before, of course)
doesn't produce any result, because, still outside the chroot
environment.

Maybe i'm confused with this, but i didn't find a way more comfortable
to this to use that script with package created.

I use pbuilder to create a sarge environment on my machine (that is
sid).

Of course, this part is just a suggest.

-- 
                          Maurizio - Tannoiser - Lemmo
                 Founder Member of ERLUG http://erlug.linux.it
-------------------------------------------------------------------------------
Ford: "What happened?"
Spike: "We're stuck in a basement."
Ford: "Buffy?"
Spike: "She's not stuck in a basement."
        --Buffy the Vampire Slayer: Lie To Me

Reply via email to