[PATCH] print/system-config-printer: Leaves .pyo files upon
deinstall
Jason E. Hale
bsdkaffee at gmail.com
Thu Mar 10 13:37:35 UTC 2011
>Submitter-Id: current-users
>Originator: Jason E. Hale
>Organization: none
>Confidential: no
>Synopsis: [PATCH] print/system-config-printer: Leaves .pyo files upon deinstall
>Severity: non-critical
>Priority: low
>Category: ports
>Class: change-request
>Release: FreeBSD 8.2-RELEASE i386
>Environment:
System: FreeBSD mocha.verizon.net 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Tue Feb 22 19:19:42 EST 2011 root at mocha.verizon.net:/usr/obj/usr/src/sys/MOCHA8 i386
>Description:
print/system-config-printer leaves Python ".pyo" files upon deinstall. They
are not installed when the port is built, but they get generated when the
module is used.
I have patched the port to install the .pyo files when the port is built so
that they can be included in the pkg-plist.
Also, remove .egg-info file from the pkg-plist and deal with it in the Makefile.
While here, remove MD5.
>How-To-Repeat:
Use attached diff.
>Fix:
--- 2011-03-10-system-config-printer.diff begins here ---
diff -ruN system-config-printer.orig/Makefile system-config-printer/Makefile
--- system-config-printer.orig/Makefile 2010-05-30 22:00:44.000000000 -0400
+++ system-config-printer/Makefile 2011-03-10 06:18:55.000000000 -0500
@@ -8,7 +8,7 @@
PORTNAME= system-config-printer
PORTVERSION= 1.1.16
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= print gnome
MASTER_SITES= http://cyberelk.net/tim/data/${PORTNAME}/${PORTVERSION:R}/
@@ -37,8 +37,14 @@
MAN1= system-config-printer-applet.1 system-config-printer.1
PLIST_SUB= PYTHON_VER=${PYTHON_VERSION:S/python//}
+INSTALLS_EGGINFO= yes
+PYDISTUTILS_PKGNAME= cupshelpers
+PYDISTUTILS_PKGVERSION= 1.0
+
post-patch:
@${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e \
's|%%LOCALBASE%%|${LOCALBASE}|g; s|%%PREFIX%%|${PREFIX}|g'
+ @${REINPLACE_CMD} -e 's|setup.py install|setup.py install -c -O1|g' \
+ ${WRKSRC}/Makefile.in
.include <bsd.port.mk>
diff -ruN system-config-printer.orig/distinfo system-config-printer/distinfo
--- system-config-printer.orig/distinfo 2010-05-10 17:18:33.000000000 -0400
+++ system-config-printer/distinfo 2011-03-10 06:21:04.000000000 -0500
@@ -1,3 +1,2 @@
-MD5 (system-config-printer-1.1.16.tar.bz2) = 22394a052fa730a890f6bfea1aec0aa2
SHA256 (system-config-printer-1.1.16.tar.bz2) = 176b63ee6af2208313469192eb34eb12b41fe8b890a18c8a5ab693010a8e785d
SIZE (system-config-printer-1.1.16.tar.bz2) = 1036604
diff -ruN system-config-printer.orig/pkg-plist system-config-printer/pkg-plist
--- system-config-printer.orig/pkg-plist 2010-05-23 16:24:39.000000000 -0400
+++ system-config-printer/pkg-plist 2011-03-10 06:11:47.000000000 -0500
@@ -3,15 +3,18 @@
bin/system-config-printer-applet
etc/dbus-1/system.d/newprinternotification.conf
etc/xdg/autostart/print-applet.desktop
-%%PYTHON_SITELIBDIR%%/cupshelpers-1.0-py%%PYTHON_VER%%.egg-info
%%PYTHON_SITELIBDIR%%/cupshelpers/__init__.py
%%PYTHON_SITELIBDIR%%/cupshelpers/__init__.pyc
+%%PYTHON_SITELIBDIR%%/cupshelpers/__init__.pyo
%%PYTHON_SITELIBDIR%%/cupshelpers/cupshelpers.py
%%PYTHON_SITELIBDIR%%/cupshelpers/cupshelpers.pyc
+%%PYTHON_SITELIBDIR%%/cupshelpers/cupshelpers.pyo
%%PYTHON_SITELIBDIR%%/cupshelpers/openprinting.py
%%PYTHON_SITELIBDIR%%/cupshelpers/openprinting.pyc
+%%PYTHON_SITELIBDIR%%/cupshelpers/openprinting.pyo
%%PYTHON_SITELIBDIR%%/cupshelpers/ppds.py
%%PYTHON_SITELIBDIR%%/cupshelpers/ppds.pyc
+%%PYTHON_SITELIBDIR%%/cupshelpers/ppds.pyo
share/applications/manage-print-jobs.desktop
share/applications/my-default-printer.desktop
share/applications/system-config-printer.desktop
--- 2011-03-10-system-config-printer.diff ends here ---
More information about the freebsd-gnome
mailing list