summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-27 14:17:50 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-27 14:17:50 -0500
commit75f8632e677bd11bb88be037aa6aab32a79ab008 (patch)
tree926d43abd42e994ae28a2928fc8bbfad76e87c65
parent0097ea36511596b3de1947a2069d708079887058 (diff)
some fixes
-rwxr-xr-xfullpkg1
-rwxr-xr-xlibremakepkg22
2 files changed, 15 insertions, 8 deletions
diff --git a/fullpkg b/fullpkg
index 7a08112..35598eb 100755
--- a/fullpkg
+++ b/fullpkg
@@ -133,6 +133,7 @@ function find_deps {
[ $? -eq 20 ] && return 20
popd > /dev/null
break 1 # found, go to next dep
+ fi
done
# if search pkgname in repo doesn't work
# this should find pkgsplits
diff --git a/libremakepkg b/libremakepkg
index e446833..b8d8c9a 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -32,6 +32,7 @@ function usage {
echo ' -h show this message.'
echo ' -c cleans the chroot before building.'
echo ' -u updates the chroot before building.'
+ echo ' -U copy pacman, makepkg, and mtag config files to the chroot'
echo ' -n use this dir instead of "${CHCOPY}".'
echo ' -M <--arg> passes long args to makepkg, use it as many times as needed.'
echo
@@ -44,11 +45,13 @@ function buildenv {
mkdir -p "${CHROOTDIR}/${CHCOPY}${mp}"
mount -o bind ${mp} "${CHROOTDIR}/${CHCOPY}${mp}" || exit 1
done
-
- for config in etc/makepkg.conf etc/pacman.conf etc/mtab; do
- msg2 "copying config /$config to ${CHROOTDIR}/${CHCOPY}/${config}"
- cp --remove-destination /${config} ${CHROOTDIR}/${CHCOPY}/${config} || exit 1
- done
+
+ if [ "$update_config" = 'y']; then
+ for config in etc/makepkg.conf etc/pacman.conf etc/mtab; do
+ msg2 "copying config /$config to ${CHROOTDIR}/${CHCOPY}/${config}"
+ cp --remove-destination /${config} ${CHROOTDIR}/${CHCOPY}/${config} || exit 1
+ done
+ fi
}
# Clean packages with pacman
@@ -74,6 +77,7 @@ while [ "\$clean" = 'false' ]; do
done
EOF
) > "${CHROOTDIR}/${CHROOTNAME}/clean"
+ chmod +x "${CHROOTDIR}/${CHROOTNAME}/clean"
mkarchroot -r "/clean" "${CHROOTDIR}/${CHROOTNAME}"
}
@@ -102,9 +106,10 @@ UPDATE_FIRST="n"
USE_LOG='n'
CHROOTNAME=${CHCOPY}
MAKEPKG_ARGS=""
+update_config='n'
#libremakepkg own args
-libremakepkgargs='hcun:I:M:'
+libremakepkgargs='hcuUn:I:M:'
#now makepkg args
libremakepkgargs+='ACdefiLmop:rRs'
@@ -113,7 +118,8 @@ while getopts ${libremakepkgargs} arg ; do
h) usage; exit 0 ;;
c) CLEAN_FIRST="y" ;;
u) UPDATE_FIRST="y" ;;
- n) chrootname="$OPTARG"; echo $chrootname ;;
+ U) update_config='y'
+ n) CHROOTNAME="$OPTARG" ;;
M) MAKEPKG_ARGS+=" $OPTARG" ;;
L) MAKEPKG_ARGS+=" -$arg $OPTARG"
USE_LOG='y';;
@@ -150,7 +156,7 @@ if [ "${CLEAN_FIRST}" = y ]; then
fi
msg "Creating the package"
-makechrootpkg -r ${CHROOTDIR} -l "${CHROOTNAME}" -- ${MAKEPKG_ARGS}
+makechrootpkg -r "${CHROOTDIR}" -l "${CHROOTNAME}" -- "${MAKEPKG_ARGS}
ev=$? # exit value
[ "${USE_LOG}" == 'y' -a -e ${CHROOTDIR}/${CHROOTNAME}/build/*.log ] && {