On Tue, Jun 30, 2015 at 02:19:22PM +0200, Stephan Sürken wrote:
> On Sa, 2015-06-27 at 23:23 +0200, Marc Haber wrote:
> > If that is correct: Is it possible to pull in the old repository via
> > reprepro's Mirroring / Updating mechanism (see
> > /usr/share/doc/reprepro/manual.html) or would you recommend adapting
> > import-08x to import-09x iterating through all source and binary
> > packages to manually poke them into the new reprepro structure?
> 
> Ftr, as a general notion, mini-buildd is slave to the reprepro database;
> it does not store any package information by itself (albeit some last
> builds/last packages data that is used for informational purposes only).
> 
> So basically, any manual *package* manipulation using reprepro should be
> no (technical) problem at all, giving you some options.

My ugly script:
#!/bin/bash

set -e

[ "$(id -u)" -ne 107 ] && exit 1

DIST_OLD="$1"
DIST_NEW="$2"
BASE_OLD="/media/tempdisk/mini-buildd/rep"
BASE_NEW="/var/lib/mini-buildd/repositories/zg"

cd $BASE_NEW

for packagesfile in $BASE_OLD/dists/$DIST_OLD/main/*/Packages; do
  echo "process packages from $packagesfile"
  < $packagesfile sed -n "/^Filename:[[:space:]]/{s||$BASE_OLD/|;p;}" | \
  xargs --no-run-if-empty --max-args=1 --verbose reprepro --basedir $BASE_NEW 
includedeb $DIST_NEW
done

for sourcesgzfile in $BASE_OLD/dists/$DIST_OLD/main/source/Sources.gz; do
  echo "process sources form $sourcesgzfile"
  < $sourcesgzfile gunzip | \
  grep -E '^($|Package:|Directory:|Version:)' | \
  awk '{print BASE_OLD "/" $6 "/" $2 "_" $4 ".dsc"}' FS="(\n|: )" RS="\n\n" 
BASE_OLD="$BASE_OLD" | \
  xargs --no-run-if-empty --max-args=1 --verbose reprepro --basedir $BASE_NEW 
includedsc $DIST_NEW
done

> Maybe some remarks to the import-08x script: As 0.8.x (i.e.,
> mini-dinstall) allowed multiple versions per distribution it iterates
> over them, and also sorts them by version to get the rollback dists
> right. In your situation you might simplify your import procedure by
> just discarding the rollback distributions (chances are, btw, that your
> 0.9 repo does not have rollback dists at all).

It doesn't. That concept isn't explained in the docs btw, it should,
since it's not part of a naive reprepro setup.

> I have never used the "Mirroring / Updating" feature of reprepro myself;
> form the manual however I assume this requires changing the reprepro
> config of mini-buildd manually, so I would rather not recommend this.
> 
> Otoh, if you know that feature very well

I didn't know it at all, just figured out that it might be helpful. I
didn't get it to work immediately and wrote my own "solution".

> uff, hope this helps at all ;).

It does. Thanks.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to