summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-01-03 20:35:42 +0100
committerHolger Levsen <holger@layer-acht.org>2015-01-03 20:35:42 +0100
commitd03e2d8d608fb348535fac677c24b04f0f46af50 (patch)
tree2cc2365a9de129f9e0124573f96c5b7a1920146b /bin
parent27b7c63067819886104baa0ad80da6ab8b007757 (diff)
downloadjenkins.debian.net-d03e2d8d608fb348535fac677c24b04f0f46af50.tar.xz
reproducible: refactor
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_create_meta_pkg_sets.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh
index d060163f..cb0d7b4b 100755
--- a/bin/reproducible_create_meta_pkg_sets.sh
+++ b/bin/reproducible_create_meta_pkg_sets.sh
@@ -12,39 +12,41 @@ common_init "$@"
mkdir -p /srv/reproducible-results/meta_pkgsets
TMPFILE=$(mktemp)
+PACKAGES=/schroots/reproducible-sid/var/lib/apt/lists/*Packages
+SOURCES=/schroots/reproducible-sid/var/lib/apt/lists/*Sources
# helper function
turn_tmpfile_into_sources_list() {
TMP2=$(mktemp)
for PKG in $(cat $TMPFILE) ; do
- ( grep-dctrl -FBinary -sPackage -n $PKG /schroots/reproducible-sid/var/lib/apt/lists/*Sources || echo $PKG ) >> $TMP2
+ ( grep-dctrl -FBinary -sPackage -n $PKG $SOURCES || echo $PKG ) >> $TMP2
done
mv $TMP2 $TMPFILE
}
# the required package set
-grep-dctrl -FPriority -sPackage -n required /schroots/reproducible-sid/var/lib/apt/lists/*Packages | sort -u > $TMPFILE
+grep-dctrl -FPriority -sPackage -n required $PACKAGES | sort -u > $TMPFILE
turn_tmpfile_into_sources_list
cp $TMPFILE /srv/reproducible-results/meta_pkgsets/${META_PKGSET[1]}.pkgset
# build-essential
-grep-dctrl -FBuild-Essential -sPackage -n yes /schroots/reproducible-sid/var/lib/apt/lists/*Packages | sort -u > $TMPFILE
+grep-dctrl -FBuild-Essential -sPackage -n yes $PACKAGES | sort -u > $TMPFILE
turn_tmpfile_into_sources_list
cp $TMPFILE /srv/reproducible-results/meta_pkgsets/${META_PKGSET[2]}.pkgset
# gnome and everything it depends on
-grep-dctrl -FDepends -sPackage -n gnome /schroots/reproducible-sid/var/lib/apt/lists/*Packages | sort -u > $TMPFILE
+grep-dctrl -FDepends -sPackage -n gnome $PACKAGES | sort -u > $TMPFILE
turn_tmpfile_into_sources_list
cp $TMPFILE /srv/reproducible-results/meta_pkgsets/${META_PKGSET[3]}.pkgset
# all build depends of gnome
-grep-dctrl -FBuild-Depends -sPackage -n gnome /schroots/reproducible-sid/var/lib/apt/lists/*Sources | sort -u > /srv/reproducible-results/meta_pkgsets/${META_PKGSET[4]}.pkgset
+grep-dctrl -FBuild-Depends -sPackage -n gnome $SOURCES | sort -u > /srv/reproducible-results/meta_pkgsets/${META_PKGSET[4]}.pkgset
# tails
curl http://nightly.tails.boum.org/build_Tails_ISO_feature-jessie/latest.iso.binpkgs > $TMPFILE
curl wget http://nightly.tails.boum.org/build_Tails_ISO_feature-jessie/latest.iso.srcpkgs >> $TMPFILE
turn_tmpfile_into_sources_list
-cp $TMPFILE /srv/reproducible-results/meta_pkgsets/${META_PKGSET[4]}.pkgset
+cp $TMPFILE /srv/reproducible-results/meta_pkgsets/${META_PKGSET[5]}.pkgset
# finally
rm $TMPFILE