1 |
#!/bin/bash |
#!/bin/bash |
2 |
# build all source packages for given distribution |
# build all source packages for given distribution |
3 |
|
|
4 |
if [[ $(id -u) != 0 ]] |
: ${MAGERC="/etc/mage.rc"} |
5 |
|
|
6 |
|
source /etc/mage.rc.global |
7 |
|
source ${MAGERC} |
8 |
|
source ${MLIBDIR}/mage4.functions.sh |
9 |
|
source ${MLIBDIR}/smage2.functions.sh |
10 |
|
|
11 |
|
if ! have_root_privileges |
12 |
then |
then |
13 |
echo "You must be r00t" |
echo "You must be r00t" |
14 |
exit 1 |
exit 1 |
22 |
exit 1 |
exit 1 |
23 |
fi |
fi |
24 |
|
|
|
source /etc/mage.rc.global |
|
|
source /etc/mage.rc |
|
|
|
|
|
sminclude() { true; } |
|
|
|
|
25 |
blacklisted() |
blacklisted() |
26 |
{ |
{ |
27 |
local EXCLUDED="${MROOT}/etc/mage-profile/package.blacklist-${ARCH}-${DISTRI}" |
local EXCLUDED="${MROOT}/etc/mage-profile/package.blacklist-${ARCH}-${DISTRI}" |
31 |
|
|
32 |
local SMAGEFILE="$1" |
local SMAGEFILE="$1" |
33 |
|
|
34 |
source ${SMAGEFILE} |
smagesource ${SMAGEFILE} |
35 |
|
|
36 |
local EXPCAT EXPNAME EXPVER EXPBUILD |
local EXPCAT EXPNAME EXPVER EXPBUILD |
37 |
while read EXPCAT EXPNAME EXPVER EXPBUILD |
while read EXPCAT EXPNAME EXPVER EXPBUILD |
42 |
esac |
esac |
43 |
|
|
44 |
# exclude full pver |
# exclude full pver |
45 |
if [[ -n ${PCATEGORIE} ]] && [[ -n ${PNAME} ]] && |
if [[ -n ${PCAT} ]] && [[ -n ${PNAME} ]] && |
46 |
[[ -n ${EXPCAT} ]] && [[ -n ${EXPNAME} ]] && |
[[ -n ${EXPCAT} ]] && [[ -n ${EXPNAME} ]] && |
47 |
[[ -n ${PVER} ]] && [[ -n ${PBUILD} ]] && |
[[ -n ${PVER} ]] && [[ -n ${PBUILD} ]] && |
48 |
[[ -n ${EXPVER} ]] && [[ -n ${EXPBUILD} ]] |
[[ -n ${EXPVER} ]] && [[ -n ${EXPBUILD} ]] |
49 |
then |
then |
50 |
[[ ${EXPCAT}/${EXPNAME}-${EXPVER}-${EXPBUILD} = ${PCATEGORIE}/${PNAME}-${PVER}-${PBUILD} ]] && return 1 |
[[ ${EXPCAT}/${EXPNAME}-${EXPVER}-${EXPBUILD} = ${PCAT}/${PNAME}-${PVER}-${PBUILD} ]] && return 1 |
51 |
fi |
fi |
52 |
|
|
53 |
# exclude pcat/pname only |
# exclude pcat/pname only |
54 |
if [[ -n ${PCATEGORIE} ]] && [[ -n ${PNAME} ]] && |
if [[ -n ${PCAT} ]] && [[ -n ${PNAME} ]] && |
55 |
[[ -n ${EXPCAT} ]] && [[ -n ${EXPNAME} ]] && |
[[ -n ${EXPCAT} ]] && [[ -n ${EXPNAME} ]] && |
56 |
[[ -z ${EXPVER} ]] && [[ -z ${EXPBUILD} ]] |
[[ -z ${EXPVER} ]] && [[ -z ${EXPBUILD} ]] |
57 |
then |
then |
58 |
[[ ${EXPCAT}/${EXPNAME} = ${PCATEGORIE}/${PNAME} ]] && return 1 |
[[ ${EXPCAT}/${EXPNAME} = ${PCAT}/${PNAME} ]] && return 1 |
59 |
fi |
fi |
60 |
done << EOF |
done << EOF |
61 |
$(cat ${EXCLUDED}; echo) |
$(cat ${EXCLUDED}; echo) |