Ticket #9: createrepotest

File createrepotest, 0.6 kB (added by msquared, 8 years ago)

Minimalist script file that shows how to generate the malformed XML file

Line 
1 #!/bin/bash
2
3 REPODIR=testrepo
4
5 # remove primary.xml from last run
6 rm -f primary.xml
7
8 # clear out repo
9 rm -rf "$REPODIR"
10 mkdir "$REPODIR"
11 mkdir "$REPODIR/repodata"
12
13 # fetch upstream problematic package
14 wget http://mirror.optus.net/fedora/linux/releases/13/Everything/i386/os/Packages/device-mapper-event-devel-1.02.44-1.fc13.i686.rpm -O "$REPODIR/device-mapper-event-devel-1.02.44-1.fc13.i686.rpm"
15
16 # build local repo metadata
17 createrepo -s sha `pwd`/"$REPODIR"
18
19 # grab a copy of the resulting primary.xml.gz file, and gunzip it
20 gunzip <"$REPODIR/repodata/primary.xml.gz" >primary.xml
21