summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGeorge McCollister <george.mccollister@gmail.com>2011-05-19 16:03:55 -0500
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-05-20 19:40:28 +0200
commitb5d6f1c952e7e577098371dd875357c519b2b310 (patch)
tree1dee4be2678ba0e9fce525084d09bd76fb8645a5 /scripts
parentf15a9d54259d5f3fbe963f80d301ddc360569ece (diff)
downloadptxdist-b5d6f1c952e7e577098371dd875357c519b2b310.tar.gz
ptxdist-b5d6f1c952e7e577098371dd875357c519b2b310.tar.xz
build images from ipkg repository
Added option to build images from the ipkg repository. Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ipkg-push24
-rw-r--r--scripts/lib/ptxd_make_image_common.sh13
2 files changed, 31 insertions, 6 deletions
diff --git a/scripts/ipkg-push b/scripts/ipkg-push
index 48025cd02..4c8d224f1 100755
--- a/scripts/ipkg-push
+++ b/scripts/ipkg-push
@@ -119,9 +119,15 @@ for package in $IPKG_PACKAGES; do
# this package wasn't there before, re-revision to -1
newpackage=`$SCRIPTDIR/ipkg-revision $POOL/$package - 1`
if [ -n "$DIST" ]; then
+ cp -f "$IPKGDIR/../state/${IPKG_NAME}.perms" "$POOL/${newpackage%.ipk}.perms"
+
echo " linking.source...: ../../pool/$newpackage"
echo " linking.to.......: $REPODIR/$PROJECT/dists/$DIST/$newpackage"
- ln -sf ../../pool/$newpackage $REPODIR/$PROJECT/dists/$DIST/$newpackage
+ ln -sf ../../pool/${newpackage} $REPODIR/$PROJECT/dists/$DIST/$newpackage
+
+ echo " perms linking.source...: ../../pool/${newpackage%.ipk}.perms"
+ echo " perms linking.to.......: $REPODIR/$PROJECT/dists/$DIST/${newpackage%.ipk}.perms"
+ ln -sf ../../pool/${newpackage%.ipk}.perms $REPODIR/$PROJECT/dists/$DIST/${newpackage%.ipk}.perms
fi
else
@@ -149,7 +155,11 @@ for package in $IPKG_PACKAGES; do
if [ -n "$DIST" ]; then
echo " linking.source...: ../../pool/$latest_pkg"
echo " linking.to.......: $REPODIR/$PROJECT/dists/$DIST/$latest_pkg"
- ln -sf ../../pool/$latest_pkg $REPODIR/$PROJECT/dists/$DIST/$latest_pkg
+ ln -sf ../../pool/${latest_pkg} $REPODIR/$PROJECT/dists/$DIST/$latest_pkg
+
+ echo " perms linking.source...: ../../pool/${latest_pkg%.ipk}.perms"
+ echo " perms linking.to.......: $REPODIR/$PROJECT/dists/$DIST/${latest_pkg%.ipk}.perms"
+ ln -sf ../../pool/${latest_pkg%.ipk}.perms $REPODIR/$PROJECT/dists/$DIST/${latest_pkg%.ipk}.perms
fi
continue
fi
@@ -159,10 +169,16 @@ for package in $IPKG_PACKAGES; do
newpackage=`$SCRIPTDIR/ipkg-revision $POOL/$package - $(($IPKG_REV_PACKAGE+1))`
echo "RSC2: newpackage=$newpackage"
- if [ -n "$DIST" ]; then
+ if [ -n "$DIST" ]; then
+ cp -f "$IPKGDIR/../state/${IPKG_NAME}.perms" "$POOL/${newpackage%.ipk}.perms"
+
echo " linking.source...: ../../pool/$newpackage"
echo " linking.to.......: $REPODIR/$PROJECT/dists/$DIST/$newpackage"
- ln -sf ../../pool/$newpackage $REPODIR/$PROJECT/dists/$DIST/$newpackage
+ ln -sf ../../pool/${newpackage} $REPODIR/$PROJECT/dists/$DIST/$newpackage
+
+ echo " perms linking.source...: ../../pool/${newpackage%.ipk}.perms"
+ echo " perms linking.to.......: $REPODIR/$PROJECT/dists/$DIST/${newpackage%.ipk}.perms"
+ ln -sf ../../pool/${newpackage%.ipk}.perms $REPODIR/$PROJECT/dists/$DIST/${newpackage%.ipk}.perms
fi
fi
diff --git a/scripts/lib/ptxd_make_image_common.sh b/scripts/lib/ptxd_make_image_common.sh
index 035afb765..30446a749 100644
--- a/scripts/lib/ptxd_make_image_common.sh
+++ b/scripts/lib/ptxd_make_image_common.sh
@@ -38,7 +38,11 @@ ptxd_get_ipkg_files() {
# take first hit
if ptxd_get_path "${ipkg_files[@]}"; then
ptxd_reply_ipkg_files[${#ptxd_reply_ipkg_files[@]}]="${ptxd_reply}"
- ptxd_reply_perm_files[${#ptxd_reply_perm_files[@]}]="${ptxd_reply%/*/*}/state/${1}.perms"
+ if [ -z "$(ptxd_get_ptxconf PTXCONF_IMAGE_INSTALL_FROM_IPKG_REPOSITORY)" ]; then
+ ptxd_reply_perm_files[${#ptxd_reply_perm_files[@]}]="${ptxd_reply%/*/*}/state/${1}.perms"
+ else
+ ptxd_reply_perm_files[${#ptxd_reply_perm_files[@]}]="${ptxd_reply%.ipk}.perms"
+ fi
else
ptxd_bailout "\
@@ -57,7 +61,12 @@ export -f ptxd_get_ipkg_files
# initialize variables needed for image creation
#
ptxd_make_image_init() {
- image_ipkg_repo_dirs=( "${ptx_pkg_dir}" )
+ if [ -z "$(ptxd_get_ptxconf PTXCONF_IMAGE_INSTALL_FROM_IPKG_REPOSITORY)" ]; then
+ image_ipkg_repo_dirs=( "${ptx_pkg_dir}" )
+ else
+ image_ipkg_repo_dirs=( "${image_repo_dist_dir}" )
+ fi
+
if [ -n "${PTXDIST_BASE_PLATFORMDIR}" ]; then
image_ipkg_repo_dirs[${#image_ipkg_repo_dirs[@]}]="${PTXDIST_BASE_PLATFORMDIR}/packages"
fi