Change the handling of version_stamp a bit to preserve the existing prefix, such as hardened-

svn path=/trunk/; revision=597
This commit is contained in:
Andrew Gaffney 2008-12-02 23:03:57 +00:00
parent 49e82108ec
commit a3f0c6821a
2 changed files with 11 additions and 4 deletions

View file

@ -2,6 +2,10 @@
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id$
02 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> catalyst-auto:
Change the handling of version_stamp a bit to preserve the existing
prefix, such as hardened-
01 Dec 2008; Andrew Gaffney <agaffney@gentoo.org>
catalyst-auto-sparc64.conf:
Change paths for sparc64 to match bender setup

View file

@ -145,17 +145,20 @@ cd ${TMPDIR}/specs
for i in $(find -name '*.spec'); do
# Grab current version_stamp and source_subpath
old_version_stamp=$(grep version_stamp ${i} | sed -e 's|^version_stamp: *||')
old_source_subpath=$(grep source_subpath ${i} | sed -e 's|^source_subpath: .\+-||')
old_source_subpath=$(grep source_subpath ${i} | sed -e 's|^source_subpath: *||')
sed -i 's|^version_stamp:.*$|version_stamp: '${DATESTAMP}'|' ${i}
new_version_stamp=$(echo "${old_version_stamp}" | sed -e 's|^\(.*-\)\?.*$|\1'${DATESTAMP}'|')
new_source_subpath=$(echo "${old_source_subpath}" | sed -e 's|'${old_version_stamp}'$|\1'${new_version_stamp}'|')
sed -i 's|^version_stamp:.*$|version_stamp: '${new_version_stamp}'|' ${i}
sed -i 's|^snapshot:.*$|snapshot: '${DATESTAMP}'|' ${i}
# We don't want to mangle the source_subpath for our stage1 spec
if ! grep -q '^target: *stage1$' ${i}; then
sed -i 's|^source_subpath: \(.\+-\).\+$|source_subpath: \1'${DATESTAMP}'|' ${i}
sed -i 's|^source_subpath:.*$|source_subpath: '${new_source_subpath}'|' ${i}
fi
sed -i '/^livecd\/iso/s|'${old_version_stamp}'|'${DATESTAMP}'|' ${i}
sed -i '/^livecd\/iso/s|'${old_version_stamp}'|'${new_version_stamp}'|' ${i}
kconfig_line=$(grep '^boot/kernel/[^/]\+/config:' ${i})
if [ -n "${kconfig_line}" ]; then