[CM] OStatic on Package Mgmt & Perl

R

RS Wood

From the «CPANties» department:
Title: Package Management and Perl
Author: Jon Buys
Date: Wed, 05 Mar 2014 21:44:16 -0500
Link: http://feedproxy.google.com/~r/ostatic/~3/MUI_H7HBfj4/story01.htm

[image 2][1]

Anyone who lived through the bad old days of compiling software from source
on Linux remembers well the frustration of upgrading one package only to find
that it breaks another. I like to think that those days are behind us; and,
for the most part, they are. Unfortunately, I found myself in an eerily
similar situation after patching a CentOS 6 server, and then trying to run a
scheduled Perl job.

Package managers are the life blood of a Linux distribution. Without them,
the entire house of cards starts to fall down. The open nature of Linux lends
to many different people working on many different projects, each bit fitting
into another bit in just the right way. I always tell the teams I work with,
"stay in the box", as much as possible, you should stay within what the
distribution you are working with gives you in the package manager. Yes, it
might be a bit out of date, but the frustration you save by having a
reliable, and upgradeable system is well worth the cost. There are,
obviously, times when stepping outside the box is warranted, but do so
knowing full well what you are getting in to, how it works, and what else you
might be affecting.

When just using a Linux system, this advice works well, but developing on one
can be a slightly different story, especially when working with a system that
comes with it's own package manager like CPAN, the Comprehensive Perl Archive
Network[3]. A developer contacted me the other day complaining that my
patches broke his Perl script, and demanded that I restore a library from
backup. My response was that course of action was probably not a good idea,
since the entire system was upgraded at once, and that he should fix the
script. It was the type of classic back and forth, sysadmin to developer,
banter that is generally, and rightfully, looked down upon in this devops
world. When he told me that simply fixing the script wasn't an option, I went
in to dig a bit deeper and sort out the issue.

The script was fairly short and easy enough to sort out what part was
failing. The script compiled some data, created a file, and then scp'd the
file to another server. Commenting out one line that called the scp let the
script finish without error, but why was that method causing the error? Turns
out, the script was using parts of Perl that were upgraded during patching,
and calling other parts that were not. After talking to the admin who setup
the machine, it became clear that this system had been Frankensteined.

The initial Perl install and the first modules were all installed from the
official CentOS repositories with yum, but that wasn't enough. The repository
was either too out of date, or didn't contain the modules that the developers
wanted to use, so the admin used CPAN to fill in the blanks. Now there are
two versions of Perl modules installed managed by two different package
managers, but that wasn't quite enough yet. To top it off the admin had
installed a few more modules from source, so now there were the two package
managers plus modules that had to be updated completely separately. It became
readily apparent that the wonder was not that the system was broken, but that
it had ever worked at all.

So, after digging into yum, cpan, and downloading and compiling one module
from source, the developers Perl script ran again, and all was right with the
world. Until the next time something is updated. So, the moral of the story
is not just to stay in the box, it is more to pick a box and then stay in the
new box. Perl is a powerful language, and the modules are easy to work with,
but both the language and the modules should be used with care.

Related Activities Related Software Related Blog Posts

* Comments (1)[4] * Perl[7] (10 alternatives[8], 1 review[9]) * Totally Legal, LMDE Reviews, and R-E-S-P-E-C-T [13] (post comment[14])
* Post a Comment[5] * centos[10] (1 alternative[11], post review[12]) * Three Turning Points, KDE Releases, and Loving Ubuntu[15] (post comment[16]
* Ask a Question[6] )
* Linux Gamers Have More Choices Than Ever[17] (post comment[18])

----------------------------------------------------------------------------

[image 20][19]
[image 21]
[image 23][22] [image 25][24] [image 27][26] [image 29][28] [image 31][30]
[image 33][32][image 35][34][image 37][36][image 39][38][image 40][image 42][41][image 44][43][image 45]

Links:
[1]: http://www.flickr.com/photos/51724787@N06/4777335328/ (link)
[2]: http://farm5.staticflickr.com/4099/4777335328_3cc363c419_t.jpg (image)
[3]: http://www.cpan.org (link)
[4]: http://ostatic.com/blog/package-management-and-perl#comments (link)
[5]: http://ostatic.com/blog/package-management-and-perl#addres (link)
[6]: http://ostatic.com/blog/package-management-and-perl#addrelquestion (link)
[7]: http://ostatic.com/perl#rss (link)
[8]: http://ostatic.com/perl#alternatives (link)
[9]: http://ostatic.com/perl#comments (link)
[10]: http://ostatic.com/centos#rss (link)
[11]: http://ostatic.com/centos#alternatives (link)
[12]: http://ostatic.com/centos#comments (link)
[13]: http://ostatic.com/blog/totally-legal-lmde-reviews-and-r-e-s-p-e-c-t-0#rss (link)
[14]: http://ostatic.com/blog/totally-legal-lmde-reviews-and-r-e-s-p-e-c-t-0#comments (link)
[15]: http://ostatic.com/blog/three-turning-points-kde-releases-and-loving-ubuntu#rss (link)
[16]: http://ostatic.com/blog/three-turning-points-kde-releases-and-loving-ubuntu#comments (link)
[17]: http://ostatic.com/blog/linux-gamers-have-more-choices-than-ever#rss (link)
[18]: http://ostatic.com/blog/linux-gamers-have-more-choices-than-ever#comments (link)
[19]: http://ads.gigaom.com/redirect/rss/ (link)
[20]: http://ads.gigaom.com/show/rss/ (image)
[21]: http://ostatic.feedsportal.com/c/34998/f/646451/s/37d73a4d/sc/4/mf.gif (image)
[22]: http://share.feedsportal.com/share/...nt-and-perl#buzzt=Package+Management+and+Perl (link)
[23]: http://res3.feedsportal.com/social/twitter.png (image)
[24]: http://share.feedsportal.com/share/...nt-and-perl#buzzt=Package+Management+and+Perl (link)
[25]: http://res3.feedsportal.com/social/facebook.png (image)
[26]: http://share.feedsportal.com/share/...nt-and-perl#buzzt=Package+Management+and+Perl (link)
[27]: http://res3.feedsportal.com/social/linkedin.png (image)
[28]: http://share.feedsportal.com/share/...nt-and-perl#buzzt=Package+Management+and+Perl (link)
[29]: http://res3.feedsportal.com/social/googleplus.png (image)
[30]: http://share.feedsportal.com/share/...nt-and-perl#buzzt=Package+Management+and+Perl (link)
[31]: http://res3.feedsportal.com/social/email.png (image)
[32]: http://da.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/sc/4/rc/1/rc.htm (link)
[33]: http://da.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/sc/4/rc/1/rc.img (image)
[34]: http://da.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/sc/4/rc/2/rc.htm (link)
[35]: http://da.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/sc/4/rc/2/rc.img (image)
[36]: http://da.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/sc/4/rc/3/rc.htm (link)
[37]: http://da.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/sc/4/rc/3/rc.img (image)
[38]: http://da.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/a2.htm (link)
[39]: http://da.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/a2.img (image)
[40]: http://pi.feedsportal.com/r/186531293341/u/49/f/646451/c/34998/s/37d73a4d/a2t.img (image)
[41]: http://feeds.feedburner.com/~ff/ostatic?a=MUI_H7HBfj4:hZxvlZ93DIA:yIl2AUoC8zA (link)
[42]: http://feeds.feedburner.com/~ff/ostatic?d=yIl2AUoC8zA (image)
[43]: http://feeds.feedburner.com/~ff/ostatic?a=MUI_H7HBfj4:hZxvlZ93DIA:V_sGLiPBpWU (link)
[44]: http://feeds.feedburner.com/~ff/ostatic?i=MUI_H7HBfj4:hZxvlZ93DIA:V_sGLiPBpWU (image)
[45]: http://feeds.feedburner.com/~r/ostatic/~4/MUI_H7HBfj4 (image)
 
G

George Mpouras

many times I find it easier (especially on old installations) to take
backup, perform a format/clean install , and restore the data than
trying to upgrade.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top