On 11/15/06, James Olin Oden <james oden gmail com> wrote:
On 11/15/06, Igor Pasemnik <ipasemnik liquidcomputing com> wrote: > I assume you want to satisfy some requires from some other packages, > although you mentioned without rpm and/or creating one, here is how easy > it is to bypass using --nodeps and satisfy whatever requirements that > other package has, assuming you really want to bypass the requirements, > here is a minimal spec file, say something like dummy.spec, build it as > root or non-root with the following stanza: I was making this really hard. This is a much easier solution. Hmmm...some times you have to with their problem rather than the question they asked. Yeah, and one could with a little creativity wrap this up in a simple shell script that creates the package on the fly and installs, so this user could have: addRPMEntry some_silly_requirement
Attached is a hand grenade...enjoy...james
#
# Generate name:
NAME="dummy-provider-${RANDOM}"
while rpm -q "${NAME}" > /dev/null 2>&1
do
NAME="dummy-provider-${RANDOM}"
done
#
# GEnerate Provides:
PROVIDES="Provides: ${1}"
#
# Generate Spec file
SPECFILE=$(mktemp)
cat <<EOF > ${SPECFILE}
#----------- spec file starts ---------------
Name: ${NAME}
Version: 1.0.0
Release: 1.0.0
Vendor: dummy
Group: dummy
Summary: Provides %{name}
License: %{vendor}
# in Provides: you add whatever you want to fool the system
Buildroot: %{_tmppath}/%{name}-%{version}-root
${PROVIDES}
%description
%{summary}
%files
EOF
#
# Build it
BUILD_LOG=$(mktemp)
rpmbuild --define '_rpmdir /tmp' -bb "${SPECFILE}" > "${BUILD_LOG}"
if [ $? != 0 ]
then
echo "ERROR: Could nto build dummy rpm!"
fi
PKG=$(awk '/^Wrote:/ { print $2 }' < "${BUILD_LOG}" )
rm "${BUILD_LOG}"
#
# Install it:
rpm -Uvh "${PKG}"
rm "${SPECFILE}"