From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 1 Oct 2009 05:24:28 +0400 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20091001012428.GL10769@altlinux.org> Mail-Followup-To: devel@lists.altlinux.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="j3olVFx0FsM75XyV" Content-Disposition: inline Subject: [devel] =?koi8-r?b?18/Q0s/TINDPINHa2cvVIPPJIC0g0M/S0cTPyyDX2d7J?= =?koi8-r?b?08zFzsnRIM/QxdLBzsTP1w==?= X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2009 01:24:29 -0000 Archived-At: List-Archive: List-Post: --j3olVFx0FsM75XyV Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =F5 =CE=C1=D3 =D7 rpm =C5=D3=D4=D8 =D4=C1=CB=CF=CA =CB=CF=C4. lib/depends.h: 108 typedef /*@abstract@*/ struct availableList_s { 109 /*@owned@*/ /*@null@*/ struct availablePackage * list; /*!< Set of= packages. */ 110 struct availableIndex index; /*!< Set of available items= . */ 111 int delta; /*!< Delta for pkg list rea= llocation. */ 112 int size; /*!< No. of pkgs in list. */ 113 int alloced; /*!< No. of pkgs allocated = for list. */ 114 int numDirs; /*!< No. of directories. */ 115 /*@owned@*/ /*@null@*/ dirInfo dirs; /*!< Set of directories. */ 116 } * availableList; =2E.. lib/depends.c: 213 static /*@exposed@*/ struct availablePackage * 214 alAddPackage(availableList al, 215 Header h, /*@null@*/ /*@dependent@*/ const void * k= ey, 216 /*@null@*/ FD_t fd, /*@null@*/ rpmRelocation * relo= cs) 217 /*@modifies al, h @*/ 218 { 219 HGE_t hge =3D (HGE_t)headerGetEntryMinMemory; 220 HFD_t hfd =3D headerFreeData; 221 rpmTagType dnt, bnt; 222 struct availablePackage * p; 223 rpmRelocation * r; 224 int i; 225 int_32 * dirIndexes; 226 const char ** dirNames; 227 int numDirs, dirNum; 228 int * dirMapping; 229 struct dirInfo_s dirNeedle; 230 dirInfo dirMatch; 231 int first, last, fileNum; 232 int origNumDirs; 233 int pkgNum; 234 =20 235 if (al->size =3D=3D al->alloced) { 236 al->alloced +=3D al->delta; 237 al->list =3D xrealloc(al->list, sizeof(*al->list) * al->all= oced); 238 } =2E.. 703 int rpmtransAddPackage(rpmTransactionSet ts, Header h, FD_t fd, 704 const void * key, int upgrade, rpmRelocatio= n * relocs) 705 { 706 HGE_t hge =3D (HGE_t)headerGetEntryMinMemory; 707 HFD_t hfd =3D headerFreeData; 708 rpmTagType ont, ovt; 709 /* this is an install followed by uninstalls */ 710 const char * name; 711 int count; 712 const char ** obsoletes; 713 int alNum; 714 =20 715 /* 716 * FIXME: handling upgrades like this is *almost* okay. It does= n't 717 * check to make sure we're upgrading to a newer version, and it 718 * makes it difficult to generate a return code based on the nu= mber of 719 * packages which failed. 720 */ 721 if (ts->orderCount =3D=3D ts->orderAlloced) { 722 ts->orderAlloced +=3D ts->delta; 723 ts->order =3D xrealloc(ts->order, sizeof(*ts->order) * ts->= orderAlloced); 724 } 725 ts->order[ts->orderCount].type =3D TR_ADDED; 726 if (ts->addedPackages.list =3D=3D NULL) 727 return 0; 728 =20 729 alNum =3D alAddPackage(&ts->addedPackages, h, key, fd, relocs) - 730 ts->addedPackages.list; 731 ts->order[ts->orderCount++].u.addedIndex =3D alNum; =2E.. =F7=CF=D0=D2=CF=D3 =CB=C1=D3=C1=C5=D4=D3=D1 =D3=D4=D2=CF=CB 729-730. =F3= =CC=C5=C4=C9=D4=C5 =DA=C1 =C4=D7=C9=D6=C5=CE=C9=C5=CD =D2=D5=CB. ts->addedPackages -- =DC=D4=CF =CE=C5=CB=CF=D4=CF=D2=C1=D1 =D3=D4=D2=D5=CB= =D4=D5=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CC=C0=C2=C1=D1 =CE=C5=D4=D2=C9=D7=C9=C1=CC=D8=CE=C1=D1 =C9=CE=C6=CF=D2=CD=C1=C3=C9=D1 =CE= =C1 =DC=D4=D5 =D4=C5=CD=D5. --j3olVFx0FsM75XyV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkrEBMwACgkQfBKgtDjnu0Yb5gCeKvOVR+lt4IWsES5P63QIoEwS HswAoNkKtdgV640oqUdApp9Vhy91A2pz =7A0l -----END PGP SIGNATURE----- --j3olVFx0FsM75XyV--