Re: libgtk2.0-0 conflicts with libgdkxft0?
On Thu, Jun 05, 2003 at 06:10:03PM +0200, Tim Dijkstra wrote:
> On Thu, 5 Jun 2003 16:24:56 +0100 Tom Badran wrote:
> > On Thursday 05 Jun 2003 3:17 pm, Matthias Urlichs wrote:
> > > Sure there is. Download the source, remove the Conflicts: line, and
> > > build it yourself. ;-)
> >
> > Hmm... I don't fancy rebuilding the whole of gtk2 (that has the
> > conflict, not libgdkxft).
>
> Well it's probably easier to unpack the deb with ar (ar -xf <debname>),
> then unpack the control part of the deb (tar -xzf control.tar.gz), edit
> the control file to delete conflict, repack and add the new control
> section to the deb (ar -r <debname> control.tar.gz). And then of course
> install...
Hmmm, bump the version and maybe change the filename as well to be on the
safe side.
> Haven't tried it, but should work.
Yes it works. I've done something similar recently to do a massive
reversion on rebuilt packages (forgot to do that before building :).
Attached is a script to automate this task.
regards,
guillem
#!/bin/bash
#
# debrebuild-reversion
#
# $Id: debrebuild-reversion,v 1.1.1.1 2003/06/06 03:06:12 guillem Exp $
#
# Change binary package version to a recompilation-only NMU.
#
# Copyright (C) 2003 Guillem Jover <guillem@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
workdir=~/build
resultdir=$workdir/result
ronmudir=$workdir/ro-nmu
stagedir=$workdir/stage
controldir=$stagedir/control
reversion()
{
local version=$1
local upstream=$(echo $version | sed -e 's/-[^-]*$//')
local debrev=$(echo $version | sed -ne 's/.*-\([^-]*\)$/\1/p')
OLDIFS=$IFS
IFS="."
set -- $debrev
IFS=$OLDIFS
if [ "$2" = "potato" -o "$2" = "woody" -o "$2" = "sarge" ]
then
local backport="$1.$2."
IFS="."
set -- $3
IFS=$OLDIFS
fi
d1=${1:-0}
d2=${2:-0}
d3=$(($3 + 1))
echo "$upstream-$backport$d1.$d2.$d3"
}
reversion_file()
{
local deb=$1
local OLDIFS=$IFS
IFS="_"
set -- $deb
IFS=$OLDIFS
local new_version=$(reversion $2)
mv $deb $ronmudir/${1}_${new_version}_$3
}
reversion_control()
{
local version=$(sed -ne 's/^Version: //p' control)
new_version=$(reversion $version)
sed -e "s/^Version: $version/Version: $new_version/" < control > control.new
mv -f control.new control
}
reversion_package ()
{
local deb=$1
local package=$(basename $deb)
if [ ! -e $deb ]
then
echo " -> error: no file found [$deb]"
return 1
fi
mkdir -p $controldir
echo " -> reversioning [$package]"
cd $stagedir
cp $deb .
ar x $package control.tar.gz
cd $controldir
tar xzf ../control.tar.gz
reversion_control
tar czf ../control.tar.gz *
cd $stagedir
ar r $package control.tar.gz
reversion_file $package
rm -rf $stagedir/*
}
# Main
export LC_ALL=C
echo "Creating recompilation-only NMU dir"
mkdir -p $ronmudir
echo "Cleaning staging area"
rm -rf $stagedir/*
echo "Reversioning to a recompilation-only NMU"
ls $resultdir/*.deb | while read package
do
reversion_package $package
done
exit 0
Reply to: