MySQL Connector/Python 1.0.9 available for download

Today we released MySQL Connector/Python v1.0.9. Release notes can be found in the MySQL Developver Zone.

Connector/Python v1.0.9 contains some important fixes, especially for the Windows platform. It also comes with a new connection argument called force_ipv6, and can be used to force IPv6 when an address resolves to both IPv4 and v6. Also, RPM packages have been made available in addition to the TAR/ZIP and MSI packages.

Please use the MySQL Bugs website to report any problem.

Some useful links:

Enjoy!

Using printf format %P with find in RPM spec file

While creating a spec file for an RPM, I needed to generate the list of files installed by the RPM. Solution is simple, use the UNIX command find. Right..

My first attempt was the following:

%install
# copy the files
( cd %{buildroot} ; find -type f -print "/%P\n" ) > INSTALLED_FILES

If you do the above, you’ll find that all entries in INSTALLED_FILES are wrong: file name have ‘ATCH’ at the end. Why is this? Because %p is a special macro in RPM spec files.

You can try to escape %P in an RPM spec file. If you manage that, let me know, I couldn’t.

Here is the solution I came up with after lots of hacking: it defines the pattern used in the find command as a macro.

%define findpat %( echo "/%""P" )

%install
# copy the files
( cd %{buildroot} ; find -type f -print "%{findpat}\n" ) > INSTALLED_FILES

I hope you never have to do this though.

By |February 4th, 2013|Work|0 Comments|