On Fri, 15 Jan 2010 21:15:14 +0100 Loïc Minier wrote: [...] > On Fri, Jan 15, 2010, Francesco Poli (t1000) wrote: > > Would it be possible to add a new environment variable to identify the > > debianized source directory? > > > > I think that adding the following simple line in pdebuild-internal just > > before export HOME=$(readlink -f $(pwd)/../) > > would suffice: > > > > export DEBSOURCEDIR=$(readlink -f $(pwd)) > > > > maybe with a comment that explains that this is useful for > > hook scripts. > > > > I think this would be harmless and very useful for many hook > > scripts written by users in the future. > > Please add this line as soon as possible, if you agree. > > Sure; that seems fine; not sure about the actual name, but that would > work.
Thank you very much for your quick and positive response! :-)
I hope it can be done soon.
>
> The other hooks around do things like:
> cd /tmp/buildd/*/debian/..
Take into account that we are talking about pdebuild-internal, hence
the debianized source directory will be something like
/home/myuser/mypath/to/debpackages/mydebpackage/mydebpackage-x.y.z-r
Or am I misunderstanding something?
Maybe something like
cd ${HOME}/*/debian/..
could help in my case.
>
> Which is probably a good workaround for your hooks for now.
I was indeed planning to use a workaround like the one described above,
but it has a flaw: it breaks if I keep more than one debianized
source directory inside the same parent directory, as in
..
└── bigproject
├── first_package
│ └── debian
├── second_package
│ └── debian
└── third_package
└── debian
where the workaround will always drop me into the first directory of
the file globbing expansion (the other non-optional arguments are
ignored by the cd command).
Rationale for this directory structure: two or more source packages may
be related, e.g. a program and some libraries used by the program
P.S.: the hook scripts I was talking about are the ones mentioned in
my .signature ...
--
http://www.inventati.org/frx/progs/scripts/pdebuild-hooks.html
Need some pdebuild hook scripts?
..................................................... Francesco Poli .
GnuPG key fpr == C979 F34B 27CE 5CD8 DC12 31B5 78F4 279B DD6D FCF4
pgpZcb4vPmTO6.pgp
Description: PGP signature

