[prev in list] [next in list] [prev in thread] [next in thread]
List: rpmorg-list
Subject: Re: Dependency error
From: Michael Fernandez <michael.fernandez () dms ! at>
Date: 2002-11-20 11:41:45
Message-ID: 1037792505.10664.4.camel () i3s15 ! sophia ! dms ! at
[Download RAW message or body]
On Wed, 2002-11-20 at 09:01, Jesse Keating wrote:
> On 20 Nov 2002 08:38:08 +0100
> Michael Fernandez <michael.fernandez@dms.at> wrote:
>
> # I tried this, but I have always the same behavior.
> # To install the packages, I have to install it at the same time,
> # but if an error occurs on the installation of the package B, the
> # package A is even installed.
>
> What "error"? If A depends on B, and B depends on A, then neither will
> be installed unless both are installed at the same time. If one fails,
> they should both fail. If they don't, it's either A) an rpm bug, or B)
> a mis-written spec file.
>
> Perhaps you should show us your spec files, so that we know what you are
> doing is correct.
The spec file for A is:
#----------------------------------------------------------------------------
%define name A
%define version 1.0
%define release 0.1
Summary: Test package A
Name: %{name}
Version: %{version}
Release: %{release}
Group: DMS
Vendor: DMS
Distribution: DMS
URL: http://www.dms.at/
License: No
BuildArch: noarch
Source0: packages.stamp
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: B
%description
Desc of A
%install
mkdir -p $RPM_BUILD_ROOT/test
cp %{SOURCE0} $RPM_BUILD_ROOT/test
%clean
rm -rf $RPM_BUILD_ROOT
%files
/test/packages.stamp
%changelog
* Wed Nov 20 2002 mike <mike at dms.at>
- Initial build.
#----------------------------------------------------------------------------
The spec file for B is now:
#----------------------------------------------------------------------------
%define name B
%define version 1.0
%define release 0.1
%define cfgdir /etc/kbs
Summary: Test package B
Name: %{name}
Version: %{version}
Release: %{release}
BuildArch: noarch
Group: DMS
License: No
URL: http://www.dms.at/
Source0: kbs_baseconfig.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Vendor: DMS
Distribution: DMS
Requires: A
%description
Desc of B
%install
mkdir -p $RPM_BUILD_ROOT%{cfgdir}
cp %{SOURCE0} $RPM_BUILD_ROOT%{cfgdir}
%clean
rm -rf $RPM_BUILD_ROOT
%pre
# There is normaly here a real test.
# But I want to test when the installation of B failed.
if [ 1 ]
then
echo "Error: my error" >&2
exit 1
fi
%post
%files
%{cfgdir}/kbs_baseconfig.sh
%changelog
* Mon Nov 20 2002 mike <mike at dms.at> - 1.0-0.1
- First release
#----------------------------------------------------------------------------
When I try to install A and B packages : B failed but A is installed.
Thanks in advance for your help
Michael.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic