Here's my case- I have a package named say foo-1.2.3
. I want to know which package it installs. So, I install it in a fakeroot
approach and make a list of all files it install in a file called FILES
Suppose I want to upgrade it to foo-1.2.4
. In the same way, I created the FILES
file for it. I know that if the name of the shared library changes, all the packages dynamically linked to it needs to be re-compiled. So I want to write a bash script which will notify me.
For example, say the old FILES
contains-
/usr/lib/libfoo.so.1
/usr/lib/libfooabc.so.1
/usr/lib/something.so.1
/usr/share/doc/foo-1.2.3/whatever
And let's say the new FILES
contains-
/usr/lib/libfoo.so.2
/usr/lib/libfooabc.so.2
/usr/lib/something.so.1
/usr/share/doc/foo-1.2.4/whatever
I want the script to notify me that, /usr/lib/libfoo.so.1
and /usr/lib/libfooabc.so.1
have changed.
I tried this
grep -F -x -f old new|grep -E *\.so\.*
But it doesn't work as expected when the file old
is-
/usr/lib/libfooabc.so.1
/usr/lib/libfoo.so.1
/usr/lib/libfoo.so.2
/usr/lib/something.so.1
/usr/share/doc/foo-1.2.3/whatever
And new
is-
/usr/lib/libfoo.so.2
/usr/lib/libfoo.so.3
/usr/lib/libfooabc.so.2
/usr/lib/something.so.1
/usr/share/doc/foo-1.2.4/whatever
The output is-
/usr/lib/libfoo.so.2
/usr/lib/something.so.1
The desired output is-
/usr/lib/libfooabc.so.1
/usr/lib/libfoo.so.1