Re: Rebuilding package reverse build-dependencies

2017-03-13 Thread Eugene Zhukov
On Thu, Feb 9, 2017 at 3:48 PM, Adam Borowski  wrote:
> On Thu, Feb 09, 2017 at 03:24:48PM +0200, Eugene Zhukov wrote:
>> I have a package (saxonhe) whose newer versions are not backwards
>> compatible and break other packages (build)depending on it e.g.
>> epubcheck. I guess this is a common problem which sometimes happens
>> with some packages.
>> Is there a way to rebuild all ${package} reverse build-dependencies in
>> one go in a more-or-less clean environment (chroot/container/vm)?
>
> "ratt" is supposed to do this.
>
> I haven't personally used it yet -- if you prefer dirty hacks instead, my
> way consists of the following scripts:
>

Thanks for the hints, Adam and Holger.
I came up with my own way, if anyone is interested it's here:
https://github.com/ezhukov/testvm

Thanks,
Eugene



Re: Rebuilding package reverse build-dependencies

2017-02-09 Thread Adam Borowski
On Thu, Feb 09, 2017 at 03:24:48PM +0200, Eugene Zhukov wrote:
> I have a package (saxonhe) whose newer versions are not backwards
> compatible and break other packages (build)depending on it e.g.
> epubcheck. I guess this is a common problem which sometimes happens
> with some packages.
> Is there a way to rebuild all ${package} reverse build-dependencies in
> one go in a more-or-less clean environment (chroot/container/vm)?

"ratt" is supposed to do this.

I haven't personally used it yet -- if you prefer dirty hacks instead, my
way consists of the following scripts:

.--[ ~/bin/binaries-for-source ]
#!/bin/bash

for x in "$@"
  do
grep-dctrl -r -S "^${x/\./\\.}$" -s Package 
/var/lib/apt/lists/*_dists_unstable_*_binary-amd64_Packages|cut -d' ' -f 2
  done
`
.--[ ~/bin/rdeps-for-source ]
#!/bin/bash

parallel build-rdeps -- `~/bin/binaries-for-source "$@"`|
grep -v '^Reverse Build-depends'|
grep -v -- '^'|
grep -v '^Found '|
grep -v '^No reverse build-depends found'|
grep -v '^$'|
sort|
uniq
`
If you have "dose-extra" installed, the above will include complex chains
like Build-Depends->Depends->Depends, at the cost of taking two ages and
three forevers.  That's why you want "parallel" (package moreutils) -- those
two ages and three forevers won't run consecutively for a multi-binary
package.


To use this, you run:
parallel sbuild -- `rdeps-for-source foo`
(remember to decrease DEB_BUILT_OPTIONS=parallel=X if you have it -- it's a
lot faster to run X 1-threaded builds as they have a lot of
non-parallelizable parts)

Then post-process the results with:
.--[ ~/bin/sortst ]
#!/bin/bash
set -e

mkdir -p logs/{successful,skipped,attempted,failed,given-back}
mv *.build logs/ ||:
cd logs
for x in `ls *.build|sort|tac` # do symlinks before actual logs
  do
ST="$(grep -a '^Status: 
\(successful\|skipped\|attempted\|failed\|given-back\)$' "$x"|cut -d' ' -f2)"
if [ -z "$ST" ]
  then
echo "$x has no valid status"
  else
mv "$x" "$ST/"
fi
  done
`
(safe to use when the rebuild is still going)


Meow!
-- 
Autotools hint: to do a zx-spectrum build on a pdp11 host, type:
  ./configure --host=zx-spectrum --build=pdp11



Re: Rebuilding package reverse build-dependencies

2017-02-09 Thread Holger Levsen
On Thu, Feb 09, 2017 at 03:24:48PM +0200, Eugene Zhukov wrote:
> Is there a way to rebuild all ${package} reverse build-dependencies in
> one go in a more-or-less clean environment (chroot/container/vm)?

tracker.debian.org/ratt - rebuild all the things!


-- 
cheers,
Holger


signature.asc
Description: Digital signature