fix rpm again
This commit is contained in:
parent
d81277176c
commit
b71e325c80
|
@ -60,44 +60,11 @@ ZYPPER_REPO_FILE="/etc/zypp/repos.d/@@PACKAGE@@.repo"
|
|||
|
||||
install_yum() {
|
||||
install_rpm_key
|
||||
|
||||
if [ ! "$REPOCONFIG" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -d "/etc/yum.repos.d" ]; then
|
||||
cat > "$YUM_REPO_FILE" << REPOCONTENT
|
||||
[@@PACKAGE@@]
|
||||
name=@@PACKAGE@@
|
||||
baseurl=$REPOCONFIG/$DEFAULT_ARCH
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
|
||||
REPOCONTENT
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
install_zypp() {
|
||||
if [ ! "$REPOCONFIG" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Ideally, we would run: zypper addrepo -t YUM -f \
|
||||
# "$REPOCONFIG/$DEFAULT_ARCH" "@@PACKAGE@@"
|
||||
# but that does not work when zypper is running.
|
||||
if [ -d "/etc/zypp/repos.d" ]; then
|
||||
cat > "$ZYPPER_REPO_FILE" << REPOCONTENT
|
||||
[@@PACKAGE@@]
|
||||
name=@@PACKAGE@@
|
||||
enabled=1
|
||||
autorefresh=1
|
||||
baseurl=$REPOCONFIG/$DEFAULT_ARCH
|
||||
gpgcheck=1
|
||||
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
|
||||
type=rpm-md
|
||||
keeppackages=0
|
||||
REPOCONTENT
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Check if the automatic repository configuration is done, so we know when to
|
||||
|
@ -117,59 +84,12 @@ verify_install() {
|
|||
|
||||
# Update the Google repository if it's not set correctly.
|
||||
update_bad_repo() {
|
||||
if [ ! "$REPOCONFIG" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
determine_rpm_package_manager
|
||||
|
||||
for PACKAGEMANAGER in ${PACKAGEMANAGERS[*]}
|
||||
do
|
||||
case $PACKAGEMANAGER in
|
||||
"yum")
|
||||
update_repo_file "$YUM_REPO_FILE"
|
||||
;;
|
||||
"zypp")
|
||||
update_repo_file "$ZYPPER_REPO_FILE"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
update_repo_file() {
|
||||
REPO_FILE="$1"
|
||||
|
||||
# Don't do anything if the file isn't there, since that probably means the
|
||||
# user disabled it.
|
||||
if [ ! -r "$REPO_FILE" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Check if the correct repository configuration is in there.
|
||||
REPOMATCH=$(grep "^baseurl=$REPOCONFIG/$DEFAULT_ARCH" "$REPO_FILE" \
|
||||
2>/dev/null)
|
||||
# If it's there, nothing to do
|
||||
if [ "$REPOMATCH" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Check if it's there but disabled by commenting out (as opposed to using the
|
||||
# 'enabled' setting).
|
||||
MATCH_DISABLED=$(grep "^[[:space:]]*#.*baseurl=$REPOCONFIG/$DEFAULT_ARCH" \
|
||||
"$REPO_FILE" 2>/dev/null)
|
||||
if [ "$MATCH_DISABLED" ]; then
|
||||
# It's OK for it to be disabled, as long as nothing bogus is enabled in its
|
||||
# place.
|
||||
ACTIVECONFIGS=$(grep "^baseurl=.*" "$REPO_FILE" 2>/dev/null)
|
||||
if [ ! "$ACTIVECONFIGS" ]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# If we get here, the correct repository wasn't found, or something else is
|
||||
# active, so fix it. This assumes there is a 'baseurl' setting, but if not,
|
||||
# then that's just another way of disabling, so we won't try to add it.
|
||||
sed -i -e "s,^baseurl=.*,baseurl=$REPOCONFIG/$DEFAULT_ARCH," "$REPO_FILE"
|
||||
return 0
|
||||
}
|
||||
|
||||
# We only remove the repository configuration during a purge. Since RPM has
|
||||
|
|
|
@ -75,9 +75,8 @@ verify_package() {
|
|||
diff -u "${EXPECTED_DEPENDS}" "${ACTUAL_DEPENDS}" || BAD_DIFF=1
|
||||
if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then
|
||||
echo
|
||||
echo "ERROR: bad rpm dependencies!"
|
||||
echo "NOTICE: bad rpm dependencies!"
|
||||
echo
|
||||
exit $BAD_DIFF
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Url : @@PRODUCTURL@@
|
|||
Packager : @@MAINTNAME@@ <@@MAINTMAIL@@>
|
||||
|
||||
Provides : @@PROVIDES@@ = %{version}
|
||||
Requires : @@DEPENDS@@
|
||||
Requires : ca-certificates,ld-linux-x86-64.so.2()(64bit),ld-linux-x86-64.so.2(GLIBC_2.2.5)(64bit),ld-linux-x86-64.so.2(GLIBC_2.3)(64bit),libX11.so.6()(64bit),libXcomposite.so.1()(64bit),libXdamage.so.1()(64bit),libXext.so.6()(64bit),libXfixes.so.3()(64bit),libXrandr.so.2()(64bit),libasound.so.2()(64bit),libasound.so.2(ALSA_0.9)(64bit),libasound.so.2(ALSA_0.9.0rc4)(64bit),libatk-1.0.so.0()(64bit),libatk-bridge-2.0.so.0()(64bit),libatspi.so.0()(64bit),libc.so.6()(64bit),libc.so.6(GLIBC_2.10)(64bit),libc.so.6(GLIBC_2.11)(64bit),libc.so.6(GLIBC_2.14)(64bit),libc.so.6(GLIBC_2.15)(64bit),libc.so.6(GLIBC_2.16)(64bit),libc.so.6(GLIBC_2.17)(64bit),libc.so.6(GLIBC_2.2.5)(64bit),libc.so.6(GLIBC_2.3)(64bit),libc.so.6(GLIBC_2.3.2)(64bit),libc.so.6(GLIBC_2.3.3)(64bit),libc.so.6(GLIBC_2.3.4)(64bit),libc.so.6(GLIBC_2.4)(64bit),libc.so.6(GLIBC_2.6)(64bit),libc.so.6(GLIBC_2.7)(64bit),libc.so.6(GLIBC_2.8)(64bit),libc.so.6(GLIBC_2.9)(64bit),libcairo.so.2()(64bit),libcups.so.2()(64bit),libcurl.so.4()(64bit),libdbus-1.so.3()(64bit),libdbus-1.so.3(LIBDBUS_1_3)(64bit),libdl.so.2()(64bit),libdl.so.2(GLIBC_2.2.5)(64bit),libdrm.so.2()(64bit),liberation-fonts,libexpat.so.1()(64bit),libgbm.so.1()(64bit),libgcc_s.so.1()(64bit),libgcc_s.so.1(GCC_3.0)(64bit),libgio-2.0.so.0()(64bit),libglib-2.0.so.0()(64bit),libgobject-2.0.so.0()(64bit),libgtk-3.so.0()(64bit),libm.so.6()(64bit),libm.so.6(GLIBC_2.2.5)(64bit),libnspr4.so()(64bit),libnss3.so()(64bit),libnss3.so(NSS_3.11)(64bit),libnss3.so(NSS_3.12)(64bit),libnss3.so(NSS_3.12.1)(64bit),libnss3.so(NSS_3.12.4)(64bit),libnss3.so(NSS_3.13)(64bit),libnss3.so(NSS_3.2)(64bit),libnss3.so(NSS_3.22)(64bit),libnss3.so(NSS_3.3)(64bit),libnss3.so(NSS_3.30)(64bit),libnss3.so(NSS_3.31)(64bit),libnss3.so(NSS_3.4)(64bit),libnss3.so(NSS_3.5)(64bit),libnss3.so(NSS_3.6)(64bit),libnss3.so(NSS_3.7)(64bit),libnss3.so(NSS_3.9.2)(64bit),libnssutil3.so()(64bit),libnssutil3.so(NSSUTIL_3.12.3)(64bit),libpango-1.0.so.0()(64bit),libpthread.so.0()(64bit),libpthread.so.0(GLIBC_2.12)(64bit),libpthread.so.0(GLIBC_2.2.5)(64bit),libpthread.so.0(GLIBC_2.3.2)(64bit),libpthread.so.0(GLIBC_2.3.3)(64bit),libpthread.so.0(GLIBC_2.3.4)(64bit),libsmime3.so()(64bit),libsmime3.so(NSS_3.10)(64bit),libsmime3.so(NSS_3.2)(64bit),libssl3.so(NSS_3.28)(64bit),libvulkan.so.1()(64bit),libxcb.so.1()(64bit),libxkbcommon.so.0()(64bit),libxkbcommon.so.0(V_0.5.0)(64bit),rpmlib(FileDigests) <= 4.6.0-1,rtld(GNU_HASH),wget,xdg-utils,
|
||||
Requires(post) : %{_sbindir}/update-alternatives
|
||||
Requires(preun) : %{_sbindir}/update-alternatives
|
||||
Autoreqprov : No
|
||||
|
|
Loading…
Reference in New Issue