git://git.onelab.eu
/
nodeimage.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not support (very old) yum-arch, only createrepo
[nodeimage.git]
/
plc.d
/
packages
diff --git
a/plc.d/packages
b/plc.d/packages
index
ad8a5d9
..
29b4b46
100755
(executable)
--- a/
plc.d/packages
+++ b/
plc.d/packages
@@
-1,6
+1,4
@@
#!/bin/bash
#!/bin/bash
-# $Id$
-# $URL$
#
# priority: 1200
#
#
# priority: 1200
#
@@
-38,14
+36,12
@@
case "$1" in
fi
### availability of repo indexing tools
fi
### availability of repo indexing tools
- # old one - might be needed for old-style nodes
- type -p yum-arch > /dev/null && have_yum_arch="true"
# new one
type -p createrepo > /dev/null && have_createrepo="true"
# new one
type -p createrepo > /dev/null && have_createrepo="true"
- ###
copy
vserver-PLDISTRO* and vserver-systemslices-PLDISTRO*
- ### pac
ak
ges to each repository to be able to create different
+ ###
symlink
vserver-PLDISTRO* and vserver-systemslices-PLDISTRO*
+ ### pac
ka
ges to each repository to be able to create different
### flavours of vservers on nodes
for repository1 in $repositories; do
DISTRO=${PLC_FLAVOUR_SLICE_PLDISTRO}
### flavours of vservers on nodes
for repository1 in $repositories; do
DISTRO=${PLC_FLAVOUR_SLICE_PLDISTRO}
@@
-55,6
+51,9
@@
case "$1" in
if [[ $(basename $repository1) == ${DISTRO}* ]] \
&& [[ $(basename $repository2) == ${DISTRO}* ]] \
&& [[ $repository1 != $repository2 ]] ; then
if [[ $(basename $repository1) == ${DISTRO}* ]] \
&& [[ $(basename $repository2) == ${DISTRO}* ]] \
&& [[ $repository1 != $repository2 ]] ; then
+ rm -rf $repository2/${VSERVER_PKG}*
+ rm -rf $repository2/${VSERVER_SYS_SLICES_PKG}*
+
ln -s $repository1/${VSERVER_PKG}* $repository2
ln -s $repository1/${VSERVER_SYS_SLICES_PKG}* $repository2
fi
ln -s $repository1/${VSERVER_PKG}* $repository2
ln -s $repository1/${VSERVER_SYS_SLICES_PKG}* $repository2
fi
@@
-67,12
+66,10
@@
case "$1" in
# and the corresponding stamps
new_stamps=
# is there a need to refresh yum metadata
# and the corresponding stamps
new_stamps=
# is there a need to refresh yum metadata
- need_yum_arch=
- need_createrepo=
+ need_createrepo=true # always run createrepo as links may change for vserver packages
# right after installation, no package is present
# but we still need to create index
# right after installation, no package is present
# but we still need to create index
- [ -n "$have_yum_arch" -a ! -f $repository/headers/header.info ] && need_yum_arch=true
[ -n "$have_createrepo" -a ! -f $repository/repodata/repomd.xml ] && need_createrepo=true
for package in $(find $repository/ -name '*.rpm') ; do
[ -n "$have_createrepo" -a ! -f $repository/repodata/repomd.xml ] && need_createrepo=true
for package in $(find $repository/ -name '*.rpm') ; do
@@
-82,8
+79,6
@@
case "$1" in
new_rpms="$new_rpms $package"
new_stamps="$new_stamps $stamp"
fi
new_rpms="$new_rpms $package"
new_stamps="$new_stamps $stamp"
fi
- # Or than yum-arch headers
- [ -n "$have_yum_arch" ] && [ $package -nt $repository/headers/header.info ] && need_yum_arch=true
# Or than createrepo database
[ -n "$have_createrepo" ] && [ $package -nt $repository/repodata/repomd.xml ] && need_createrepo=true
done
# Or than createrepo database
[ -n "$have_createrepo" ] && [ $package -nt $repository/repodata/repomd.xml ] && need_createrepo=true
done
@@
-105,14
+100,6
@@
case "$1" in
# Update repository index / yum metadata.
# Update repository index / yum metadata.
- if [ -n "$need_yum_arch" ] ; then
- # yum-arch sometimes leaves behind
- # .oldheaders and .olddata directories accidentally.
- rm -rf $repository/{.oldheaders,.olddata}
- yum-arch $repository
- check
- fi
-
if [ -n "$need_createrepo" ] ; then
if [ -f $repository/yumgroups.xml ] ; then
createrepo --quiet -g yumgroups.xml $repository
if [ -n "$need_createrepo" ] ; then
if [ -f $repository/yumgroups.xml ] ; then
createrepo --quiet -g yumgroups.xml $repository