171 |
mtime=$(stat -c %Y "${reference}") |
mtime=$(stat -c %Y "${reference}") |
172 |
touch \ |
touch \ |
173 |
--no-create \ |
--no-create \ |
174 |
|
--no-dereference \ |
175 |
--time=mtime \ |
--time=mtime \ |
176 |
--reference "${reference}" \ |
--reference="${reference}" \ |
177 |
"${pathto}" |
"${pathto}" |
178 |
|
|
179 |
echo "${mtime}" |
echo "${mtime}" |
415 |
|
|
416 |
ln -snf "${link}" "${MROOT}${pathto}" |
ln -snf "${link}" "${MROOT}${pathto}" |
417 |
|
|
418 |
# # fix mtime and db |
# fix mtime and db |
419 |
# fix_descriptor ${pkgname}/.symlinks \ |
fix_descriptor ${pkgname}/.symlinks \ |
420 |
# "${pathto}" \ |
"${pathto}" \ |
421 |
# "${posix}" \ |
"${posix}" \ |
422 |
# "${link}" \ |
"${link}" \ |
423 |
# "$(fix_mtime "${BUILDDIR}/${pkgname}"/.mtime \ |
"$(fix_mtime "${BUILDDIR}/${pkgname}"/.mtime \ |
424 |
# "${MROOT}${pathto}")" |
"${MROOT}${pathto}")" |
425 |
|
|
426 |
done < ${BUILDDIR}/${pkgname}/.symlinks |
done < ${BUILDDIR}/${pkgname}/.symlinks |
427 |
|
|
808 |
|
|
809 |
mtime="$(stat -c %Y ${MROOT}${INSTALLDB}/${pfull}/.mtime)" |
mtime="$(stat -c %Y ${MROOT}${INSTALLDB}/${pfull}/.mtime)" |
810 |
|
|
811 |
# if $pathto is a symlink than compare linked binary |
# no extra handlink for symlinks anymore as fix_mtime |
812 |
if [ -L "${MROOT}${pathto}" ] |
# uses --no-dereference, compare directly |
813 |
then |
x=$(stat -c %Y "${MROOT}${pathto}") |
|
# readlink -f resolves full path of linked file |
|
|
x="$(readlink -f "${MROOT}${pathto}")" |
|
|
|
|
|
# abort if target does not exists |
|
|
# we keep safe here, theoretically the link can removed |
|
|
[ ! -e "${x}" ] && return 1 |
|
|
|
|
|
x=$(stat -c %Y "${x}") |
|
|
else |
|
|
x=$(stat -c %Y "${MROOT}${pathto}") |
|
|
fi |
|
814 |
|
|
815 |
[[ ${mtime} = ${x} ]] && return 0 |
[[ ${mtime} = ${x} ]] && return 0 |
816 |
|
|
1555 |
|
|
1556 |
for mirr in ${MIRRORS} |
for mirr in ${MIRRORS} |
1557 |
do |
do |
1558 |
# path without distribution |
# path without distribution |
1559 |
mymirr="${mirr%/*}" |
# (only for stable|testing|unstable and not DISTROTAG) |
1560 |
|
case ${mirr##*/} in |
1561 |
|
stable|testing|unstable) mymirr="${mirr%/*}";; |
1562 |
|
*) mymirr="${mirr}";; |
1563 |
|
esac |
1564 |
|
|
1565 |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
1566 |
echo "fetching latest md5 from ${mymirr} ..." |
echo "fetching latest md5 from ${mymirr} ..." |