[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

%post items un-done by an obsoleted package's %postun



Hello,

I have an rpm that installs a custom lpr/lpd client, and replaces lprng
and items dependant on lprng.

In in the header of the spec file I have:
Obsoletes: LPRng printconf printconf-gui printtool rhs-printfilters
Provides: lpr

This successfully un-installs the lprng, printconf, ect rpms if they are
installed on the machine.

In the %post section of my rpm I do a  chkconfig --add lpr.

After my package is installed successfully, the lprng, printconf, ect
are un-installed.  During this un-install the %postun for lprng runs a
chkconfig --del lpr, and un-does what my %post did.

How can I prevent this from happening without having to uninstall the
lprng package before installing mine?

Is there a macro like %post that runs as the very very last thing, even
after any un-installs done because of the Obsoletes: tag?

Thanks

-Adam

Below is the complete spec file if needed:

Summary: New lpr
Name: adam-lpr
Version: 0.2
Release: 19
Copyright: Adam Crews
Group: System Environment/Base
Source: /local/NEW_RPMS/eps-lpr-client-2.23.tar.bz2
Buildroot: %{_tmppath}/%{name}-buildroot
Buildarch: i386
Requires: bash >= 2.0
Prereq: net-tools
Obsoletes: LPRng printconf printconf-gui printtool rhs-printfilters
Provides: lpr

%description
The CEPS print system.

%prep
%setup -q -c 

%build
cd *lpr-client*
./mkmake linux
make
make install
sh ./eps*LINUX* -n

%files
%defattr(-,root,daemon)
/usr/sbin/lpc
/usr/sbin/lpd
%{_bindir}/lpq
%{_bindir}/lpr
%{_bindir}/lprm
%{_bindir}/lpstat
/etc/lpr.conf
/etc/rc.d/init.d/lpd
%config(missingok) %{_bindir}/lp

%install
install -D -m 2711 -g daemon /usr/sbin/lpc %{buildroot}/usr/sbin/lpc
install -D -m 6711 -g daemon /usr/sbin/lpd %{buildroot}/usr/sbin/lpd
install -D -m 6711 -g daemon %{_bindir}/lpq %{buildroot}%{_bindir}/lpq
install -D -m 6711 -g daemon %{_bindir}/lpr %{buildroot}%{_bindir}/lpr
install -D -m 6711 -g daemon %{_bindir}/lprm %{buildroot}%{_bindir}/lprm
install -D -m 6711 -g daemon %{_bindir}/lpstat
%{buildroot}%{_bindir}/lpstat
install -D -m 0644 -g daemon /etc/lpr.conf %{buildroot}/etc/lpr.conf
install -D -m 0755 -g daemon /etc/rc.d/init.d/lpd
%{buildroot}/etc/rc.d/init.d/lpd
# needed to fake out the files list
cd %{buildroot}%{_bindir}
ln -fs lpr lp


%pre
/sbin/service lpd stop

%clean
rm -rf %{buildroot}

%post
chkconfig --add lpd
ln -fs %{_bindir}/lpr %{_bindir}/lp





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []