<PAGE>

                                                                    EXHIBIT 10.2

                            STOCK PURCHASE AGREEMENT

         THIS STOCK PURCHASE AGREEMENT (this "Agreement"), dated as of June 27,
2003, is entered into by and among Cooperative Computing, Inc., a Delaware
corporation ("CCI"), Hicks, Muse, Tate & Furst Equity Fund III, L.P. ("Fund
III") and HM3 Coinvestors, L.P. ("HM3" and, together with Fund III, "HMTF").

         WHEREAS, HMTF is the record and beneficial owner of all of the
membership interests (the "Interests") of HM Coop LLC, a Delaware limited
liability company (the "Company");

         WHEREAS, the Company is the record and beneficial owner of 1,750,000
shares of common stock, par value $0.01 per share, of Internet Autoparts, Inc.
(the "IAP Shares"); and

         WHEREAS, CCI desires to purchase the Interests from HMTF.

         NOW, THEREFORE, in consideration of the premises, mutual covenants and
agreements hereinafter contained and for other good and valuable consideration,
the receipt and adequacy of which are hereby acknowledged, the parties hereto
hereby agree as follows:

                                    ARTICLE I

                         PURCHASE AND SALE OF SECURITIES

         1.1      Commitments to Sell and Purchase. At the Closing, upon the
terms and subject to the conditions contained herein, HMTF shall sell, assign,
transfer, convey and deliver to CCI, and CCI shall purchase from HMTF the
Interests free and clear of all liens, claims, encumbrances, security interests
or other restrictions of any kind ("Liens").

         1.2      Purchase Price; Payment of Purchase Price. The aggregate
consideration to be paid by CCI to HMTF for the Interests shall be $1,820,000 in
cash (the "Purchase Price"). At the Closing, CCI shall pay the Purchase Price by
wire transfer of immediately available funds to accounts and in the amounts
designated by HMTF in writing to CCI not later than two (2) business days prior
to the Closing Date.

                                    ARTICLE II

                                     CLOSING

         2.1      Closing. The purchase and sale of the Interests will take
place at a closing (the "Closing") to be held at the offices of Weil, Gotshal &
Manges LLP, 200 Crescent Court, Suite 300, Dallas, Texas 75201, at 10:00 a.m.,
Dallas time, concurrently with the

<PAGE>

execution and delivery of this Agreement. The date on which the Closing is held
is referred to as the "Closing Date".

                                   ARTICLE III

                     REPRESENTATIONS AND WARRANTIES OF HMTF

                  Each of Fund III and HM3, as to itself only, makes the
following representations and warranties to the CCI:

         3.1      Organization and Good Standing. Each of Fund III and HM3 is
validly existing and in good standing under the laws of the jurisdiction of its
formation.

         3.2      Authorization. Each of Fund III and HM3 has all requisite
partnership power and authority to execute and deliver this Agreement and to
consummate the transactions contemplated hereby. The execution, delivery and
performance of this Agreement have been duly authorized by all necessary
partnership action on the part of Fund III and HM3, and this Agreement has been
duly and validly executed and delivered by each of Fund III and HM3. This
Agreement constitutes legal, valid and binding obligations of Fund III and HM3,
enforceable against such entity in accordance with its terms, subject to
applicable bankruptcy, insolvency, fraudulent conveyance, reorganization,
moratorium and similar laws affecting creditors' rights and remedies generally,
and subject, as to enforceability, to general principles of equity, including
principles of commercial reasonableness, good faith and fair dealing (regardless
of whether enforcement is sought in a proceeding at law or in equity).

         3.3      Ownership and Transfer of Interests. Fund III and HM3 are the
sole record and beneficial owners of the Interests. Each of Fund III and HM3 has
the power and authority to sell, transfer, assign and deliver such Interests as
provided in this Agreement, and such delivery will convey to CCI good and
marketable title to such Interests, free and clear of any and all Liens.

         3.4      Ownership of Shares. The Company is the sole record and
beneficial owner of the Shares, free and clear of any and all Liens.

                                   ARTICLE IV

                      REPRESENTATIONS AND WARRANTIES OF CCI

         CCI makes the following representations and warranties to HMTF:

         4.1      Organization and Good Standing. CCI is validly existing and in
good standing under the laws of the State of Delaware. CCI and its subsidiaries
has the requisite corporate power and authority to own, lease or otherwise hold
the assets owned, leased or otherwise held by it and to carry on its business as
now being conducted.

                                       2

<PAGE>

         4.2      Authorization. CCI has all requisite corporate power and
authority to enter into this Agreement and to perform its obligations hereunder.
The execution, delivery and performance of this Agreement have been duly
authorized by all necessary corporate action on the part of CCI, and this
Agreement has been duly executed and delivered by CCI. This Agreement
constitutes the legal, valid and binding obligation of CCI, enforceable against
CCI in accordance with its terms subject to applicable bankruptcy, insolvency,
fraudulent conveyance, reorganization, moratorium and similar laws affecting
creditors' rights and remedies generally, and subject, as to enforceability, to
general principles of equity, including principles of commercial reasonableness,
good faith and fair dealing (regardless of whether enforcement is sought in a
proceeding at law or in equity).

                                    ARTICLE V

                                  MISCELLANEOUS

         5.1      Further Assurances. Each of CCI and HMTF shall do and perform
or cause to be done and performed all such further acts and things and shall
execute and deliver all such other agreements, certificates, instruments, or
documents as any other party shall reasonably request from time to time in order
to carry out the intent and purposes of this Agreement.

         5.2      Construction. Words used in the Agreement of any gender or
neuter shall be construed to include any other gender or neuter where
appropriate. Words used in this Agreement that are either singular or plural
shall be construed to include the other where appropriate. No provisions of this
Agreement will be interpreted in favor of, or against, any of the parties hereto
by reason of the extent to which any such party or its counsel participated in
the drafting thereof or by reason of the extent to which any such provisions in
inconsistent with any prior draft hereof or thereof.

         5.3      Governing Law. THIS AGREEMENT SHALL BE GOVERNED BY AND
CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF TEXAS, WITHOUT REGARD TO
PRINCIPLES OF CONFLICT OF LAWS. EXCLUSIVE VENUE SHALL LIE IN TRAVIS COUNTY,
TEXAS.

         5.4      Duplicate Originals. All parties may sign any number of copies
of this Agreement. Each signed copy shall be an original, but all of them
together shall represent the same agreement.

         5.5      Severability and Savings Clause. Should any clause, sentence,
provision, paragraph or part of this Agreement for any reason whatsoever be
adjudged by any court of competent jurisdiction, or be held by any other
competent governmental authority having jurisdiction, to be invalid,
unenforceable, or illegal, such judgment or holding shall not affect, impair or
invalidate the remainder of this Agreement, but shall be confined in its
operation to the specific clause, sentence, provision, paragraph or part of

                                       3

<PAGE>

this Agreement directly involved, and the remainder of this Agreement, wherever
practicable, shall remain in full force and effect.

         5.6      Entire Agreement; No Third Party Beneficiaries. This Agreement
constitutes the entire agreement, and supercedes all prior agreements and
understandings, both written and oral, among the parties hereto with respect to
the subject matter hereof. This Agreement is not intended to confer upon any
person other than the parties hereto any rights or remedies hereunder.

         5.7      No Recourse. Notwithstanding any of the terms or provisions of
this Agreement, CCI on the one hand, and HMTF on the other hand, agrees that
neither of such party nor any other person or entity acting on such party's
behalf may assert any claims or causes of action against any officer or director
of the other party (or parties) or partner, member or shareholder of such other
party (or parties) in connection with or arising out of this Agreement or the
transactions contemplated hereby except to the extent that any of the foregoing
are parties to this Agreement.

            [THE REMAINDER OF THIS PAGE IS INTENTIONALLY LEFT BLANK]

                                       4

<PAGE>

         IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
duly executed as of the date first written above.

                                         COOPERATIVE COMPUTING, INC.

                                         By: /s/ Greg Petersen
                                             -----------------
                                             Greg Petersen
                                             Vice President

                                         HICKS, MUSE, TATE & FURST EQUITY
                                          FUND III, L.P.

                                         By: HM3/GP Partners III, L.P.,
                                             its general partner

                                         By: Hicks, Muse GP Partners, L.P.,
                                             its general partner

                                         By: Hicks, Muse Fund III, Incorporated,
                                             its general partner

                                         By: /s/ David W. Knickel
                                             --------------------
                                             David W. Knickel
                                             Vice President, Treasurer and
                                             Secretary

                                         HM3 COINVESTORS, L.P.

                                         By: Hicks Muse GP Partners III, L.P.,
                                             its General Partner

                                         By: Hicks Muse Fund III Incorporated,
                                             its General Partner

                                         By: /s/ David W. Knickel
                                             --------------------
                                             David W. Knickel
                                             Vice President, Treasurer and
                                             Secretary