Re: Gnome-apt and apt 0.3.1
Jason Gunthorpe wrote:
>
> On Fri, 5 Mar 1999, Mitch Blevins wrote:
>
> > > We need to make the APT package provide the virtual package libapt-pkg2.1
> > > and then have gnome-apt depend on that instead. Please do that if you are
> > > going to do anything..
> >
> > I have deliberately avoided touching anything in the apt cvs tree. Does
> > this mean that I have permission to change the control files for apt in
> > cvs? (Don't wanna piss anybody off)
>
> Sure go crazy, but if you make an error we get to tar and feather you :>
> Just keep the changelog uptodate and be sure the provides: is in sync..
We need more than the Provides: to be in sync.
I found that the symlink in libapt-pkg-dev was still pointing to
libapt-pkg.2.0 even though we are now at 2.2.
Here are the proposed changes for keeping things in sync:
1) Read the major version of the libapt-pkg library directly from the
buildlib/makefile and export it as an environment variable (LIBAPT_MAJOR)
for use elsewhere in debian/rules.
2) Change the line in debian/rules that creates the symlink for libapt-pkg-dev
to use the ${LIBAPT_MAJOR} variable.
3) Add a Provides: in the debian/control that references a variable
in debian/substvars.
4) Create that substvars line in the debian/rules build: target.
That's it! Let me know if there are any objections as I will commit these
to CVS shortly. Also, does anyone think that apt_0.3.1 should conflict
with earlier versions of libapt-pkg-dev? (because the symlink will be wrong)
The diff of debian/rules is:
--- rules Mon Feb 15 03:23:10 1999
+++ /home/mblevin/debian/gnome-apt/apt/debian/rules Fri Mar 12 14:04:12 1999
@@ -8,6 +8,9 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+# Find the libapt-pkg major version for use in other control files
+export LIBAPT_MAJOR=`egrep '^MAJOR=' apt-pkg/makefile |cut -d '=' -f 2`
+
build: build-stamp
build-stamp: configure
dh_testdir
@@ -87,8 +90,9 @@
dh_suidregister -papt
dh_installdeb -papt
LD_LIBRARY_PATH=debian/tmp/usr/lib dh_shlibdeps -papt
+ echo libapt-pkg:major=${LIBAPT_MAJOR} >> debian/substvars
dh_gencontrol -papt
- dh_makeshlibs -papt
+ dh_makeshlibs -m${LIBAPT_MAJOR} -Vlibapt-pkg${LIBAPT_MAJOR} -papt
dh_md5sums -papt
dh_builddeb -papt
@@ -98,7 +102,7 @@
dh_clean -plibapt-pkg-dev -k
dh_installdirs -plibapt-pkg-dev usr/lib usr/include/apt-pkg
- ln -s libapt-pkg.so.2.0 debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
+ ln -s libapt-pkg.so.${LIBAPT_MAJOR} debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
cp build/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/
The debian/control file is changed like so:
--- control Sun Feb 21 03:38:53 1999
+++ /home/mblevin/debian/gnome-apt/apt/debian/control Fri Mar 12 13:31:57 1999
@@ -9,6 +9,7 @@
Depends: ${shlibs:Depends}
Conflicts: deity
Replaces: deity
+Provides: libapt-pkg${libapt-pkg:major}
Description: Advanced front-end for dpkg
This is Debian's next generation front-end for the dpkg package manager.
It provides the apt-get utility and APT dselect method that provides a
Reply to: