diff options
author | Junichi Uekawa <dancer@netfort.gr.jp> | 2012-03-13 17:09:59 +0900 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2012-03-13 17:09:59 +0900 |
commit | 0cdf8473e542ca6e54c7afe6d68e85e3727f0e88 (patch) | |
tree | d7cf4892abc05734057637f65036ea119d890963 | |
parent | f98a5e375b5a28527d1da04b03fe292def5a9a53 (diff) | |
download | pbuilder-0cdf8473e542ca6e54c7afe6d68e85e3727f0e88.tar pbuilder-0cdf8473e542ca6e54c7afe6d68e85e3727f0e88.tar.gz |
factor out common code for apt key rings.
-rwxr-xr-x | pbuilder-createbuildenv | 7 | ||||
-rw-r--r-- | pbuilder-modules | 9 | ||||
-rwxr-xr-x | pbuilder-updatebuildenv | 7 |
3 files changed, 11 insertions, 12 deletions
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv index e17307c..0020d3f 100755 --- a/pbuilder-createbuildenv +++ b/pbuilder-createbuildenv @@ -85,12 +85,7 @@ mkdir -p "$BUILDPLACE/tmp/buildd" copy_local_configuration installaptlines -# To support package verification inside the repository we may have to import -# additional keys. -for KEY in "${APTKEYRINGS[@]}"; do - $CHROOTEXEC /usr/bin/apt-key add - < "${KEY}" > /dev/null -done - +add_additional_aptkeyrings executehooks "G" log "I: Refreshing the base.tgz " diff --git a/pbuilder-modules b/pbuilder-modules index 36180ba..b2e6585 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -582,6 +582,15 @@ function conditional_cp_a() { fi } +function add_additional_aptkeyrings() { +# To support package verification inside the repository we may have to import +# additional keys. + for KEY in "${APTKEYRINGS[@]}"; do + log "I: adding apt key file ${KEY}." + $CHROOTEXEC /usr/bin/apt-key add - < "${KEY}" > /dev/null + done +} + #Setting environmental variables that are really required: #required for some packages to install... export LANG=C diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv index 084528e..fd2cb59 100755 --- a/pbuilder-updatebuildenv +++ b/pbuilder-updatebuildenv @@ -74,12 +74,7 @@ $CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" install \ dpkg-dev \ $EXTRAPACKAGES save_aptcache - -# To support package verification inside the repository we may have to import -# additional keys. -for KEY in "${APTKEYRINGS[@]}"; do - $CHROOTEXEC /usr/bin/apt-key add - < "${KEY}" > /dev/null -done +add_additional_aptkeyrings # optionally auto-clean apt-cache if [ "${AUTOCLEANAPTCACHE}" = "yes" -a -n "$APTCACHE" ]; then |