Re: AMD64: etch and uploads
Kurt Roeckx <firstname.lastname@example.org> writes:
> On Tue, Apr 18, 2006 at 12:17:54PM -0400, Stefano Zacchiroli wrote:
>> On Wed, Apr 19, 2006 at 12:41:50AM +1000, Anthony Towns wrote:
>> > Developers with amd64 machines are also now able to upload new versions
>> > of their package built locally (rather than in an i386 chroot) -- but
>> > in order to ensure dependencies are calculated correctly, please make
>> > sure you're building using Debian unstable and not packages from Ubuntu
>> > or the unofficial debian-amd64 archive; using pbuilder or debootstrap
>> > to create a chroot build environment might be helpful in this case.
>> In order to fulfill this requirement, is there a best practice / any
>> possible way to "convert" an amd64 box which has been installed from
>> debian-amd64 to an official debian amd64 box?
> I use the following:
> apt-get clean
> apt-get --reinstall install -d `dpkg --get-selections |grep -v deinstall | sed -e 's/\t.*//' `
> cd /var/cache/apt/archives
> dpkg -i *.deb
> You can't do it without the -d, apt-get seems to have a problem
> with depedency loops.
> Note that it might complain about packages it can't (re)install,
> in my case those were all packages that have been replaced. You
> should remove those.
I'm assuming you want this for your normal system and not for a build
chroot. Always build packages for upload in a clean environment one
last time before upload.
So here we go, way 2 (from memory):
# Mark all old packages
mv /var/lib/dpkg/status /var/lib/dpkg/status~
sed 's/Status:/Unofficial: yes\nStatus:/' </var/lib/dpkg/status~ >/var/lib/dpkg/status
dpkg --get-selections |grep -v deinstall | sed -e 's/\t.*//' \
| xargs -n1 apt-get --reinstall install
# check output for obsolete or missing packages
# optimaly there should be none
grep-dctrl -P Unofficial yes -s Package,Version /var/lib/dpkg/status